monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: 0441b58e2b76c2aac899688f2f


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 0441b58e2b76c2aac899688f2feebc6ebd064268
Date: Sat, 20 Nov 2010 01:08:51 GMT

revision:            0441b58e2b76c2aac899688f2feebc6ebd064268
date:                2010-11-19T21:23:27
author:              address@hidden
branch:              net.venge.monotone
changelog:
fix monotone issue 101

* NEWS: note fix

* cmd_conflicts.cc (set_duplicate_name_conflict, set_first_conflict): 
  fix arg indexing
  (CMD resolve_first): improve help 

* tests/resolve_conflicts_all_resolutions/__driver__.lua: match previous
  change; add progress message

* tests/resolve_conflicts_duplicate_name/__driver__.lua: 
* tests/resolve_conflicts_orphaned_file/__driver__.lua: 
* tests/resolve_conflicts_content/__driver__.lua: test bad resolution
  identifier


manifest:
format_version "1"

new_manifest [e6b6d536b7648e9a46a7fc9fa76d8e05a9020f6a]

old_revision [af0b5d1b31f5f340c715c57364d3de5d7fec995f]

patch "NEWS"
 from [74bdf628c944221412f4acba031341616cc660ba]
   to [ec286f4ed73bd85c42a5e9cb4ff76d6f0141fca3]

patch "cmd_conflicts.cc"
 from [c9d3ecf7590fbe2436adb5b33813906aa8e4f53a]
   to [0c87cd90c1e90cbb312e51c2aa175acadf07bd20]

patch "tests/resolve_conflicts_all_resolutions/__driver__.lua"
 from [ccc947753602555e322d56497d64751796ba3236]
   to [f4dd26eefb2947afd411ab32f16146407ef5883f]

patch "tests/resolve_conflicts_content/__driver__.lua"
 from [7912acb9ca5802127db04a8f41a339836e565415]
   to [5177f9cdbaf41359eac0306e3814b074c8eb2d06]

patch "tests/resolve_conflicts_duplicate_name/__driver__.lua"
 from [195a80d22799634a6d5016e12af19c216d66b4ff]
   to [ad7475c98789724de1a8cfdb4fc3bafb440c9a60]

patch "tests/resolve_conflicts_orphaned_file/__driver__.lua"
 from [0a61e242c11bc9e4f9632e8e1c30d65709b885ce]
   to [ca1edc44c3348a1336c503e104ca849654020f3b]
============================================================
--- NEWS	74bdf628c944221412f4acba031341616cc660ba
+++ NEWS	ec286f4ed73bd85c42a5e9cb4ff76d6f0141fca3
@@ -12,6 +12,9 @@ XXX XXX XX XX:XX:XX UTC 2010
 
         Bugs fixed
 
+        - improve help, fix arg indexing in 'conflicts resolve_first'
+          (fixes monotone issue 101)
+        
         - add compatibility with Botan 1.9.9 and newer
           (fixes monotone issue 104)
 
