Someone on IRC had an issue today where they did
  monotone sync servername 'branchname'
and it pulled 0 revisions.  They then tried 
  monotone sync servername "branchname"

and were successful.  The were running monotone on windows; I seem to
recall someone else getting confused like this before as well.

Is the following patch an appropriate method of warning users that this
might be happening?

thanks,
-emile

# 
# old_revision [b5ccb7aef03d1d54935ac57c76dc4056a0283a27]
# 
# patch "globish.cc"
#  from [9bb3f311393edb3c7bc58e64337e55bedd9549e7]
#    to [b331af74203fab4c6befcab3de6233083971a283]
# 
============================================================
--- globish.cc	9bb3f311393edb3c7bc58e64337e55bedd9549e7
+++ globish.cc	b331af74203fab4c6befcab3de6233083971a283
@@ -124,6 +124,19 @@
 globish_matcher::globish_matcher(utf8 const & include_pat, utf8 const & exclude_pat)
 {
   std::string re;
+
+  if (include_pat().find_first_of("'\"") != std::string::npos)
+    {
+      W(F("include branch pattern contains a quote character:\n"));
+      W(F("%s\n") % include_pat());
+    }
+
+  if (exclude_pat().find_first_of("'\"") != std::string::npos)
+    {
+      W(F("exclude branch pattern contains a quote character:\n"));
+      W(F("%s\n") % exclude_pat());
+    }
+
   checked_globish_to_regex(include_pat(), re);
   r_inc = re;
   checked_globish_to_regex(exclude_pat(), re);
_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to