[Twisted-Python] git repo maintenance

Glyph glyph at twistedmatrix.com
Mon Oct 22 15:22:15 EDT 2012

On Oct 22, 2012, at 10:53 AM, Kevin Horn <kevin.horn at gmail.com> wrote:

> On Sun, Oct 21, 2012 at 11:05 PM, Glyph <glyph at twistedmatrix.com> wrote:
> On Oct 21, 2012, at 11:57 AM, Duncan McGreggor <duncan.mcgreggor at gmail.com> wrote:
>> I want to use git instead of svn so badly that I can taste it.
>> Hopefully this provides the motivation necessary to maintain the repo
>> :-)
> For what it's worth, I haven't authored a branch for Twisted with SVN in the last 3 years.  I use Bazaar almost exclusively and I get all the fun tools one generally associates with a DVCS, including offline history and a nice graphical revision viewer.  (One reason I am concerned about migrating to Git is that this will stop working; in my opinions, Git's offline GUI tools are far worse than Bazaar's - almost as much worse as Launchpad's source browser is than Github.)
> I really wish I could figure out how to do this.  The one page on the wiki helps a bit, but is insufficient for those not already familiar with bzr (like me).  I've tried setting this up a couple of times, and I always end up just giving up on it.

Let me keep it super short and sweet for you:

C:\PROJEC~1> bzr branch http://svn.twistedmatrix.com/bzr/Twisted/trunk Twisted
C:\PROJEC~1> cd Twisted

as many times as desired,

C:\PROJEC~1\TWISTED> hack hack hack
C:\PROJEC~1\TWISTED> C:\python27\python.exe bin\trial twisted
C:\PROJEC~1\TWISTED> bzr commit

Review time!

C:\PROJEC~1\TWISTED> bzr send -o - > my.patch

Stick my.patch on a ticket and you're good to go.  No need for combinator, or virtualenv, or subversion (not even bzr-svn, we did that part for you), or even a C compiler, assuming the feature you're working on doesn't need one.

If any of this isn't covered in the wiki page then please update it.  And please feel free to ask more questions - if specific version control or workflow issues are preventing anyone from working on Twisted then it is definitely on-topic for this list and I will be happy to provide answers and update development documentation.

> (and no I don't recall exactly why, except for the one time when installing bzr on windows hosed my machine and made it unbootable...not Twisted's fault of course).

Can we just agree that you had a virus and that this had nothing to do with anything in this thread?  Even if that's not true I think it might be long-term more mentally healthy for you to believe :-)

> Similarly, I do code reviews by using a local 'bzr merge'.
> The only weird workflow which isn't just built in to BZR-SVN is this:
> <http://twistedmatrix.com/trac/wiki/BazaarMirror#CommittingaBazaarbranchtoaSubversionbranch>.  This involves rebasing, which makes me a little sad; I wish we could preserve more history, but it works fine.
> I still land branches on trunk using SVN, but that takes about ten seconds assuming you use Combinator or svnmerge.py, so I don't see that being a big impediment.  You only need to worry about that if you have commit access anyway, so that's not most external contributors.  If the need to do that to land changes is preventing you from writing them in the first place, just let me know when you have a branch to land, and I'll do it for you.
> Unless someone applied my patch, Combinator won't work on Windows.  Also, since the great Divmod site meltdown, there's not good instructions on how to use it (aside from the wayback machine, which is what I've been using).
> I'd never heard of svnmerge.py until you mentioned it.  Are there any instructions on how to use it with Twisted?  I'm not finding any, and I'm reluctant to experiment since Twisted has a very specific way on interacting with the SVN repo.

I guess I should test this out myself at least once, but my understanding is that you just do svnmerge.py --bidirectional -S the-branch-you-want-to-merge in trunk.  You can test this out for yourself though, since svnmerge.py is loudly advertised as "commit-free": you always have to do the commit yourself.

More info here: <http://www.orcaware.com/svn/wiki/Svnmerge.py>.

If we can ever upgrade to a version of SVN on the server that supports merge-tracking, the need for either of these tools will go away since a plain 'svn merge ../branches/branchname' will do the right thing.  Any volunteer sysadmins want to take the opportunity to crawl out of the woodwork?  (Please?)

But again: if you have trouble with this part, please just drop an email to the list and I will do it for you.  Do not let this minor step be an impediment to contributing to Twisted.

> You don't need to use SVN, you haven't needed to use SVN since git-svn came into existence, and we've had several threads on this list before about improving the Git instructions here: <http://twistedmatrix.com/trac/wiki/GitMirror>.  If you look at the history for that page, you can see that it is two years old, and originally created by exarkun, who is not a git user himself.
> So, it strikes me as a bit odd, and I am a bit dismayed that anyone would have been put off of by the need to use Subversion when working with Twisted since you can use Git or Bazaar - or, I assume, Mercurial - right now.
> Presumably you could use Mercurial with the hggit plugin against a git repo, but you can't use it directly against the SVN repo, as it has a bad commit in it that hgsubversion totally chokes on: https://bitbucket.org/durin42/hgsubversion/issue/350 

Sadness.  Hopefully this renewed attention will get the mercurial folks to fix this bug sooner?  Thanks for filing it.

> I would find it a bit more understandable if you are dismayed by the need to use Trac, which is harder to avoid when working on Twisted.  For various reasons - which I hope we don't have to discuss right now - we aren't going to move the project to Github any time soon, so if anyone reading this thread is interested in alleviating some of the pain with Trac, <https://launchpad.net/frack> is a good place to get involved to help out.  There are some pretty straightforward bugs that anyone interested could fix there.
> Frack is already up and running on twistedmatrix.com, albeit at a weird URL.  See, for example, <http://twistedmatrix.com/users/frack.twistd/ui/ticket.html?id=1956>. This might be useful because it is a considerably faster ticket-viewer than Trac, do to its somewhat more parsimonious issuance of SQL queries.
> -glyph
> Trac has never really bothered me that much. Yes, occasionally it will do something stupid, and it's...not fast, but I guess I'm just used to the pain.  I'm looking forward to Frack, though.

Great, glad to hear it.

By the way, if you've been shying away because it's slow, you should know that we did recently fix a major performance problem with the website.  Bots were running amok on some very CPU and memory intensive requests, and robots.txt was not deployed correctly so it wasn't reducing any of the traffic as it should have.  At the most recent sprint nobody complained about being unable to work because of the website falling over, which indicates that some of our more dire problems are now under control.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20121022/5d78672a/attachment.htm 

More information about the Twisted-Python mailing list