It's all about the answers!

Ask a question

Migrating to RTC from Perforce without losing any history


Brian Green (5145) | asked Dec 19 '11, 9:48 p.m.
I'm investigating migrating to RTC from Perforce. Our Perforce repository has been around for 10+ years, has gone through a few reorganizations, and has a lot of branches (like 50+) that were created at different periods of time when the main line was organized differently.

Is it possible to easily import all of this into RTC without losing any history?

From what I've learned so far, it seems that the only way to branch a file and retain the history is to branch the file into another stream. Like, I wouldn't be able to import everything into one component of one stream and retain the branching history. I'd have to choose which branches were important, create streams for those, and lose the branching history for everything else. Is that correct?

5 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 20 '11, 8:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If the p42svn script ( http://p42svn.tigris.org/ ) works for you, then
you can do the import in 2 phases ... first P4 to SVN, and then use the
RTC SVN importer to bring the result into RTC.

I'm not quite sure what you mean by importing the branch history of a
file without creating multiple RTC streams (a P4 branch maps to an RTC
stream). That would be like trying to create branches in P4 using a
single P4 branch.

Cheers,
Geoff

On 12/19/2011 9:53 PM, greenb wrote:
I'm investigating migrating to RTC from Perforce. Our Perforce
repository has been around for 10+ years, has gone through a few
reorganizations, and has a lot of branches (like 50+) that were
created at different periods of time when the main line was organized
differently.

Is it possible to easily import all of this into RTC without losing
any history?

From what I've learned so far, it seems that the only way to branch a
file and retain the history is to branch the file into another
stream. Like, I wouldn't be able to import everything into one
component of one stream and retain the branching history. I'd have
to choose which branches were important, create streams for those,
and lose the branching history for everything else. Is that correct?

permanent link
Brian Green (5145) | answered Dec 21 '11, 3:39 p.m.
So is this correct?

1. The only way to branch in RTC is to create a new stream.
2. So, if I want to save the branching history of a file (like, have RTC know what the branching history is), I can't import everything into one component of one stream like what would happen if I imported a svn dump or a change set archive.

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 21 '11, 8:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
(1) In RTC, you create a branch whenever you checkin a version whose
predecessor version already has at least one successor version.
Creating a new stream is one way to make that happen, but you can also
create branching by doing parallel work in two different workspaces, or
even in a single workspace, by discarding a change set that modifies a
file and then making another modification to that file in a new change set.

(2) You can use the RTC API to create whatever branching structures you
want (no need to create any streams).

My earlier response was based on the assumption that after the import,
you'd want to be able to look at a particular P4 branch (by name) in RTC
.... the only way to do that is to create an RTC stream (or workspace)
.... otherwise all of the branches in the version history would be
anonymous (i.e., not have any name that you could refer to them by).

Cheers,
Geoff

On 12/21/2011 3:53 PM, greenb wrote:
So is this correct?

1. The only way to branch in RTC is to create a new stream.
2. So, if I want to save the branching history of a file (like, have
RTC know what the branching history is), I can't import everything
into one component of one stream like what would happen if I imported
a svn dump or a change set archive.

permanent link
Brian Green (5145) | answered Jan 03 '12, 4:01 p.m.
Thanks for the explanation!

One more question: is it possible to copy changes to a single file from one stream to another, or is it only possible to copy entire changesets? Like, in our Perforce repository, sometimes we have a changeset that touches a lot of files in a development branch, but then we cherry pick just a few of those file changes to merge into a release branch. Is something like that possible in RTC?

permanent link
Geoffrey Clemm (30.1k33035) | answered Jan 03 '12, 8:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If you regularly flow changes from the one stream to the other, then I
would use "reverse" to back out the changes you didn't want, i.e.:
- accept the change set,
- "reverse" the change set to create a reverse-patch
- remove the reverses that you don't want from the patch
- apply the remainder of the patch.

If you don't, regularly flow changes between those streams, then you can
just open the change set in the Pending Changes view, and then for each
of the files you want to bring over, just right click on that file and
select "Load". Once you have brought all the files you want, checkin
the Unresolved files, and deliver the resulting change set to your stream.

Cheers,
Geoff


On 1/3/2012 4:08 PM, greenb wrote:
Thanks for the explanation!

One more question: is it possible to copy changes to a single file
from one stream to another, or is it only possible to copy entire
changesets? Like, in our Perforce repository, sometimes we have a
changeset that touches a lot of files in a development branch, but
then we cherry pick just a few of those file changes to merge into a
release branch. Is something like that possible in RTC?

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.