hg resolve help lies

timeless timeless at gmail.com
Sun Oct 25 19:14:21 CDT 2009


Please feel free to change my commit message, I'm fairly annoyed.
Although, I should count my blessings, it could be worse, the help
could have been right....

Anyway, a test for this would be a good idea, but I'm not in a state
to write it.

cd /tmp ; rm -rf hgr; mkdir hgr; cd hgr; hg init; touch 0; hg add 0;
hg commit -m 0; hg cp 0 1; hg commit -m 1; hg up -r 0; echo a > 0; hg
commit -m 2; hg up -r 0; echo b > 0 ; hg commit -m 3; hg merge 1; hg
commit -m 4; hg up -r 1; hg merge 2; hg commit -m 5; hg merge 4; hg
cat -r 4 0 > 0; hg cat -r 5 1 > 1; cat 0 1; hg resolve --mark --all;
cat 0 1; hg commit -m done

This is the testcase. According to the current help, the commit should
fail. But no one wants that behavior.

# HG changeset patch
# User timeless at mozdev.org
# Date 1256515583 -7200
# Node ID 95ac1728b9259ae8f10c8d3d3a89b571193e7fed
# Parent  20b91f91f9cadfc2de79e7a2ecc07302b05ebca1
hg help resolve grossly mischaracterizes the --all switch

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

     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.
+    revisions preserved from the last update or merge.

     If a conflict is resolved manually, please note that the changes
     will be overwritten if the merge is retried with resolve. The
     -m/--mark switch should be used to mark the file as resolved.

+    You can specify a set of files to operate on, or use the -a/-all
+    switch to select all unresolved files.
+
     This command also allows listing resolved files and manually
     indicating whether or not files are resolved. All files must be
     marked as resolved before a commit is permitted.
@@ -3588,7 +3590,7 @@ table = {
          _('[OPTION]... SOURCE... DEST')),
     "resolve":
         (resolve,
-         [('a', 'all', None, _('remerge all unresolved files')),
+         [('a', 'all', None, _('select 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')),


More information about the Mercurial-devel mailing list