Friday, June 27, 2008

New Project: svntask

I just created a new super simple project on the super nice project hosting called SvnTask in order to have a nice stable codebase that does what I need which is to get the Subversion revision number for a checked out working copy for a project. At work, we don't have release numbers because we aren't really shipping a product. Instead, we just use the Subversion revision number to track changes. Simple concept except...

SvnAnt seems to be unmaintained. There is some other problems like the requirement to pass in a password to do a checkin (ant doesn't have an easy non-cleartext way to do that) and I'd rather just have it use my saved password. It has also always bugged me that they got svn info and svn status reversed.

The recently released Eclipse 3.4 also uses the latest Subclipse plugin which upgrades your working copy to Subversion 1.5 and thus breaks the SvnAnt task with one of those nice classic subversion 'your working copy is too new' messages.

I also don't care about and don't want to mess with javahl. I just want a 100% java solution that uses the nice svnkit library.


Richard Davies said...

This project looks interesting. I like the way it's implemented---it is indeed simple and easy to use. But I think it's unfair to compare it to svnant because so far your project only supports two commands, info and update.

Do you have any plans to support a wider range of SVN commands? If you could add support for the core commands that svnant offers then it would make a nice replacement for svnant.

Unknown said...

Hi Richard, thanks for the note. The reality of svnant is that it no longer works. It is broken with svn 1.5 until someone comes along and fixes it.

With regards to plans... as I need commands or people send me patches (I've got one in the queue right now) or when I have time/energy, I'll expose more functionality.

Is there something specific you need implemented?

Richard Davies said...

Thanks for the quick response.

The reality of svntask is that if you need to do anything beyond simply getting the revision number it's "broken" because it doesn't support anything else yet... no matter what version of SVN you're on. I can understand why you think svnant is broken, but at least it works fine for me with SVN 1.4.

For example, in order to use svntask for deploying my web application, I need to be able to export from SVN and use copy to create tags. But svntask doesn't support export or copy.

At the bare minimum, I would think svntask should support checkout, copy, export, revert, switch, and update. Add, commit, delete, and move would be on my secondary list.

I understand that new features require time and effort on your part, and I'm not trying to diminish your efforts. But until svntask supports more commands, I don't think it's really ready for prime time as a replacement of svnant.

As I'm not a Java programmer and haven't done any ANT development, I don't have any idea how much work is involved in adding new commands to svntask. Does each new task require a considerable amount of work and custom development? Or is it more like just using an existing command as a "template" and modifying a few lines?

Unknown said...

For me it is a prime time replacement because all I used svnant for was doing svn info and getting the revision number. It is all about perception of needs my friend. =) I agree though, svntask isn't a full replacement for svnant because it doesn't have all the same features exposed. At least not yet.

With regards to adding new features, yes it is a huge amount of work. It isn't hard work by any stretch of the imagination, but it is just a lot of typing. For example, I just spent the last hour implementing most of svn status. I'll finish that command up later when I have more time.

As for the svn commands that you need, well I'll see about getting to those at some point in the future as well. Or, you can use this as a great exercise in learning Java and contribute some patches. =)

Richard Davies said...

Yes, I might just try my hand at Java and see if I can help you out by submitting some patches... but of course, it'll depend on how much time I've got... :)

Unknown said...

Hang on - I know one of the things of open source is to have competition. But starting another project when 1 person can fix svnant in a month or two?

Time to close up shop I reckon. (Sorry 'bout the ticket, but as stated, there wasn't a wiki/forum)

Unknown said...

Great, someone finally updated the thing. As soon as svnant stops failing the 'hard to use' test, I'll close my project down. Until then, the 298 people who have downloaded svntask can continue to know it will be developed and updated as needed.

Chris said...

Hi Jon,

I wanted to use SvnTask in my personnal IC server.
To do that, I had to add "revert" and "tag" tasks.

How is it possible to share this code ?


Unknown said...

Yes, you can file an issue with a diff on the website.

If the code is good, I'll probably just give you commit access since I"m not really maintaining it any longer. I've long switched to git... please see my blog post titled "the subversion mistake" ;-)