[RFC] convert-repo enhancements

Brendan Cully brendan at kublai.com
Sat Feb 24 00:21:58 UTC 2007


Hi,

I haven't had much time to review these, but here are a couple of
comments. If there are no comments below a patch, I haven't had time
to look at it.

On Sunday, 11 February 2007 at 16:20, Edouard Gomez wrote:
> Hello,
> 
> I'd  like people  to  review my  patches  against upstream  convert-repo
> before i  start putting  the last and  probably really  hacky-hacky last
> feature i still require for cvs imports.
> 
> The queue changelog is now:
> 01 - Fix - Change a bit cvsps arguments

in crew.

> 02 - Fix - Save a few opens on the map file
> 03 - Fix - Don't keep trailing white space in cvs tags

in crew.

> 04 - Enh - Add some more smart when initializing destination repository
> 05 - Enh - Initialize source repository after destination one

why?

> 06 - Enh - Add support for username mapping

nit: I prefer the file name 'authormap' (and likewise for the
attribute name) -- 'map' is implicitly plural. I prefer 'authorfile'
too, on shakier grounds.

Why is it opened in binary mode?
It should perhaps emit a warning if it can't parse a line.
I don't think it should write the author file unless it doesn't
exist.

> 07 - Enh - Always add tags the same branch

I think it might be nicer if tags go onto the same branch that they
tag. I noticed while pulling apart my converted mutt repository that
if I cloned -r <stable branch>, I ended up with a repository that had
no tag info at all. I would rather it had the tags applied to stable.

> 08 - Enh - Print an help message if needed
> 09 - Enh - Print tag changes
> 10 - Enh - Add output simple templating capability
> 
> The entire queue is attached as a bundle.
> 
> I'd also have  some advise on the  last feature i miss. I  qualify it as
> hacky  because it  deals  with filtering/modifying  cvsps output  before
> convert-repo reads  it. Basically, on some  repos of mine,  cvsps is not
> smart enough, and it needs hand surgery.
> 
> Do  you think  that  it would  be enough  to  simply let  the user  give
> convert-repo the cvsps command line ?
> 
> In that case my required feature can fit in an intermediary shell script
> that won't pollute core convert-repo code.

I'm not sure this is worth doing. Why not simply write a cvsps shell
script that precedes the real cvsps in your path, calls the real cvsps
and filters the output as necessary?



More information about the Mercurial-devel mailing list