[RFC] convert-repo enhancements

Edouard Gomez ed.gomez at free.fr
Sat Feb 24 15:23:32 UTC 2007


Brendan Cully (brendan at kublai.com) wrote:
> > 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.

ack

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

04 is just there for user friendliness, the rules is added are:
 1 - if you pass an empty dir as destination, it's just ok to init it.
 2 - if you pass an initialized dir, just do nothing
 3 - if you pass nothing, choose an arbitrary name and apply 1 and 2

05 has been pushed to the queue because it's not worth trying to init
any destination dir if we're unable to process the source repo, thar's
why i reordered the repo instanciations.

> > 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.

Taking note of your other email, i'll fix these bits.

> Why is it opened in binary mode?

Because i hate having to deal with both dos and unix endlines. I prefer
fixing it to be unix style endlines.

> It should perhaps emit a warning if it can't parse a line.

Yup, ack.

> I don't think it should write the author file unless it doesn't
> exist.

I  think it's  just  better  to write  it  each time,  so  the the  next
conversion round,  the only  arguments required are  the source  and dst
repo (unless  a new hacker commited  and wasn't referenced  in the names
files).

> > 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.

I'm ok  with your argument,  it'd be good  if clone -r <branch>  had its
tags somewhere. But i am not  so sure that it's good to disturb original
history with tag nodes.

Is there a way  to have tags aside the branch and  clone -r getting that
tags ?

> > Do  you think  that  it would  be enough  to  simply let  the user  give
> > convert-repo the cvsps command line ?
>
> 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?

We agree mostly on that. It's just that i'm too lazy to modify my PATH
and restore it after the convert-repo call :-) But it's already enough
so i'll do nothing more.

-- 
Edouard Gomez



More information about the Mercurial-devel mailing list