Re: author_transforms with Mercurial

Michael Haggerty <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
Greg Ward wrote:
> I haven't implemented support for author_transforms yet in my new 'n
> improved cvs2hg, but I will soon.  But with Mercurial, the author name
> is an arbitrary sequence of bytes (strongly recommended to be in
> UTF-8).  I believe that is true of git as well; it's only
> git-fast-import that requires a "name <email>" string which is
> presumably why author_transforms uses a (name, email) tuple.

IIRC, author names either have to have that form in git, or at least it
is a very strong recommendation.

But please note that author_transforms as implemented for cvs2svn
(recently implemented) does *not* enforce the "name <email>" form.  Why
don't you just base your code on that?

> The good thing about author_transform's current (name, email)
> structure is that it encourages the conventional form; but the bad
> thing is that it makes unconventional usage impossible.  I think this
> is easy to resolve by allowing author_transforms to map to tuple or
> string: e.g.
> 
>   { "jblow": "Joe Blow <[email protected]>"
>     "jdoe": ("Jane Doe", "[email protected]") }
> 
> Then if you need to break the rules, you are free to do so.  And if
> you break the rules for fastimport output, you get to live with the
> consequences.
> 
> Anyone mind if I implement this change to the interpretation of
> author_transforms?

I am not crazy about having behavior implicitly depend on parameter
types, especially as the options files are likely to be edited by people
who don't know Python.  And the tuple version is actually a bit *more*
typing than the string version.  I would prefer to live with the string
version for cvs2hg, unless you think it would be a hardship.

Michael

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2380157

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.