revert: handle unknown files through status
This will allow us to drop the code dedicated to this special case.
--- a/mercurial/cmdutil.py Tue Jun 24 23:55:43 2014 +0100
+++ b/mercurial/cmdutil.py Wed Jun 25 00:01:30 2014 +0100
@@ -2378,11 +2378,14 @@
# Find status of all file in `names`.
m = scmutil.matchfiles(repo, names)
- changes = repo.status(node1=node, match=m, clean=True)
+ changes = repo.status(node1=node, match=m,
+ unknown=True, ignored=True, clean=True)
modified = set(changes[0])
added = set(changes[1])
removed = set(changes[2])
- _deleted = set(changes[3])
+ _deleted = set(changes[3])
+ unknown = set(changes[4])
+ unknown.update(changes[5])
clean = set(changes[6])
# split between files known in target manifest and the others
@@ -2471,6 +2474,7 @@
'remove': ([], removeforget),
'undelete': ([], _('undeleting %s\n')),
'noop': (None, _('no changes needed to %s\n')),
+ 'unknown': (None, _('file not managed: %s\n')),
}
@@ -2489,6 +2493,7 @@
(removed, actions['add'], backup),
(dsremoved, actions['undelete'], backup),
(clean, actions['noop'], discard),
+ (unknown, actions['unknown'], discard),
)
for abs, (rel, exact) in sorted(names.items()):