s4 - Perforce-style CLI for Subversion
s4 is for Perforce users working in a Subversion environment. It implements some of the commands of the "p4" CLI, but it is by no means exhaustive.
Commands implemented
- add - Just a shortcut for 'svn add'. Nothing fancy.
- changes [-m] [-u] - get succinct one-line descriptions for changes instead of the 4 line verbosity from svn log
- filelog - 's4 changes' is a lot more powerful than the original 'p4 changes', but I added filelog for muscle memory, since I hadn't thought of using 's4 changes' for this. This is like 'svn log <file>' but less verbose.
- describe [-s] - given a Subversion revision number, get a diff describing the effect of that change on the tree, instead of diffing the against the current workspace (or trying to remember the x:y syntax).
- diff - Just a wrapper over 'svn diff'
- opened - This is a p4-like rendition of 'svn status'
- sync - sync with the top of the tree, no matter where the current directory is
Short-term to do list
- It would be nice to have a file that describes all the known svn repositories and makes doing an 'svn co' very easy. The p4 client stuff was always awkward to me, so I'm not sure if this is a re-invention of the same thing, better, or worse.
- Improving the $TOP system to work like the P4ENV system so that one can switch around in workspaces without having to remember to set a $TOP variable appropriately.
- I have been working on adding the "..." syntax in as well, but it's not very sophisticated right now (only works as a standalone token).
- Whatever else seems like a good idea.
Missing Commands
- p4 integrate - Probably will never be implemented. Subversion prior to 1.5 doesn't deal with merging well. The rumor is that 1.5 is much better, but I haven't tried it yet.
- p4 resolve - I suspect this command shouldn't be too difficult to add, but I haven't gotten around to it yet.
- p4 print
Again, this is under development. I am actively using this tool in my day-to-day work, so expect changes to be forthcoming.
The license is GNU GPL v2. If you add commands or have suggestions, I'd love to hear from you.
Send me mail: mitch@biscade.com.Checkout from Google Code
I've set-up a Google project for this tool.Checkout the code
List of changes