diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5894,7 +5894,7 @@ def update(ui, repo, node=None, rev=None if check: c = repo[None] - if c.dirty(merge=False, branch=False): + if c.dirty(merge=False, branch=False, missing=True): raise util.Abort(_("uncommitted local changes")) if rev is None: rev = repo[repo[None].branch()].rev() diff --git a/tests/test-merge5.t b/tests/test-merge5.t --- a/tests/test-merge5.t +++ b/tests/test-merge5.t @@ -16,6 +16,11 @@ $ hg update abort: crosses branches (merge branches or update --check to force update) [255] + $ rm b + $ hg update -c + abort: uncommitted local changes + [255] + $ hg revert b $ hg update -c 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mv a c