Commits

Anonymous committed f00fbb1

In cleanup(), always use revert.

Currently, you get different behaviour if you specify filenames or
patterns on the command-line: revert is verbose and leaves behind
.orig files, whereas hg.clean() does neither.

This change gives consistent behaviour regardless of command-line
args.

Comments (0)

Files changed (1)

         '''removes all changes from the working copy and makes it so
         there isn't a patch applied'''
         node = repo.dirstate.parents()[0]
-        if not pats and not opts.get('include') and not opts.get('exclude'):
-            hg.clean(repo, node, False)
-        else:
-            opts['date'] = None
-            opts['all'] = True # Just to trick revert
-            opts['rev'] = node
-            commands.revert(self.ui, repo, *pats, **opts)
+        opts['date'] = None
+        opts['all'] = True # Just to trick revert
+        opts['rev'] = node
+        commands.revert(self.ui, repo, *pats, **opts)
         self.applied = ''
         self.persiststate()