changeset 17849:6da47b655d97 stable

update: check for missing files with --check (issue3595)
author Matt Mackall <mpm@selenic.com>
date Mon, 22 Oct 2012 17:23:31 -0500
parents 66f0c78350ab
children 71c1513fd560
files mercurial/commands.py tests/test-merge5.t
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Oct 22 16:06:47 2012 -0500
+++ b/mercurial/commands.py	Mon Oct 22 17:23:31 2012 -0500
@@ -5894,7 +5894,7 @@
 
     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()
--- a/tests/test-merge5.t	Mon Oct 22 16:06:47 2012 -0500
+++ b/tests/test-merge5.t	Mon Oct 22 17:23:31 2012 -0500
@@ -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