[Svnmerge] svnmerge rewritten in Python

Jim Fulton jim at zope.com
Thu Sep 22 09:34:16 PDT 2005


Giovanni Bajo wrote:
> Hello,
> 
> I rewrote svnmerge in Python, attached to this mail.

Cool.  Note that I was working on this too.

> - It's a straightforward conversion. It's *almost* 1:1 with the shell version,
> the only big difference being that revision lists are handled by a class
> RevisionList. At this point, I did not bother refactoring code or changing
> structure too much, it can be done in followups if there is interest to
> maintain and work on this Python version.

I don't think a shell-based version can be robust and portable to windows.
In particular, there's no portable way to run a process and get both output
and a return code.  This means you can't get output of svn commands and
get detect errors cleanly.  This is why I ultimately decided to use the
Python subversion bindings.  Using these is not easy though do to the
extremely sparse documentation.  I do think the result would be cleaner in
the long run.  For example, there is no need to parse svn command output.
The svn api returns real data.

> - It's lightly tested. Testing and bugreports are welcome :)

Right, my intent was to include fairly extensive doctests.

> - It's supposedly feature-complete, there is only one thing missing which has
> to do with old svnmerge versions (see "TODO" in the code).

I would hope we don't have to support these.  How long ago did
svnmerge switch to the new format?

> - I changed license because I tend to use GPL by default in everything I write.
> But if there is a serious problem with this (?), I'm open to discussion.
> 
> - I purposedly avoid newest Python features. Theoritically it should work on
> any Python 2.0+, but I haven't tested it. I believe it is important for such a
> tool to work on as many systems as possible. And really, for 600 lines of code,
> I can live without generators or a decorators.

I think the other svn python scripts require 2.2.  I don't see any
point in supporting older versions.

Jim



More information about the Svnmerge mailing list