question on SVN conversion
Kastner Masilko, Friedrich
kastner-masilko at at.festo.com
Mon May 19 15:26:16 UTC 2014
> From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of David Wink
>
> I have a repo that is layed out like the following:
> <snip>
>
> I want to convert this over to 1 mercurial repository.
> I think that I would put each projectx.x as a branch in the repository and then make the latest
> projectX.X as the default.
> Can this be done with hg convert?
I don't think that a one-go conversion is worth the effort of configuring and splicemap-tinkering here. I'd suggest converting every X.Y "project" separately first, check the conversion to be correct regarding branches and tags, then manually link them together by means of grafting commits. You can pull various repositories into one despite them being unrelated by means of the --force option.
Let's e.g. say you have this logical history: [a node is (X.Y.trunkrev.branch1rev.branch2rev.branchXrev..)]
(1.0.1)-+-(1.0.2)---(1.0.3)---(1.1.1)---(1.1.2)-+-(1.2.1)---(2.0.1)---(2.0.2)
........|.......................................|............................
........+-(1.0.1.1)-+-(1.0.1.2).................+-(1.1.3)-+-(1.1.4)..........
....................|.....................................|..................
....................+-(1.0.1.1.1).........................+-(1.1.4.1)........
Converting every X.Y path separately would give you these HG repos:
1.0:
(1.0.1)-+-(1.0.2)---(1.0.3)......
........|........................
........+-(1.0.1.1)-+-(1.0.1.2)..
....................|............
....................+-(1.0.1.1.1)
1.1:
(1.0.3)---(1.1.1)---(1.1.2)-+-(1.1.3)-+-(1.1.4)..
......................................|..........
......................................+-(1.1.4.1)
1.2:
(1.1.2)---(1.2.1)
2.0:
(1.2.1)---(2.0.1)---(2.0.2)
The first commit of 1.1, 1.2 and 2.0, respectively, are there due to the first commit supposedly being a copy operation of a given commit in the previous X.Y. If you now pull 1.1, 1.2 and 2.0 via --force into 1.0, you will get 4 roots with 4 mainlines. You could then graft (or rebase) e.g. (1.1.1) and descendants onto (1.0.3), then (1.2.1) onto (1.1.2), then (2.0.1) onto (1.2.1). Doing so, only .hgtags might report conflicts, which are easily solved with simply taking both sides. After doing the operation, strip remaining old "mainlines" from the repo.
regards,
Fritz
Development Software Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien
Firmenbuch Wien
FN 38435y
UID: ATU14650108
Tel: +43(1)91075-198
Fax:
www.festo.at
Der Inhalt dieser E-Mail und moeglicher Anhaenge sind ausschliesslich fuer den bezeichneten Adressaten bestimmt.
Jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail und
moeglicher Anhaenge durch unberechtigte Dritte ist unzulaessig. Wir bitten Sie, sich mit dem Absender der E-Mail in
Verbindung zu setzen, falls Sie nicht der Adressat dieser E-Mail sind sowie das Material von Ihrem Computer zu loeschen.
This e-mail and any attachments are confidential and intended solely for the addressee. The perusal, publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not the intended recipient of this
e-mail, please delete it and immediately notify the sender.
More information about the Mercurial
mailing list