hg diff | patch
Brendan Cully
brendan at kublai.com
Fri Jun 12 13:56:17 CDT 2009
On Friday, 12 June 2009 at 08:19, Lasse Kliemann wrote:
> Suppose there are branches b1 and b2, both containing files 'f'
> and 'g'. Development runs in parallel in both branches. At some
> time, I wish to merge changes done to 'g' in branch b2 over to
> the same file in branch b1, but *not* the changes done on 'f'.
> Best I came up with is:
>
> hg co b1
> hg diff -r b1 -r -b2 g | patch
> hg ci -m "merged 'g' from b2"
>
> Is there a better way to do it? It looks to me like approaches
> like the Transplant extension always work on complete changesets
> and hence cannot be used for this purpose.
Transplant does have a filter option, but it's not that
convenient. You might be able to get the convert extension to work for
you with some clever use of filemap.
More information about the Mercurial
mailing list