6
votes

I am a new Perforce 2014.1 user.

The team has decided to work with a task stream for each new feature. Now that I have submitted my change and they have been merged to parent. I want to delete the task stream, which is the intended use from what I have understood.

Using p4 stream -d, the task stream disappears from P4V stream view, and is not displayed anymore by p4 streams, which is fine.

However it is still displayed in P4V depot tree pane.

I am worried because we are working on very little "features" and I am going to end up quickly with hundreds of zombie task stream in my depot view. Is there a way to hide them ?

I don't want to obliterate them, I am ok with the file existing in the revision graph and in the db. I have already found the 'Tree restricted to workspace view' but I am actually looking for something like 'Tree restricted to not deleted/unloaded stream'.

It severely limits the point of deleting task if they are still displayed prominently in the interface and can't be hidden !

3
Have you tried changing your protection table to remove access from the files in the Task Stream? I believe that if your users do not have "read" access (maybe it is actually "list" access, so check that) to the files, then they will not appear in the Depot Tree View. - Bryan Pendleton
@BryanPendleton : I unfortunately don't have protect access, so it is a bit cumbersome to experiment with, but I will investigate in this direction with IT and report if I have some success. - Xavier T.

3 Answers

1
votes

One way you can at least...mitigate this, is by putting the task streams in a different depot. While this doesn't allow you to truly get rid of them, it at least buckets them into a separate depot from your primary working area so the main streams are still easily viewable.

As of the 2015.2 server, you can now also change the depth of a stream depot so that you can keep them in the same depot, but put them in their own folder. I.e. You could do:

//streams/mainStreams/mainline
//streams/mainStreams/rel1.0
//streams/taskStreams/featureA
//streams/taskStreams/featureB

Again, while I know this doesn't actually solve the problem, it's a way to at least mitigate the clutter with the creation of many task streams.

1
votes

According to Perforce official site, it is not possible to hide files associated to deleted streams from depot view, unless you remove the modified files as well, which I don't want to do.

Reference : http://answers.perforce.com/articles/KB/6823

Relevant part :

P4V does not display deleted streams in the Streams view (in the right pane), but a deleted stream still appears in the Depot Tree (in the left pane), because the stream files still exist in the depot.

To remove the stream from the Depot Tree, you have to remove the stream files and their history from the depot. How? Obliterate them.

This is unfortunate for teams who are going to churn lots of task streams every week.

My take away is that if you want to work with streams you should not use the depot tree view, but limit yourself to the stream graph view, but it is still annoying in other menu like Branch... or Diff with...

If you want to raise that issue visibility to Perforce, apparently, there is something open there : (only an email adress is requested)

https://perforce.ideas.aha.io/ideas/P4V-I-109

-1
votes

You should always delete or unload a task stream after you are done with it.

Your Perforce administrator should also run a batch process to delete or unload inactive task streams on a regular basis.

Note that any submitted files remain in the depot even after you delete a task stream. Note also that you cannot re-use the names of deleted task streams.

To delete a task stream:

Context-click the stream in the Streams tab (in graph, tree, or list view)

Select Delete Stream 'stream_name'.

Unloading transfers infrequently-used metadata from the versioning engine's database files to a set of flat files in an unload depot. If you unload a task stream, you can reload it if you change your mind and want to use it again.

To unload a task stream:

Context-click the stream in the Streams tab (in graph, tree, or list view).

Select Unload stream 'stream_name'.

To reload an unloaded task stream:

Display the Streams tab in List or Tree view. Select the Unloaded Unloaded... icon in the filter pane to open the Unloaded Streams dialog, where you can filter for and select unloaded streams to reload. Context-click the stream and select Reload Stream.

Unless the stream is a task stream, deleting the stream only deletes the stream specification, not the files that have been submitted to the stream.

The files submitted to the stream are part of your permanent history; you want to keep them!

I often find myself referring back to the change lists and diffs of changes made many years ago, sometimes even decades ago, so I do everything possible never to erase old history.

If you really wish to destroy the permanent history of changes made to this stream, you can use the 'p4 obliterate' command, but be aware that this command cannot be undone.

If you are contemplating using obliterate to destroy the files submitted to this stream, you should consider contacting Perforce Technical Support first, as the obliterate command is complicated and has a number of options, and you want to make sure you use the right options. And take a checkpoint first, just for extra protection.

If you are using streams for temporary work, and frequently find yourself wishing to obliterate that work, consider using task streams.

And If you dont want any of the above, you can hide the deleted streams from the tree

To find a file in the depot or in your workspace:

 1. Go to Search>Find File.... 
 2. On the Find File tab, under Search in,enter the directory path you want to      search. 
 3. You can drag and drop
    the file path from the Depot or Workspace tree in the Tree pane.

 4. Enter any of the following search criteria: Under Name matches any
    of the following, select an operator (contains, is, starts with,
    ends with) and enter all or part of the file name. You can add
    multiple name match rows.

 5. Under Submission date or changelist, enter a date, changelist, or
    range of dates or changelists. 
 6. Unselect Include deleted depot files.

Click Find.

Hope that works for you , Good Luck !!