[Twisted-Python] Twisted Project Jobs Volunteer

Jonathan Ballet jon at multani.info
Wed Nov 16 05:41:21 MST 2011


On Wed, Nov 16, 2011 at 11:13:50PM +1100, Tim Allen wrote:
> On Mon, Nov 14, 2011 at 01:33:45PM -0500, Glyph wrote:
> > Really the most important thing here though is just to get the
> > automatic mirroring initially set up, not the never-ending
> > ambassadorial work.  That way git users wouldn't _need_ elaborate
> > instructions as to what to clone and how; if we just say "get twisted
> > from github" and have that automatically updated it would be easier
> > for everyone.
>
> I've done some experimentation, and (as best I can tell) it's impossible
> to use git-svn to create a sensible SVN → Git conversion of the Twisted
> repository. This is because of the various, inconsistent branch-naming
> schemes that have been used over Twisted's long history.
>

Actually, maybe git-svn by itself is not smart enough to handle all the
possible cases and "weird" repository schemes like Twisted's one.

However, I think it should be possible with a second pass script to have
a pretty good, or at least better, conversion.

If you init the repository with "--prefix=svn/ --trunk=trunk", I think
you will got a working copy with trunk, and all the branches and tags as
references in the "svn/" namespace. Then, with a script smart enough,
which looks through the references in "svn/branches/" and "svn/tags/",
it can create the right branches and tags like "--stdlayout" would do if
the scheme was compatible.

The difficulty I think lies into the "smart enough", but if we can't
find a way with this, I don't know how git-svn would be capable of.

As an example of what I mean, if we want to import the tags from the
Subversion repository, the job will consist in:

1. list all of the svn/tags/releases/release-* references
2. strip the "release-" prefix to keep only the "x.y.z" scheme
3. for each tag, if it doesn't already exit, "git tag x.y.z
   svn/tags/releases/release-x.y.z"

Maybe it needs to be even smarter for branches, but the final step will
only be "git branch BRANCH_NAME SVN_REFERENCE", which might end up with
a cleaner Git repository than the original Subversion repository...

If some help is needed, I'm willing to help too. I'm not sure to fully
understand where and how this conversion is heading to.

My 2 cents,

 Jonathan




More information about the Twisted-Python mailing list