Jump to content


Best practice: User-Stream

Stream Task User Workspace Sandbox

  • Please log in to reply
9 replies to this topic

#1 danielh

danielh

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 02 September 2013 - 01:26 PM

Hi guys,

I've got here a "normal" depot where all developers can write and read. At the moment, most developers use sandboxing to work on a specific feature. For example:

//depot/dev/Component1/...

and

//depot/dev/Component2/...

are use for a sanbox. Now, there was an system-crash at the user-PC and his sandbox (with all changes) are deleted. Now, I like to do following:

I have a new Streams-Depot, we say //User

Is there a way to:

A: Create a Branchmap from //depot/dev/Component1/... to //User/USER_FEATURE_MAIN

B: (this should work if A work) Create multiple Streams from //User/USER_FEATURE_MAIN

C: After developping, use the Branchmapping from A) to merge changes to //depot/dev/Component1/...

How can I do this and do I need a new worksapce for the Stream?

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 03 September 2013 - 06:23 AM

Yup; you can move changes between vanilla and stream depots, and a branch mapping is the cleanest way to do that. To do it, just do exactly what you said:

1) Create a new stream depot using 'p4 depot' and the mainline stream using 'p4 stream'.
2) Create a branch mapping that maps the code you want from the vanilla depot to the new stream
3) Integrate all of the code from the vanilla depot into the stream using the branch mapping
4) Create dev streams as needs be. Change files and submit happily.
5) When ready, pull code from the stream into the main body of code.

The user can reuse their existing workspace. They just need to edit the workspace form and put in the stream they want to work on. From P4V you can drag and drop your workspace to switch between streams. I find I generally move my workspace around as needs be when working with streams, although in rare instances I'll spin up a second workspace for a particular stream.

Now saying all that, what is your goal with the new system? I might be able to give you some advice to make things simpler if I can get a sense of what you are hoping to accomplish.

As an aside, you mentioned they use 'sandboxes'. Is that p4sandbox that they are using? Just idle curiousity on my part. =)

#3 danielh

danielh

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 03 September 2013 - 07:37 AM

Hi and thanks for your qick response.

My goal is to have a depot/streams where all developer can check in unstable / not compileable sourcecode for backup at days end. But, maye there are teams of developers working at the same feature, so a sandbox will not be working for me.

Yes, I meaning P4sandboxes :) is there a possibility to share a sandbox with different users? I think not.

#4 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 03 September 2013 - 02:42 PM

So there are a couple options:

1) Go with branching

You can do exactly what you described above, or you could take advantage of our task branches to create lightweight branches for each feature. They can be used with vanilla depots or stream depots. Here's some reading material:

http://www.perforce....06/task-streams
http://www.perforce....reams_task.html

2) Use shelving for nightly backups

If you want to keep things really lightweight your developers can just shelve their work in process. That's what  do 90% of the time for pushing work in progress to the server for safe keeping. You can also use shelving with sandboxes; if you copy up to your mirror stream and shelve instead of submit, a new shelf is created on the server.

#5 charlesa

charlesa

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 05 September 2013 - 06:53 PM

I'm not sure I see any way, when setting up a task stream, to define the non-stream source for the files I'll be working with in the task stream. Am I missing a flag for defining the relationship when the "parent" is a non-streams depot path (or collection of paths) instead of a stream?

#6 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 05 September 2013 - 07:02 PM

Here's a nice blog post on it with all the gory details.

http://www.perforce....c-perforce-shop

#7 MrScott

MrScott

    Member

  • Members
  • PipPip
  • 15 posts

Posted 11 September 2019 - 11:08 PM

In that last link https://www.perforce...c-perforce-shop, an "attic" depot is created -- and then never mentioned again.  Was that article complete?

For an earlier link http://www.perforce....ms_task.html  I get "Page Not Found".  Perhaps this?  https://www.perforce...ms-perforce-131

#8 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 947 posts

Posted 12 September 2019 - 06:17 AM

View PostMrScott, on 11 September 2019 - 11:08 PM, said:

In that last link https://www.perforce...c-perforce-shop, an "attic" depot is created -- and then never mentioned again.  Was that article complete?

Later on in the article, when streams are unloaded, they go into the "attic" (i.e. the unload depot we created earlier).  The point of the attic is that once stuff goes there it's out of sight and out of mind.  :)

Quote

For an earlier link http://www.perforce....ms_task.html  I get "Page Not Found".  Perhaps this?  https://www.perforce...ms-perforce-131

That was a manual link; I think the current version would be https://www.perforce...th_task_streams

#9 MrScott

MrScott

    Member

  • Members
  • PipPip
  • 15 posts

Posted 12 September 2019 - 05:49 PM

Thank you for the info!

I take it that the 'attic' transfer happens automatically because an unload depot exists?  'attic' did not appear in any of the later commands.  What happens if two or more unload depots exist (or are they not allowed to be created)?

How do you get streams back from the 'attic', or is this something you wouldn't need to do, ever?

#10 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 947 posts

Posted 12 September 2019 - 06:45 PM

View PostMrScott, on 12 September 2019 - 05:49 PM, said:

I take it that the 'attic' transfer happens automatically because an unload depot exists?  'attic' did not appear in any of the later commands.

Yup, p4 unload saves things in the unload depot.  Similar to how specs get saved in the spec depot, tangents get saved in the tangent depot...

Quote

What happens if two or more unload depots exist (or are they not allowed to be created)?

Pretty sure you can't have more than one (same as the other depot types that are the designated home for automatically created files).

Quote

How do you get streams back from the 'attic', or is this something you wouldn't need to do, ever?

As hinted in the last paragraph of the blog post:

Quote

Task Streams can now be created, unloaded and reloaded if need be.

the p4 reload command is how you get things back from an unload depot.  :)





Also tagged with one or more of these keywords: Stream, Task, User, Workspace, Sandbox

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users