dummy merge (two branches) for dummies
Uwe Brauer
oub at mat.ucm.es
Fri Aug 19 08:31:16 UTC 2016
>>> "Becker," == Becker, Mischa J <mischa.becker at kroger.com> writes:
Hi
Thanks very much!
> After that here are three example merges that keep foo changes:
> 1) hg update uwe
> hg merge foo --tool internal:other
> hg commit -m "Merge foo internal:other"
> 2) hg update foo
> hg debugsetparents uwe foo
> hg branch uwe
nitpicking that should be hg merge uwe ? :-D
> hg commit -m "Merge using debugsetparents"
> 3) hg update uwe
> hg merge foo --tool internal:other
> hg revert --all -r foo
> hg commit -m "Merge foo, discard uwe changes"
> Note: The contents of foo.txt is the same in all examples.
> In example 1, uwe changes to all files that foo knows about are
> discarded but new files uwe adds are kept. In example 2, uwe changes
> to files also changed by foo are discarded but all other uwe changes
> are kept. (See contents of uwe1.txt.)
Ok that difference is very important. Thanks to Simon the command
hg log -r "adds('.')" --template '{rev} {desc|firstline}\n{file_adds}\n\n'
Tells me
0 Uwe one
test.txt uwe1.txt
1 Foo two
foo.txt
3 Uwe four
uwe2.txt
That uwe2.txt was added after the last commit to the foo branch.
It is very important to be aware of this essential difference between
option 1 and 2, I might need both in different contexts.
Thanks again for this elaborate answer, I copied right away in my
README-HG file.
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3677 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160819/60301cf1/attachment.p7s>
More information about the Mercurial
mailing list