[fossil-users] better git migration

2015-07-24 Thread org.fossil-scm.fossil-users
Hello.

I have a repository that I'd like to migrate to github (*ducks rotten
fruit and vegetables*) but it's not clear to me that the existing
export/import process can satisfy my requirements.

Firstly: Every commit I've ever made to fossil has been PGP signed. The
repository in question spans a couple of years and I've been the only
committer. My PGP keys expire yearly, so all commits in the repository
are signed by one of two keys. For reasons of least privilege, I tend
to use different usernames on different machines, so although all the
committers are me, they aren't necessarily all the same name.
An initial run of fossil export | git fast-import seems to
show no pgp signatures in the resulting git repository. This doesn't
seem unreasonable, given that it's obviously not going to be possible
to forge new signatures!

Secondly: all of the committer names are... sort of bad. Most are of
the form m0 m0 (m0 being the username I used there).

I feel like fast-import may not be the way to go about this. I'm
wondering if there's a way to:

1. Transform *all* committer names to a given value: I'd prefer to use
   a name and email address that matches my github name/email.

2. PGP sign all commits with the key with which they were originally
   signed (obviously, some of these keys have expired).

Obviously, I'd like to preserve the original dates and times too.

I could sort of imagine replaying and re-signing the original commits
one-by-one to achieve the above, but I'm not sure how to go about this
or if it's even feasible.

Any help would be appreciated!
M
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] better git migration

2015-07-24 Thread Andy Bradford
Thus said Ron W on Fri, 24 Jul 2015 11:15:25 -0400:

 I would have  thought this would have worked. But  I don't know enough
 about how Fossil uses PGP  to make signatures, nor how git-fast-export
 format might support signatures to speak to this.

Fossil signs the manifest:

https://www.fossil-scm.org/index.html/artifact/212114657df8d3ccf84ec056db4ca1c003253543?txt=1ln=2068

Andy
--
TAI64 timestamp: 400055b27789
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] better git migration

2015-07-24 Thread Ron W
On Fri, Jul 24, 2015 at 5:38 AM, org.fossil-scm.fossil-us...@io7m.com
wrote:

 An initial run of fossil export | git fast-import seems to
 show no pgp signatures in the resulting git repository. This doesn't
 seem unreasonable, given that it's obviously not going to be possible
 to forge new signatures!


I would have thought this would have worked. But I don't know enough about
how Fossil uses PGP to make signatures, nor how git-fast-export format
might support signatures to speak to this.


 Secondly: all of the committer names are... sort of bad. Most are of
 the form m0 m0 (m0 being the username I used there).


As I recall, git-fast-export files can be edited, so you could write a
script to replace the user names with your name and email address.

Note that this would invalidate the signatures that do appear in the export
file (if any are in it).

2. PGP sign all commits with the key with which they were originally
signed (obviously, some of these keys have expired).

 Obviously, I'd like to preserve the original dates and times too.

 I could sort of imagine replaying and re-signing the original commits
 one-by-one to achieve the above, but I'm not sure how to go about this
 or if it's even feasible.


Assuming that Fossil's PGP signatures aren't compatible (or otherwise can
be stored) with git, you would have to use a script to re-sign the commits
in git.

I think you can use the fossil timeline command to get a list of all
commits in your Fossil repo. I don't know how to get a list from a git repo.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users