Mercurial > hg
comparison mercurial/commands.py @ 16095:3eab42088be4
update: just merge unknown file collisions
The unknown file collision rule was introduced as an extension of the
"should be clean when merging" rule. Unfortunately, it got applied to
the normal update path, which should be happy to merge local changes.
This patch gives us merges for unknown file collisions on update,
while preserving abort for merge and update -c.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 09 Feb 2012 17:54:47 -0600 |
parents | 914bc95e227b |
children | 8dc573a9c5e5 |
comparison
equal
deleted
inserted
replaced
16094:0776a6cababe | 16095:3eab42088be4 |
---|---|
5721 c = repo[None] | 5721 c = repo[None] |
5722 if c.modified() or c.added() or c.removed(): | 5722 if c.modified() or c.added() or c.removed(): |
5723 raise util.Abort(_("uncommitted local changes")) | 5723 raise util.Abort(_("uncommitted local changes")) |
5724 if not rev: | 5724 if not rev: |
5725 rev = repo[repo[None].branch()].rev() | 5725 rev = repo[repo[None].branch()].rev() |
5726 mergemod._checkunknown(repo, repo[None], repo[rev]) | |
5726 | 5727 |
5727 if clean: | 5728 if clean: |
5728 ret = hg.clean(repo, rev) | 5729 ret = hg.clean(repo, rev) |
5729 else: | 5730 else: |
5730 ret = hg.update(repo, rev) | 5731 ret = hg.update(repo, rev) |