changeset 3663:b4903debbe3b

abort if explicitly committed files are not found or not tracked
author Matt Mackall <mpm@selenic.com>
date Wed, 15 Nov 2006 23:59:39 -0600
parents f4dc02d7fb71
children 86d3f966201d
files mercurial/commands.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Nov 15 23:37:45 2006 -0600
+++ b/mercurial/commands.py	Wed Nov 15 23:59:39 2006 -0600
@@ -418,8 +418,15 @@
         cmdutil.addremove(repo, pats, opts)
     fns, match, anypats = cmdutil.matchpats(repo, pats, opts)
     if pats:
-        modified, added, removed = repo.status(files=fns, match=match)[:3]
+        status = repo.status(files=fns, match=match)
+        modified, added, removed, deleted, unknown = status[:5]
         files = modified + added + removed
+        for f in fns:
+            if f not in modified + added + removed:
+                if f in unknown:
+                    raise util.Abort(_("file %s not tracked!") % f)
+                else:
+                    raise util.Abort(_("file %s not found!") % f)
     else:
         files = []
     try: