You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by allan juul <la...@inet.uni2.dk> on 2005/02/05 21:10:24 UTC

[hook] how to differentiate copy or add

hello

i need my pre-commit script to be able to act upon invalid (invalid in
respect to our tagging conventions)

via "svnlook changed $repos --transaction $tnx" the script can see if
something is added. but how does it find out whether this was happening
via a manually "svn add; svn ci" or a "svn copy FROM_URL TO_URL" ?

is there a handy way in a hook-script to get the actual command that
invoked the transaction to be committed ?


./allan




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: [hook] how to differentiate copy or add

Posted by Bryan Donlan <bd...@hikari.afraid.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

allan juul wrote:
| hello
|
| i need my pre-commit script to be able to act upon invalid (invalid in
| respect to our tagging conventions)
|
| via "svnlook changed $repos --transaction $tnx" the script can see if
| something is added. but how does it find out whether this was happening
| via a manually "svn add; svn ci" or a "svn copy FROM_URL TO_URL" ?
|
| is there a handy way in a hook-script to get the actual command that
| invoked the transaction to be committed ?

You can't get the command, since that is not sent to the server. You
can, however, find out if a path is copied. Try:
svnlook history -r (revision) (path to repos) (path in repos)
If the path field differs between two lines of output, it was copied.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCBZoD+hz2VlChukwRAgrNAJ9UzJ416fjchOYs/P3zsW2R0MPrVgCgij0z
5or5qC3hQ0AHIx8o769LY5k=
=bfXk
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org