[PATCH 4 of 6] Add support for username mapping

Edouard Gomez ed.gomez at free.fr
Mon Jun 11 15:14:17 CDT 2007


On Thu, 07 Jun 2007 20:56:48 -0300, Alexis S. L. Carvalho wrote:
> You're reading the file in binary mode, but writing it in text mode.
> 
> I guess this doesn't really matter even on windows, since you're calling
> .strip() below, but it'd be better to be consistent.
> 
> And it'd be nice to be consistent with the mapfile (which is using text
> mode).

Adressed in a future revision of the patch.

>> +            for line in afile:
>> +                try:
>> +                    self.authors[line.split('=')[0].strip()] =
>> line.split('=')[1].strip()
> 
> Please split this into parsing the line and adding to self.authors -
> this way things should fit in 80 columns. :)

Addressed too.

> As Brendan noticed, it'd be nice to write the file only if -A was
> specified.  As it is, if you're very unlucky, you can lose your file if
> you press CTRL-C at the wrong time.

Will be addressed.

> The help text should mention the format of this file.  And maybe
> writeauthormap should say something like "Saving author map to %s.\nIt
> will be automatically used on the next run if -A is not specified.\n"

Will be adressed.

-- 
Edouard Gomez



More information about the Mercurial-devel mailing list