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.string-sanitization: 4e2628


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.string-sanitization: 4e26284d2157ddab4a34399081bb814ed6c1759c
Date: Tue, 1 Mar 2011 02:40:44 +0100 (CET)

revision:            4e26284d2157ddab4a34399081bb814ed6c1759c
date:                2011-03-01T00:53:35
author:              address@hidden
branch:              net.venge.monotone.string-sanitization
changelog:
* src/*.{hh,cc}: sanitize more quotations and fix a couple of unneeded
  extra line endings and missing capitalization
* src/paths.hh: define bookkeeping_resolutions_dir and
  bookkeeping_conflicts_file once and for all here...
* src/options_list.hh, src/cmd_conflicts, src/work.cc:
  ...and use these defined globals for (option) help texts and
  functionality

manifest:
format_version "1"

new_manifest [8f8b82e2b463a445fbaaeeca026b639fd2e1ee4b]

old_revision [fc4e68d3f3a44f72e589bded36693d8464bfc4f3]

patch "src/cmd_conflicts.cc"
 from [fe887aac3fd84b1048360551dd8c8638d059ea7d]
   to [ad9dc74c27d4d8c50a74e5825ec9e0a12cdc1b09]

patch "src/cmd_merging.cc"
 from [98408f1a05aecbe60293c0607be8f6ae65f83940]
   to [31b3be7d444652ec5ac6d937a987c6a65157c313]

patch "src/options_list.hh"
 from [4af93dbcc45e76d732d073ced7ce21d20472cd00]
   to [3b758ede56a0a9fbd435f5eb5d5c1d9dd4418ca0]

patch "src/packet.cc"
 from [c7972e5821369ca4d8279fb2e7d62196fb06645f]
   to [f61360ed2524fdf53411bd24d022a2a3c9e6e9c7]

patch "src/paths.hh"
 from [52cf28b7d0b27dc3dcc58086196d682c73129c8d]
   to [2939f11db21e23d68530ed7415b9bdfa8dfd5a20]

patch "src/pcrewrap.cc"
 from [53efd25cf048ddb118c0c21d413be62b57fe68e0]
   to [7f5bd4e7d8d9e02f2b0271fa9a0f64dcbce2467d]

patch "src/rcs_import.cc"
 from [332bdeb73dfd9e4e64f533bd930c9d6fdc7299ec]
   to [c2d6d57e4896d8c3e53821e7619933029c83f7e7]

patch "src/revision.cc"
 from [e646c35dae34ea0399ec89c3a86fff6088415efd]
   to [c4c2ae8c94e1bbe97952f8601fe8edf4f36af18e]

patch "src/safe_map.hh"
 from [72cfed654bd458c527b1abef1a691ab3f9ebfb4b]
   to [d6d0b1e34fd93bc95a47f65f48b3f652e6034ee5]

patch "src/selectors.cc"
 from [8325a670b116d87a325075ebe75bb20dbced8de4]
   to [3efba0ce3139290b4088cea0d6e82a912565471e]

patch "src/transforms.cc"
 from [5ddd45879695306827570bd595789564990540fd]
   to [cdfb6854ef4992faba21074145f3c8269b845b11]

patch "src/ui.cc"
 from [08a1162f01fedf3ebaa2c6ff2fcb80fcf8c08180]
   to [8bdaebf0da3e90cbe0026d140c2000e92998693f]

patch "src/work.cc"
 from [7973e15b907a675216583f414415738a14f4da00]
   to [fdfc68740e9492e7fa0c4651e0759de7a231c1c9]
============================================================
--- src/packet.cc	c7972e5821369ca4d8279fb2e7d62196fb06645f
+++ src/packet.cc	f61360ed2524fdf53411bd24d022a2a3c9e6e9c7
@@ -332,7 +332,7 @@ namespace
         privkey_packet(args, body);
       else
         {
-          W(F("unknown packet type: '%s'") % type);
+          W(F("unknown packet type '%s'") % type);
           return;
         }
       ++count;
============================================================
--- src/rcs_import.cc	332bdeb73dfd9e4e64f533bd930c9d6fdc7299ec
+++ src/rcs_import.cc	c2d6d57e4896d8c3e53821e7619933029c83f7e7
@@ -711,10 +711,10 @@ test_parse_rcs_file(system_path const & 
   I(! filename.empty());
   assert_path_is_file(filename);
 
-  P(F("parsing RCS file %s") % filename);
+  P(F("parsing RCS file '%s'") % filename);
   rcs_file r;
   parse_rcs_file(filename.as_external(), r);
-  P(F("parsed RCS file %s OK") % filename);
+  P(F("parsed RCS file '%s' OK") % filename);
 }
 
 
@@ -903,11 +903,11 @@ public:
           }
         catch (oops const & o)
           {
-            W(F("error reading RCS file %s: %s") % file % o.what());
+            W(F("error reading RCS file '%s': %s") % file % o.what());
           }
       }
     else
-      L(FL("skipping non-RCS file %s") % file);
+      L(FL("skipping non-RCS file '%s'") % file);
   }
   virtual ~cvs_tree_walker() {}
 };
@@ -1207,8 +1207,8 @@ import_cvs_repo(project_t & project,
 
 {
   E(!directory_exists(cvsroot / "CVSROOT"), origin::user,
-    F("%s appears to be a CVS repository root directory\n"
-      "try importing a module instead, with 'cvs_import %s/<module_name>")
+    F("'%s' appears to be a CVS repository root directory\n"
+      "try importing a module instead, with 'cvs_import %s/<module_name>'")
     % cvsroot % cvsroot);
 
   cvs_history cvs;
============================================================
--- src/transforms.cc	5ddd45879695306827570bd595789564990540fd
+++ src/transforms.cc	cdfb6854ef4992faba21074145f3c8269b845b11
@@ -81,10 +81,10 @@ error_in_transform(Botan::Exception & e,
 
       E(false, caused_by,
         F("%s\n"
-          "this may be due to a memory glitch, data corruption during\n"
+          "This may be due to a memory glitch, data corruption during\n"
           "a network transfer, corruption of your database or workspace,\n"
-          "or a bug in monotone.  if the error persists, please contact\n"
-          "%s for assistance.\n")
+          "or a bug in monotone.  If the error persists, please report\n"
+          "it to '%s'.")
         % w % PACKAGE_BUGREPORT);
     }
   else
============================================================
--- src/work.cc	7973e15b907a675216583f414415738a14f4da00
+++ src/work.cc	fdfc68740e9492e7fa0c4651e0759de7a231c1c9
@@ -225,7 +225,7 @@ workspace::get_work_rev(revision_t & rev
   catch(exception & e)
     {
       E(false, origin::system,
-        F("workspace is corrupt: reading %s: %s")
+        F("workspace is corrupt: reading '%s': %s")
         % rev_path % e.what());
     }
 
@@ -469,7 +469,7 @@ read_options_file(any_path const & optsp
     }
   catch (exception & e)
     {
-      W(F("Failed to read options file %s: %s") % optspath % e.what());
+      W(F("Failed to read options file '%s': %s") % optspath % e.what());
       return;
     }
 
@@ -518,11 +518,11 @@ read_options_file(any_path const & optsp
           opts.key_dir_given = true;
         }
       else
-        W(F("unrecognized key '%s' in options file %s - ignored")
+        W(F("unrecognized key '%s' in options file '%s' - ignored")
           % opt % optspath);
     }
   E(src.lookahead == EOF, src.made_from,
-    F("Could not parse entire options file %s") % optspath);
+    F("Could not parse entire options file '%s'") % optspath);
 }
 
 static void
@@ -557,7 +557,7 @@ write_options_file(bookkeeping_path cons
     }
   catch(exception & e)
     {
-      W(F("Failed to write options file %s: %s") % optspath % e.what());
+      W(F("Failed to write options file '%s': %s") % optspath % e.what());
     }
 }
 
@@ -1088,13 +1088,13 @@ addition_builder::add_nodes_for(file_pat
   if (ros.has_node(path))
     {
       E(is_dir_t(ros.get_node(path)), origin::user,
-        F("cannot add %s, because %s is recorded as a file "
+        F("cannot add '%s', because '%s' is recorded as a file "
           "in the workspace manifest") % goal % path);
       return;
     }
 
   add_nodes_for(path.dirname(), goal);
-  P(F("adding %s to workspace manifest") % path);
+  P(F("adding '%s' to workspace manifest") % path);
 
   node_id nid = the_null_node;
   switch (get_path_status(path))
@@ -1184,14 +1184,14 @@ addition_builder::visit_file(file_path c
 {
   if ((respect_ignore && work.ignore_file(path)) || db.is_dbfile(path))
     {
-      P(F("skipping ignorable file %s") % path);
+      P(F("skipping ignorable file '%s'") % path);
       return;
     }
 
   if (ros.has_node(path))
     {
       if (!path.empty())
-        P(F("skipping %s, already accounted for in workspace") % path);
+        P(F("skipping '%s', already accounted for in workspace") % path);
       return;
     }
 
@@ -1347,7 +1347,7 @@ editable_working_tree::drop_detached_nod
   map<bookkeeping_path, file_path>::const_iterator i
     = rename_add_drop_map.find(pth);
   I(i != rename_add_drop_map.end());
-  P(F("dropping %s") % i->second);
+  P(F("dropping '%s'") % i->second);
   safe_erase(rename_add_drop_map, pth);
   delete_file_or_dir_shallow(pth);
 }
@@ -1358,7 +1358,7 @@ editable_working_tree::create_dir_node()
   node_id nid = next_nid++;
   bookkeeping_path pth = path_for_detached_nid(nid);
   require_path_is_nonexistent(pth,
-                              F("path %s already exists") % pth);
+                              F("path '%s' already exists") % pth);
   mkdir_p(pth);
   return nid;
 }
@@ -1369,7 +1369,7 @@ editable_working_tree::create_file_node(
   node_id nid = next_nid++;
   bookkeeping_path pth = path_for_detached_nid(nid);
   require_path_is_nonexistent(pth,
-                              F("path %s already exists") % pth);
+                              F("path '%s' already exists") % pth);
   file_data dat;
   source.get_version(content, dat);
   write_data(pth, dat.inner());
@@ -1387,11 +1387,11 @@ editable_working_tree::attach_node(node_
   if (i != rename_add_drop_map.end())
     {
       if (messages)
-        P(F("renaming %s to %s") % i->second % dst_pth);
+        P(F("renaming '%s' to '%s'") % i->second % dst_pth);
       safe_erase(rename_add_drop_map, src_pth);
     }
   else if (messages)
-     P(F("adding %s") % dst_pth);
+     P(F("adding '%s'") % dst_pth);
 
   if (dst_pth == file_path())
     {
@@ -1428,7 +1428,7 @@ editable_working_tree::apply_delta(file_
   calculate_ident(pth, curr_id);
   E(curr_id == old_id, origin::system,
     F("content of file '%s' has changed, not overwriting") % pth);
-  P(F("updating %s") % pth);
+  P(F("updating '%s'") % pth);
 
   file_data dat;
   source.get_version(new_id, dat);
@@ -1603,7 +1603,7 @@ move_conflicting_paths_into_bookkeeping(
   // now().as_iso_8601_extended to eliminate the colons, or some appropriate
   // format for now().as_formatted_localtime would be simple and
   // probably adequate.
-  bookkeeping_path leftover_path = bookkeeping_root / "resolutions";
+  bookkeeping_path leftover_path = bookkeeping_resolutions_dir;
 
   mkdir_p(leftover_path);
 
@@ -1624,7 +1624,7 @@ move_conflicting_paths_into_bookkeeping(
       else
         I(false);
 
-      P(F("moved conflicting path %s to %s") % *i % new_path);
+      P(F("moved conflicting path '%s' to '%s'") % *i % new_path);
     }
 }
 
@@ -1889,7 +1889,7 @@ workspace::perform_deletions(database & 
         F("unable to drop the root directory"));
 
       if (!new_roster.has_node(name))
-        P(F("skipping %s, not currently tracked") % name);
+        P(F("skipping '%s', not currently tracked") % name);
       else
         {
           const_node_t n = new_roster.get_node(name);
@@ -1899,7 +1899,7 @@ workspace::perform_deletions(database & 
               if (!d->children.empty())
                 {
                   E(recursive, origin::user,
-                    F("cannot remove %s/, it is not empty") % name);
+                    F("cannot remove '%s/', it is not empty") % name);
                   for (dir_map::const_iterator j = d->children.begin();
                        j != d->children.end(); ++j)
                     todo.push_front(name / j->first);
@@ -1914,7 +1914,7 @@ workspace::perform_deletions(database & 
                   if (directory_empty(name))
                     delete_file_or_dir_shallow(name);
                   else
-                    W(F("directory %s not empty - "
+                    W(F("directory '%s' not empty - "
                         "it will be dropped but not deleted") % name);
                 }
               else
@@ -1925,11 +1925,11 @@ workspace::perform_deletions(database & 
                   if (file->content == fid)
                     delete_file_or_dir_shallow(name);
                   else
-                    W(F("file %s changed - "
+                    W(F("file '%s' changed - "
                         "it will be dropped but not deleted") % name);
                 }
             }
-          P(F("dropping %s from workspace manifest") % name);
+          P(F("dropping '%s' from workspace manifest") % name);
           new_roster.drop_detached_node(new_roster.detach_node(name));
         }
       todo.pop_front();
@@ -1973,14 +1973,14 @@ workspace::perform_rename(database & db,
         F("cannot rename the workspace root (try '%s pivot_root' instead)")
         % prog_name);
       E(new_roster.has_node(src), origin::user,
-        F("source file %s is not versioned") % src);
+        F("source file '%s' is not versioned") % src);
 
       if (src == dst || dst.is_beneath_of(src))
         {
           if (get_path_status(dst) == path::directory)
-            W(F("cannot move `%s' to a subdirectory of itself, `%s/%s'") % src % dst % src);
+            W(F("cannot move '%s' to a subdirectory of itself, '%s/%s'") % src % dst % src);
           else
-            W(F("`%s' and `%s' are the same file") % src % dst);
+            W(F("'%s' and '%s' are the same file") % src % dst);
         }
       else
         {
@@ -1996,7 +1996,7 @@ workspace::perform_rename(database & db,
           // mtn mv foo bar/foo where bar doesn't exist
           file_path parent = dst.dirname();
           E(get_path_status(parent) == path::directory, origin::user,
-            F("destination path's parent directory %s/ doesn't exist") % parent);
+            F("destination path's parent directory '%s/' doesn't exist") % parent);
 
           renames.insert(make_pair(src, dpath));
           add_parent_dirs(db, nis, *this, dpath, new_roster);
@@ -2013,7 +2013,7 @@ workspace::perform_rename(database & db,
       //    mtn mv --bookkeep-only foo bar
 
       E(get_path_status(dst) == path::directory, origin::user,
-        F("destination %s/ is not a directory") % dst);
+        F("destination '%s/' is not a directory") % dst);
 
       for (set<file_path>::const_iterator i = srcs.begin();
            i != srcs.end(); i++)
@@ -2022,7 +2022,7 @@ workspace::perform_rename(database & db,
             F("cannot rename the workspace root (try '%s pivot_root' instead)")
             % prog_name);
           E(new_roster.has_node(*i), origin::user,
-            F("source file %s is not versioned") % *i);
+            F("source file '%s' is not versioned") % *i);
 
           file_path d = dst / i->basename();
           if (bookkeep_only &&
@@ -2039,12 +2039,12 @@ workspace::perform_rename(database & db,
               d = dst / i->basename();
 
               E(!new_roster.has_node(d), origin::user,
-                F("destination %s already exists in the workspace manifest") % d);
+                F("destination '%s' already exists in the workspace manifest") % d);
             }
 
           if (*i == dst || dst.is_beneath_of(*i))
             {
-              W(F("cannot move `%s' to a subdirectory of itself, `%s/%s'")
+              W(F("cannot move '%s' to a subdirectory of itself, '%s/%s'")
                 % *i % dst % *i);
             }
           else
@@ -2062,7 +2062,7 @@ workspace::perform_rename(database & db,
     {
       node_id nid = new_roster.detach_node(i->first);
       new_roster.attach_node(nid, i->second);
-      P(F("renaming %s to %s in workspace manifest") % i->first % i->second);
+      P(F("renaming '%s' to '%s' in workspace manifest") % i->first % i->second);
     }
 
   parent_map parents;
@@ -2087,16 +2087,16 @@ workspace::perform_rename(database & db,
           }
         else if (!have_src && !have_dst)
           {
-            W(F("%s doesn't exist in workspace, skipping") % s);
+            W(F("'%s' doesn't exist in workspace, skipping") % s);
           }
         else if (have_src && have_dst)
           {
-            W(F("destination %s already exists in workspace, "
+            W(F("destination '%s' already exists in workspace, "
                 "skipping filesystem rename") % d);
           }
         else
           {
-            W(F("%s doesn't exist in workspace and %s does, "
+            W(F("'%s' doesn't exist in workspace and '%s' does, "
                 "skipping filesystem rename") % s % d);
           }
       }
@@ -2123,7 +2123,7 @@ workspace::perform_pivot_root(database &
     F("proposed new root directory '%s' is not a directory") % new_root);
   {
     E(!old_roster.has_node(new_root / bookkeeping_root_component), origin::user,
-      F("proposed new root directory '%s' contains illegal path %s")
+      F("proposed new root directory '%s' contains illegal path '%s'")
       % new_root % bookkeeping_root);
   }
 
@@ -2235,7 +2235,7 @@ workspace::perform_content_update(roster
   delete_dir_shallow(detached);
 
   if (moved_conflicting)
-    P(F("moved some conflicting files into %s/%s") % bookkeeping_root % "resolutions");
+    P(F("moved some conflicting files into '%s'") % bookkeeping_resolutions_dir);
 }
 
 // Local Variables:
============================================================
--- src/ui.cc	08a1162f01fedf3ebaa2c6ff2fcb80fcf8c08180
+++ src/ui.cc	8bdaebf0da3e90cbe0026d140c2000e92998693f
@@ -656,9 +656,9 @@ user_interface::fatal(string const & fat
 user_interface::fatal(string const & fatal)
 {
   inform(F("fatal: %s\n"
-           "this is almost certainly a bug in monotone.\n"
-           "please send this error message, the output of '%s version --full',\n"
-           "and a description of what you were doing to <%s>.")
+           "This is almost certainly a bug in monotone.\n"
+           "Please report this error message, the output of '%s version --full',\n"
+           "and a description of what you were doing to '%s'.")
          % fatal % prog_name % PACKAGE_BUGREPORT);
   global_sanity.dump_buffer();
 }
@@ -669,9 +669,9 @@ user_interface::fatal_db(string const & 
 user_interface::fatal_db(string const & fatal)
 {
   inform(F("fatal: %s\n"
-           "this is almost certainly a bug in monotone.\n"
-           "please send this error message, the output of '%s version --full',\n"
-           "and a description of what you were doing to <%s>.\n"
+           "This is almost certainly a bug in monotone.\n"
+           "Please report this error message, the output of '%s version --full',\n"
+           "and a description of what you were doing to '%s'.\n"
            "This error appears to have been triggered by something in the\n"
            "database you were using, so please preserve it in case it can\n"
            "help in finding the bug.")
============================================================
--- src/revision.cc	e646c35dae34ea0399ec89c3a86fff6088415efd
+++ src/revision.cc	c4c2ae8c94e1bbe97952f8601fe8edf4f36af18e
@@ -376,8 +376,8 @@ parse_revision(basic_io::parser & parser
   parser.esym(syms::format_version);
   parser.str(tmp);
   E(tmp == "1", parser.tok.in.made_from,
-    F("encountered a revision with unknown format, version '%s'\n"
-      "I only know how to understand the version '1' format\n"
+    F("encountered a revision with unknown format, version %s\n"
+      "I only know how to understand the version 1 format\n"
       "a newer version of monotone is required to complete this operation")
     % tmp);
   parser.esym(syms::new_manifest);
============================================================
--- src/selectors.cc	8325a670b116d87a325075ebe75bb20dbced8de4
+++ src/selectors.cc	3efba0ce3139290b4088cea0d6e82a912565471e
@@ -149,7 +149,7 @@ string preprocess_date_for_selector(stri
   if (lua.hook_exists("expand_date"))
     {
       E(lua.hook_expand_date(sel, tmp), origin::user,
-        F("selector '%s' is not a valid date\n") % sel);
+        F("selector '%s' is not a valid date") % sel);
     }
   else
     {
@@ -165,11 +165,11 @@ string preprocess_date_for_selector(stri
   else if (tmp.size()<11 && !equals)
     tmp += "T00:00:00";
   E(tmp.size()==19 || equals, origin::user,
-    F("selector '%s' is not a valid date (%s)") % sel % tmp);
+    F("selector '%s' is not a valid date (internally completed to '%s')") % sel % tmp);
 
   if (sel != tmp)
     {
-      P (F ("expanded date '%s' -> '%s'\n") % sel % tmp);
+      P(F("expanded date '%s' -> '%s'") % sel % tmp);
       sel = tmp;
     }
   if (equals && sel.size() < 19)
@@ -835,7 +835,7 @@ shared_ptr<selector> selector::create(op
               shared_ptr<selector> lhs = idx(items, items.size() - 3).sel;
               shared_ptr<selector> rhs = idx(items, items.size() - 1).sel;
               E(lhs, origin::user,
-                F("selector '%s is invalid, because there is a '%s' someplace it shouldn't be")
+                F("selector '%s' is invalid, because there is a '%s' someplace it shouldn't be")
                 % orig % op);
               shared_ptr<or_selector> lhs_as_or = boost::dynamic_pointer_cast<or_selector>(lhs);
               shared_ptr<and_selector> lhs_as_and = boost::dynamic_pointer_cast<and_selector>(lhs);
============================================================
--- src/paths.hh	52cf28b7d0b27dc3dcc58086196d682c73129c8d
+++ src/paths.hh	2939f11db21e23d68530ed7415b9bdfa8dfd5a20
@@ -97,7 +97,7 @@
 //
 //       all this means that when you want to print out a path, you usually
 //       want to just say:
-//           F("my path is %s") % my_path
+//           F("my path is '%s'") % my_path
 //       i.e., nothing fancy necessary, for purposes of F() just treat it like
 //       it were a string
 
@@ -351,6 +351,8 @@ private:
 
 #define bookkeeping_root (bookkeeping_path("_MTN"))
 #define bookkeeping_root_component (path_component("_MTN"))
+#define bookkeeping_conflicts_file (bookkeeping_path("_MTN/conflicts"))
+#define bookkeeping_resolutions_dir (bookkeeping_path("_MTN/resolutions"))
 // for migration
 #define old_bookkeeping_root_component (path_component("MT"))
 
============================================================
--- src/safe_map.hh	72cfed654bd458c527b1abef1a691ab3f9ebfb4b
+++ src/safe_map.hh	d6d0b1e34fd93bc95a47f65f48b3f652e6034ee5
@@ -22,7 +22,7 @@ do_safe_erase(T & container, typename T:
 {
   if (!container.erase(key))
     global_sanity.generic_failure("safe_erase", origin::internal,
-                                  F("erasing nonexistent key from %s")
+                                  F("erasing nonexistent key from '%s'")
                                   % container_name,
                                   file, line);
 }
@@ -39,7 +39,7 @@ do_safe_insert(T & container, typename T
   std::pair<typename T::iterator, bool> r = container.insert(val);
   if (!r.second)
     global_sanity.generic_failure("safe_insert", origin::internal,
-                                  F("inserting duplicate entry into %s")
+                                  F("inserting duplicate entry into '%s'")
                                   % container_name,
                                   file, line);
   return r.first;
@@ -59,7 +59,7 @@ do_safe_insert(T & container, typename T
   typename T::iterator r = container.insert(where, val);
   if (pre_size == container.size())
     global_sanity.generic_failure("safe_insert", origin::internal,
-                                  F("inserting duplicate entry into %s")
+                                  F("inserting duplicate entry into '%s'")
                                   % container_name,
                                   file, line);
   return r;
@@ -77,7 +77,7 @@ do_safe_get(T & container, typename T::k
   typename T::const_iterator i = container.find(key);
   if (i == container.end())
     global_sanity.generic_failure("safe_get", origin::internal,
-                                  F("fetching nonexistent entry from %s")
+                                  F("fetching nonexistent entry from '%s'")
                                   % container_name,
                                   file, line);
   return i->second;
============================================================
--- src/cmd_merging.cc	98408f1a05aecbe60293c0607be8f6ae65f83940
+++ src/cmd_merging.cc	31b3be7d444652ec5ac6d937a987c6a65157c313
@@ -1178,9 +1178,9 @@ CMD(store, "store", "", CMD_REF(conflict
 CMD(store, "store", "", CMD_REF(conflicts),
     "[LEFT_REVID RIGHT_REVID]",
     N_("Store the conflicts from merging two revisions"),
-    N_("If no arguments are given, LEFT_REVID and RIGHT_REVID default to the "
+    (F("If no arguments are given, LEFT_REVID and RIGHT_REVID default to the "
        "first two heads that would be chosen by the 'merge' command. If "
-       "--conflicts-file is not given, '_MTN/conflicts' is used."),
+       "--conflicts-file is not given, '%s' is used.") % bookkeeping_conflicts_file).str(),
     options::opts::branch | options::opts::conflicts_opts)
 {
   database    db(app);
============================================================
--- src/options_list.hh	4af93dbcc45e76d732d073ced7ce21d20472cd00
+++ src/options_list.hh	3b758ede56a0a9fbd435f5eb5d5c1d9dd4418ca0
@@ -79,7 +79,7 @@
  *   DEPRECATE(option, reason, deprecated_in, will_remove_in)
  *     Do not show the named option in help output (even with --hidden), and
  *     give a warning if it is used. The reason should be
- *     gettext_noopt("some text here") as it is translatable.
+ *     gettext_noop("some text here") as it is translatable.
  *
  *
  *   Option Strings
@@ -381,8 +381,9 @@ SIMPLE_OPTION(move_conflicting_paths,
 SIMPLE_OPTION(move_conflicting_paths,
               "move-conflicting-paths/no-move-conflicting-paths",
               bool,
-              gettext_noop("move conflicting, unversioned paths into _MTN/resolutions "
-                           "before proceeding with any workspace change"))
+              (F("move conflicting, unversioned paths into '%s' "
+                 "before proceeding with any workspace change") %
+                 bookkeeping_resolutions_dir).str().c_str())
 
 OPTSET_REL(globals, ssh_sign)
 SIMPLE_INITIALIZED_OPTION(ssh_sign, "ssh-sign", enum_string, "yes,no,only,check",
@@ -589,7 +590,7 @@ OPTVAR(resolve_conflicts_opts, bookkeepi
 
 OPTSET(resolve_conflicts_opts)
 OPTVAR(resolve_conflicts_opts, bookkeeping_path,
-       resolve_conflicts_file, "_MTN/conflicts")
+       resolve_conflicts_file, bookkeeping_conflicts_file)
 
 OPTION(resolve_conflicts_opts, resolve_conflicts_file, true, "resolve-conflicts-file",
        gettext_noop("use file to resolve conflicts"))
@@ -610,7 +611,7 @@ OPTSET(conflicts_opts)
        gettext_noop("specify conflict resolutions in a file, instead of interactively"))
 
 OPTSET(conflicts_opts)
-OPTVAR(conflicts_opts, bookkeeping_path, conflicts_file, bookkeeping_path("_MTN/conflicts"))
+OPTVAR(conflicts_opts, bookkeeping_path, conflicts_file, bookkeeping_conflicts_file)
 
 OPTION(conflicts_opts, conflicts_file, true, "conflicts-file",
        gettext_noop("file in which to store conflicts"))
============================================================
--- src/pcrewrap.cc	53efd25cf048ddb118c0c21d413be62b57fe68e0
+++ src/pcrewrap.cc	7f5bd4e7d8d9e02f2b0271fa9a0f64dcbce2467d
@@ -216,7 +216,7 @@ pcre_compile_error(int errcode, char con
     case 52: // internal error: overran compiling workspace
     case 53: // internal error: previously-checked referenced subpattern
              // not found
-      throw oops((F("while compiling regex \"%s\": %s") % pattern % err)
+      throw oops((F("while compiling regex '%s': %s") % pattern % err)
                  .str().c_str());
 
     default:
@@ -225,9 +225,9 @@ pcre_compile_error(int errcode, char con
       // position-ful variant for all errors, but I'm leaving the == -1 check
       // here in case PCRE gets fixed.
       E(false, caused_by, (erroff == -1
-                           ? (F("error in regex \"%s\": %s")
+                           ? (F("error in regex '%s': %s")
                               % pattern % err)
-                           : (F("error near char %d of regex \"%s\": %s")
+                           : (F("error near char %d of regex '%s': %s")
                               % (erroff + 1) % pattern % err)
                            ));
     }
@@ -242,7 +242,7 @@ pcre_study_error(char const * err, char 
   if (!std::strcmp(err, "failed to get memory"))
     throw std::bad_alloc();
   else
-    throw oops((F("while studying regex \"%s\": %s") % pattern % err)
+    throw oops((F("while studying regex '%s': %s") % pattern % err)
                .str().c_str());
 }
 
============================================================
--- src/cmd_conflicts.cc	fe887aac3fd84b1048360551dd8c8638d059ea7d
+++ src/cmd_conflicts.cc	ad9dc74c27d4d8c50a74e5825ec9e0a12cdc1b09
@@ -374,7 +374,7 @@ set_first_conflict(database & db,
                       {
                         file_path left_path;
                         conflicts.left_roster->get_name(conflict.nid, left_path);
-                        result_path = bookkeeping_path("_MTN/resolutions", origin::internal) / left_path;
+                        result_path = bookkeeping_resolutions_dir / left_path;
                       }
                       break;
 
@@ -519,14 +519,11 @@ CMD(clean, "clean", "", CMD_REF(conflict
     "",
     options::opts::none)
 {
-  bookkeeping_path conflicts_file("_MTN/conflicts");
-  bookkeeping_path resolutions_dir("_MTN/resolutions");
+  if (path_exists(bookkeeping_conflicts_file))
+    delete_file(bookkeeping_conflicts_file);
 
-  if (path_exists(conflicts_file))
-    delete_file(conflicts_file);
-
-  if (path_exists(resolutions_dir))
-    delete_dir_recursive(resolutions_dir);
+  if (path_exists(bookkeeping_resolutions_dir))
+    delete_dir_recursive(bookkeeping_resolutions_dir);
 }
 
 // Local Variables:

reply via email to

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