hg copy usage

Thomas Arendsen Hein thomas at intevation.de
Thu Nov 2 10:59:22 CST 2006


* TK Soh <teekaysoh at gmail.com> [20061102 17:54]:
> On 11/2/06, Thomas Arendsen Hein <thomas at intevation.de> wrote:
> >hg copy SOURCE TARGET
> >echo "this file is derived from SOURCE" >> TARGET
> >hg commit -m "Added TARGET, which is SOURCE with small modifications."
> >hg pull from-a-repo-which-has-modifications-to-SOURCE
> >hg merge
> >
> >This will apply the modifications from upstream to SOURCE and to
> >TARGET.
> 
> That applies to changes to SOURCE in a remote repo. What about changes
> to SOURCE within the local repo after the commit? Does the changes in
> SOURCE propagate to TARGET?

Changes done after the copy of course don't propagate.

If you checkout a revision before the copy, make changes, commit,
and then merge heads, the changes should get applied to TARGET as
well.

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list