[Twisted-Python] Twisted Project Jobs Volunteer

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Nov 9 03:50:23 EST 2011

On Nov 8, 2011, at 7:39 PM, Tim Allen wrote:

> On Tue, Nov 08, 2011 at 05:43:09PM -0800, Glyph Lefkowitz wrote:
>>> On 7 Jul, 01:28 pm, p.mayers at imperial.ac.uk wrote:
>>>> http://twistedmatrix.com/trac/wiki/GitMirror
>> I should stress that the most pressing problem here is not necessarily
>> to provide a comprehensive, elaborate, automatic mirroring setup, but
>> rather to provide canonical, correct, convenient instructions to
>> people who are submitting tickets for review, and who want to use git
>> for development.  Ideally these instructions would not end up knocking
>> over our version control server, either :).
> As far as I know (having written most of the documentation in the linked
> wiki page, and from a brief skim through the git-svn manpage) it's
> impossible to make a "shallow" clone with git-svn (something like an
> ordinary "svn checkout", or "git clone --depth N"), so anyone who wants
> to contribute to Twisted via git needs to clone the repository from
> scratch (potentially overloading the SVN server, although nobody seemed
> to notice or complain when I was doing my git-svn clone), or just copy
> a tarball of somebody's comprehensive, elaborate, automatic mirroring
> setup.

This is the part I don't understand.  Why doesn't 'git clone' work right in the face of svn metadata?  Is it possible to make it work right?  bzr-svn has some metadata it caches about the svn repository which doesn't stick around in the bzr repo or branch, but (from the performance of using it, at least) it doesn't need to stop the world and grab all of that data for most operations.

> I'm not sure why I didn't document how to properly clone the Twisted SVN
> repo with git-svn; I don't recall it being too hard (with the exception
> of some old, closed branches with '+' in the name which I just blew
> away), but it did take long enough that I didn't really want to
> experiment and risk overloading the SVN server. 

It would be better (for most users) to point to a canonical way to get access to a git-svn clone than to document how to make one, if making one takes 24 hours :).  But please do write this down so that at least the Twisted admins have some concept of how to re-create the git mirror or how to fix the issue if it occurs in the future.

> With access to the SVN server over a local network, or with a lot of
> patience, it shouldn't take much messing about to figure out canonical
> "make a clone" and "update your clone" instructions.

If we had an officially maintained mirror (pushed to github, I hope), I assume that non-committer users would not need to do SVN operations.  That's the main audience I'm interested in right now. There are a couple of committers who might be interested in doing development with git, but I'm confident they can figure that out for themselves :).

>> Right now, patches from git users show up in a variety of states of
>> confusion and disarray: they're either based on an incredibly ancient
>> version of trunk, or they're on a non-master branch of some repository
>> and they don't say that,
> I'm not sure why that would be, except that possibly they found
> a tarball of somebody else's git-svn clone and forgot to update it, or
> they're confused about the best way to get cloned from some unofficial,
> no-longer updated mirror. Fixing this probably depends on having the
> canonical, correct, convenient instructions and advertising them widely.

You edited GitMirror before, you can do it again :).

>> or they include 'a/' and 'b/' prefixes (i.e.  they're -p1 patches when
>> they should be -p0 according to the submission standard).
> Git doesn't provide any way to generate patches without the fixed,
> standard prefixes. As I understand it, this is to prevent ambiguities
> when filenames contain spaces. So, you're probably stuck with it. :/

I finally figured this out.  It is fixable.  The correct options to pass are:

git diff --src-prefix=./ --dst-prefix=./

Maybe it's possible to put this into a configuration file somewhere so that users don't need to type all of that every time?  Please put this on the GitMirror page as well.


More information about the Twisted-Python mailing list