[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Custom client side switches or a validate command line hook...?

From: Reedick, Andrew <Andrew.Reedick_at_BellSouth.com>
Date: 2006-08-09 23:44:11 CEST

What do folks think of being able to supply 'custom' arguments to svn
commands and having a server side hook script parse the command line and
process the 'custom' arguments? Or of being able to parse and validate
a svn command line in general?[1]

This would allow folks to extend and customize the client functionality
w/o hacking the code directly. An example would be:
        svn commit --bug_id 123 -m "fixing resource leak"
The server hook script would parse --bug_id instead of the usual method
of putting the bug_id in the commit message.

Another use could be for merge tracking and idiot checking. You would
parse the 'svn merge ...' command line and record the exact merge
information in a property[2], or disallow someone from using 'svn merge
-r 100:HEAD...' (a specific rev # should be used, not HEAD.)

Detecting a merge command and putting a property on the revision would
be a spiffy way to let the commit know that it was a merge and not a
normal check-in[2].

Disabling certain svn features, such as --force in 'svn lock', would be
easy.

You wouldn't have to rely on wrapper scripts (which can be cumbersome to
distribute and do not work with custom clients like TortoiseSVN.) It
should be easy for custom clients to pop up an optional arguments window
to support this.

In general, this would be useful:
        -to pass client side information to the server,
        -allow information to pass between commands (merge + commit)
(albeit clumsily)
        -should work with custom clients, and
        -allows easy customization of subversion.

[1] Parsing a command line is easy, parsing SWIG/API calls probably
isn't?
[2] You would need to generate some kind of unique identifier for the
workset and add that as a property on rev 0. The post-commit would then
add a rev-prop if the commit's unique identifier matched. Clumsy but
possible.

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. 162

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 9 23:46:44 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.