Checking for conflict before merge
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sat Nov 19 04:07:44 EST 2016
On 11/07/2016 02:48 PM, akos tajti wrote:
> Hi All,
>
> my problem: I have a repository with many forks. The forks are automatically merged to the blessed repo. I need to somehow check if merging a specific fork would introduce conflicts. I came up with this command sequence:
>
> * I run this in the blessed repo: hg incoming -b default --bundle /tmp/incoming.bundle FORK_URL (this will create a bundle with the incoming changesets)
> * then, again in the blessed repo, I run this command: hg -R /tmp/incoming.bundle merge -r tip -y --config ui.merge=internal:fail . this will show me the number of unresolved files (0, when there is no conflict)
note that internal:fail will fail any file that is touched on both side.
you could use internal:merge and file which can be automatically merge
will be reported as successful.
> * so far so good. My problem is that after these commands I have to clean the repository (hg update -C . )
>
> Is there a better solution for this. I don't really like the idea of running hg update programmatically.
I'm not sure there is a better way right now. Why is running `hg update`
an issue to you? (while the other command seems fine to you).
Cheers,
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list