Jump to content


Recreated stream hierarchy on personal server

dvcs streams personal server

  • Please log in to reply
4 replies to this topic

#1 aneves

aneves

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 30 October 2018 - 01:37 PM

Hello,

I've been using DVCS to clone certain parts of my remote server and I find this to very useful. Is it possible to clone an entire stream hierarchy? In other words, is there a way to clone a stream in such a way that it clones the all of the streams (parent and children) associated with it?

The use case here is that I have a complicated merge situation on my remote server that might take a few check-ins to fix. I'd like to be able to clone those 2 streams to my personal server with the exact same history and relationship that they have on the remote server. This would allow me to perform whatever I need to do, even if it's risky, in a sandbox on my machine that wouldn't affect other developers. Then, I can push my changes back to the remote server once I've verified everything is OK.

Is this possible with DVCS in Perforce? If I recall, when you clone a repo in git, you also clone all of the branches as well.

Thanks!!

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 639 posts

Posted 30 October 2018 - 02:30 PM

You'll need to copy over the stream specs manually, I believe -- the DVCS server uses streams to manage its own branching, but has no concept of stream specs on the remote server.

#3 aneves

aneves

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 30 October 2018 - 03:30 PM

View PostSambwise, on 30 October 2018 - 02:30 PM, said:

You'll need to copy over the stream specs manually, I believe -- the DVCS server uses streams to manage its own branching, but has no concept of stream specs on the remote server.

Can you elaborate on this? Let's say I have the following on the remote server:

//RemoteDepot/MAIN/...
//RemoteDepot/ChildA/...

Where MAIN is the parent and ChildA is a development child stream of MAIN. There are changes in both streams I need to reconcile by merging down from MAIN into ChildA, maybe make a few edits, then copy everything up from ChildA to MAIN.

I decide to clone //RemoteDepot/MAIN/.. to my personal server so I have a stream on my personal server called //stream/main/MAIN/... . While I can see all of the history from the remote server I do not have ChildA cloned in any way.

How do I copy a stream spec? Which stream spec(s) do I copy?

Thanks!!

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 639 posts

Posted 30 October 2018 - 04:16 PM

I'm guessing that copying the stream specs themselves is not important based on the way you're describing your setup, so ignore that part.  :)

Just add //RemoteDepot/ChildA to your remote spec (I think that's "p4 remote"?) and fetch, then run "p4 stream ChildA" to define ChildA as a child of MAIN so that you can switch/merge/etc.

Quote

I have a stream on my personal server called //stream/main/MAIN/...

FYI this seems wrong and you may have done something you didn't want to do.

#5 aneves

aneves

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 31 October 2018 - 07:09 PM

Hey, that worked!! I don't know what I did before but this worked perfectly!

I was able to "transfer" a pending merge from my remote server to my personal server, perform the merge, and push the merge back to the remote server. When I refreshed the remote server the merge arrow went away telling me that there's nothing else to merge.

Thanks again for the help!!





Also tagged with one or more of these keywords: dvcs, streams, personal server

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users