add support for --no-status to hg resolv

timeless timeless at gmail.com
Thu Oct 22 11:41:33 UTC 2009


# HG changeset patch
# User timeless <timeless at gmail.com>
# Date 1256219090 -7200
# Node ID 9fb95370e6423646b73b6b0958d1a965b3eb850e
# Parent  240043b605b8a14fb35416e77b32594a60fdb931
adding --no-status to resolve to match status

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2436,7 +2436,7 @@ def rename(ui, repo, *pats, **opts):
 def resolve(ui, repo, *pats, **opts):
     """retry file merges from a merge or update

-    This command will cleanly retry unresolved file merges using file
+    This command can cleanly retry unresolved file merges using file
     revisions preserved from the last update or merge. To attempt to
     resolve all unresolved files, use the -a/--all switch.

@@ -2454,7 +2454,7 @@ def resolve(ui, repo, *pats, **opts):
       R = resolved
     """

-    all, mark, unmark, show = [opts.get(o) for o in 'all mark unmark
list'.split()]
+    all, mark, unmark, show, nostatus = [opts.get(o) for o in 'all
mark unmark list no_status'.split()]

     if (show and (mark or unmark)) or (mark and unmark):
         raise util.Abort(_("too many options specified"))
@@ -2470,7 +2470,10 @@ def resolve(ui, repo, *pats, **opts):
     for f in ms:
         if m(f):
             if show:
-                ui.write("%s %s\n" % (ms[f].upper(), f))
+                if nostatus:
+                    ui.write("%s\n" % f)
+                else:
+                    ui.write("%s %s\n" % (ms[f].upper(), f))
             elif mark:
                 ms.mark(f, "r")
             elif unmark:
@@ -3474,7 +3477,8 @@ table = {
          [('a', 'all', None, _('remerge all unresolved files')),
           ('l', 'list', None, _('list state of files needing merge')),
           ('m', 'mark', None, _('mark files as resolved')),
-          ('u', 'unmark', None, _('unmark files as resolved'))]
+          ('u', 'unmark', None, _('unmark files as resolved')),
+          ('n', 'no-status', None, _('hide status prefix'))]
           + walkopts,
           _('[OPTION]... [FILE]...')),
     "revert":



More information about the Mercurial-devel mailing list