copy a single file from one branch to another| pseudo conflict in a merge
Uwe Brauer
oub at mat.ucm.es
Mon Jul 15 07:01:56 UTC 2019
> On Sun, 14 Jul 2019 01:36:53 -0400, Uwe Brauer <oub at mat.ucm.es> wrote:
> Instead, you can merge like you normally do. If you can't figure out
> how to properly reconcile a file and you know you want to sync it to
> some previously committed state, just save it in meld so that it is
> marked as resolved. But before you commit, run this:
> hg revert -r feature_branch file1
Aha this is truly the fastest solution! Thanks!
(Before receiving your email I though of doing this step (reverting)
_before_ the merge, but then I have to commit which is one step more).
I did not realize that saving in meld marks it as resolved, even if I
did not do anything.
By the way, what to do think of adding some features to merge,
Commit for example allows me to exclude or include files, so maybe merge
could offer the option of selecting files the same way, for example
hg up default
hg merge feature -f file1 -r default
or
hg merge feature -f file1 -r feature
Which would mean for file1 don't merge but take either the version of
the default or the feature branch.
(The questions is what syntax to use if you have a bunch of files but I
would approach this the same way as
hg commit -X
So what do you think? Do you consider such a feature as useful?
I do.
Regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5025 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20190715/3a371fa2/attachment.p7s>
More information about the Mercurial
mailing list