[issue1709] Can't fork old revisions
Karsten Düsterloh
mercurial-bugs at selenic.com
Wed Jun 24 20:35:46 UTC 2009
New submission from Karsten Düsterloh <mnyromyr at tprac.de>:
You can't fork from an old revision of a file, because any merge will
automatically drag back in any later revisions. Just doing an OS-based copy
before newly adding the file is no solution, because it will lose the file history.
=> We need an option to hg copy to tell to not drag in later revision when merging.
Example use case: refactoring.
file X rev. 1: code A
file X rev. 5: code A, code B
Now, in a different part of the repo, file Y is needed:
file Y: code A, code C
Unfortunately, for some $sad_reason, factoring out code A is not possible, so to
reflect the common heritage, Y shall be created as:
file Y rev 1: <fork of file X rev. 1>
file Y rev 6: code A, code C
(You can get a new head with the old revision by doing hg up -r 1; hg copy X Y;
hg ci; hg up -r tip; hg merge; hg ci, but this will result in
file Y rev 1: <fork of file X rev. 1>
file Y rev 5: code A, code B
file Y rev 6: code A, code C
which is not desirable.)
----------
messages: 9752
nosy: mnyromyr
priority: bug
status: unread
title: Can't fork old revisions
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1709>
____________________________________________________
More information about the Mercurial-devel
mailing list