On Sat, Dec 24, 2016 at 09:29:01AM +0000, Chad Perrin wrote:
> On Tue, Dec 20, 2016 at 11:35:46PM +0000, Chad Perrin wrote:
> > When exporting from a Fossil repository and importing into a Git
> > repository, the commits all seem to identify the email address as the
> > name and the name as the email address.  The command I use is
> > essentially identical to what the documentation/example at
> > fossil-scm.org, and I do not see a way in the help documentation for the
> > tool or on the website for how to control the way it identifies the
> > author of a commit on export.
> > 
> > Is there a work-around for this?  Is this a problem affecting anyone
> > else?  Any help figuring this out would be appreciated.
> 
> Is there any reason piping the Fossil export through sed to fix name and
> email, then piping the correct result into Git, would not work?  I only
> ask because it does not seem to work here.  I used a sed regex that I
> have verified works on a string copied from an unmodified Fossil export,
> but for some reason does not work when I actually try to use it by
> sticking it between the Fossil export command and the Git import
> commands, connected together via pipes.

I've confirmed the sed approach works.  Borrowing directly from here:

    https://www.fossil-scm.org/index.html/doc/trunk/www/inout.wiki

. . . but simplifed, somewhat, with a sed command in the middle, the end
result looks like this:

    fossil export --git --export-marks ../repo/fossil.marks  \
      ../repo.fossil | sed \
      's/^\(committer \+\)\([^ ]\+@[^ ]\+\)\( *<\)\(\w\+\)\(>.*\)$/\1\4\3\2\5/' 
\
      | git fast-import --export-marks=../repo/git.marks

The regex is a little long.  I might try to pare it down slightly, at
some point.  I'll also try to find time to report an issue with Git
export formatting that swaps email and name info, then if I feel *very*
ambitious about the time I have available to spend I might also try
submitting a patch to close the issue.  Don't hold your breath, though;
life is crazy, and my to-do list is already long.

I hope the lack of responses to my questions was because of the holiday
season, because that means you all might be having a good time.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to