tell update to run only if there are no conflicts

Greg Ward greg at gerg.ca
Sat Apr 11 17:54:35 UTC 2015


On 11 April 2015, Lasse Kliemann said:
> Suppose I have changed some files in my working copy, then run
> 
> hg pull
> hg update
> 
> and the incoming changesets do not concern the files that I have changed,
> those are simply updated in the working copy, and my new parent will be the
> last changeset that I pulled in (not considering multiple branches now,
> which might make it more complicated, I haven't thought about that yet).

Note that you can still have conflicts in such a case: say the
incoming changesets add a required argument to an existing method and
update all existing callers. Your local change adds an additional call
site. Even though there is no *textual* conflict (within a file),
there's still a *semantic* conflict (across files) that must be
resolved.

IOW: if you have uncommitted changes, update *is* a merge, even for
users who don't know what "merge" means. This is equally true with CVS
and svn, FWIW.

Greg



More information about the Mercurial mailing list