monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] .mt-attrs formatting


From: Richard Levitte - VMS Whacker
Subject: Re: [Monotone-devel] .mt-attrs formatting
Date: Thu, 19 Aug 2004 17:51:11 +0200 (CEST)

In message <address@hidden> on Thu, 19 Aug 2004 15:25:46 +0100, Bruce Stephens 
<address@hidden> said:

monotone> I just got hit by this annoying problem.  Here's a possible
monotone> documentation patch, although possibly it would be better to
monotone> change the code (if only to warn when lines were being
monotone> ignored for some reason).

I personally think the code should be changed to accept several
consecutive whitespaces as one space, in any configuration file unless
the actual whitespaces are significant.  Anything else is a bug in my
world, and no documentation will change my view on that.

Also, it looks to me like it's incredibly easy to fix:

--- work.cc
+++ work.cc
@@ -471,7 +471,7 @@
 void 
 read_attr_map(data const & dat, attr_map & attr)
 {
-  regex expr("^([^[:space:]]+) ([^[:space:]]+) ([^[:space:]].*)$");
+  regex 
expr("^([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]].*)$");
   regex_grep(add_to_attr_map(attr), dat(), expr, match_not_dot_newline);
 }
 

Do you have a possibility to check that I haven't forgotten anything?
I'm quite short on time, so I haven't made any tests.

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/




reply via email to

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