============================================================
--- tests/resolve_conflicts_duplicate_name/__driver__.lua	195a80d22799634a6d5016e12af19c216d66b4ff
+++ tests/resolve_conflicts_duplicate_name/__driver__.lua	ad7475c98789724de1a8cfdb4fc3bafb440c9a60
@@ -50,6 +50,10 @@ check(mtn("conflicts", "show_first"), 0,
 -- Find out what the first unresolved conflict is
 check(mtn("conflicts", "show_first"), 0, nil, true)
 
+-- invalid resolution identifier
+check(mtn("conflicts", "resolve_first_left", "foo"), 1, nil, true)
+check(qgrep("'foo' is not a supported conflict resolution for duplicate_name", "stderr"))
+
 -- Retrieve Abe's version of checkout.sh, and pretend we did a manual
 -- merge, using our favorite merge tool. We put the files in the
 -- bookkeeping area, so mtn doesn't see them.
============================================================
--- tests/resolve_conflicts_content/__driver__.lua	7912acb9ca5802127db04a8f41a339836e565415
+++ tests/resolve_conflicts_content/__driver__.lua	5177f9cdbaf41359eac0306e3814b074c8eb2d06
@@ -39,6 +39,10 @@ check(samefilestd("conflicts-1", "_MTN/c
 check(indir("files", mtn("conflicts", "store", first, second)), 0, nil, nil)
 check(samefilestd("conflicts-1", "_MTN/conflicts"))
 
+-- invalid resolution identifier
+check(mtn("conflicts", "resolve_first", "foo"), 1, nil, true)
+check(samelines("stderr", { "mtn: misuse: 'foo' is not a supported conflict resolution for file_content"}))
+
 -- bar is the first conflict (alphabetical by file name); it is
 -- 'resolved_internal'. The rest are not resolved internal.
 --
============================================================
--- tests/resolve_conflicts_all_resolutions/__driver__.lua	ccc947753602555e322d56497d64751796ba3236
+++ tests/resolve_conflicts_all_resolutions/__driver__.lua	f4dd26eefb2947afd411ab32f16146407ef5883f
@@ -121,7 +121,8 @@ check(mtn("--rcfile=merge3_hook.lua", "c
 
 mkdir("_MTN/resolutions")
 check(mtn("--rcfile=merge3_hook.lua", "conflicts", "--conflicts-file=_MTN/conflicts-1", "resolve_first", "interactive", "_MTN/resolutions/interactive_file"), 0, true, true)
-check(samelines("stderr", { "mtn: lua: running merge3 hook" }))
+check(samelines("stderr", { "mtn: lua: running merge3 hook",
+                            "mtn: interactive merge result saved in '_MTN/resolutions/interactive_file'"}))
 
 check(mtn("conflicts", "--conflicts-file=_MTN/conflicts-1", "show_first"), 0, nil, true)
 canonicalize("stderr")
============================================================
--- cmd_conflicts.cc	c9d3ecf7590fbe2436adb5b33813906aa8e4f53a
+++ cmd_conflicts.cc	0c87cd90c1e90cbb312e51c2aa175acadf07bd20
@@ -197,7 +197,7 @@ enum side_t {left, right, neither};
 } // show_conflicts
 
 enum side_t {left, right, neither};
-static char const * const conflict_resolution_not_supported_msg = N_("%s is not a supported conflict resolution for %s");
+static char const * const conflict_resolution_not_supported_msg = N_("'%s' is not a supported conflict resolution for %s");
 
 // Call Lua merge3 hook to merge left_fid, right_fid, store result in result_path
 static bool
@@ -280,7 +280,7 @@ set_duplicate_name_conflict(resolve_conf
     }
   else
     E(false, origin::user,
-      F(conflict_resolution_not_supported_msg) % idx(args,1) % "duplicate_name");
+      F(conflict_resolution_not_supported_msg) % idx(args,0) % "duplicate_name");
 
 } //set_duplicate_name_conflict
 
@@ -349,7 +349,7 @@ set_first_conflict(database & db,
               else
                 {
                   E(false, origin::user,
-                    F(conflict_resolution_not_supported_msg) % idx(args,1) % "orphaned_node");
+                    F(conflict_resolution_not_supported_msg) % idx(args,0) % "orphaned_node");
                 }
               return;
             }
@@ -415,7 +415,7 @@ set_first_conflict(database & db,
                   // We don't allow the user to specify 'resolved_internal'; that
                   // is only done by automate show_conflicts.
                   E(false, origin::user,
-                    F(conflict_resolution_not_supported_msg) % idx(args,1) % "file_content");
+                    F(conflict_resolution_not_supported_msg) % idx(args,0) % "file_content");
                 }
               return;
             }
@@ -473,8 +473,8 @@ CMD(resolve_first, "resolve_first", "", 
 
 CMD(resolve_first, "resolve_first", "", CMD_REF(conflicts),
     N_("RESOLUTION"),
-    N_("Set the resolution for the first unresolved single-file conflict"),
-    "",
+    N_("Set the resolution for the first unresolved single-file conflict."),
+    "Use 'mtn conflicts show_first' to see possible resolutions.",
     options::opts::conflicts_opts)
 {
   database db(app);
============================================================
--- tests/resolve_conflicts_orphaned_file/__driver__.lua	0a61e242c11bc9e4f9632e8e1c30d65709b885ce
+++ tests/resolve_conflicts_orphaned_file/__driver__.lua	ca1edc44c3348a1336c503e104ca849654020f3b
@@ -37,6 +37,10 @@ check(
 "mtn: resolve_first drop\n" ..
 "mtn: resolve_first rename \"file_name\"\n" == readfile("stderr"))
 
+-- invalid resolution identifier
+check(mtn("conflicts", "resolve_first", "foo"), 1, nil, true)
+check(qgrep("'foo' is not a supported conflict resolution for orphaned_node", "stderr"))
+
 -- stuff/dir1 => dir1
 check(mtn("conflicts", "resolve_first", "rename", "dir1"), 0, nil, nil)
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]