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

RE: implementing pre-commit-hook to prevent overwriting files under tags-dir

From: Marc Lustig <ml_at_marclustig.com>
Date: Fri, 25 Sep 2009 04:45:07 -0700 (PDT)

You are right, of course. It's so obvious....
I will try to simplify the logic...
thanks, guys.

Johan Corveleyn wrote:
>
>> Van: Marc Lustig [mailto:ml_at_marclustig.com]
>>
>> TAGS_REGEX='tags/[^/]\+'
>> # Get list of transactions in the 'tag' directory
>> TAGS_CHANGES=`"$SVNLOOK" changed -t "$TXN" "$REPOS" 2>/dev/null | \
>> awk '{ print $2; }' 2>/dev/null | \
>> grep ^tags/ 2>/dev/null | \
>> sed -e "s!^\($TAGS_REGEX\).*!\1!" | \
>> sort | \
>> uniq`
>>
>>
>> I figured out, when I commit a file, the variable TAGS_CHANGES is
>> empty.
>>
>> The command
>> $SVNLOOK" changed -t "$TXN" "$REPOS"
>> prints out the list of committed files properly. LIke
>> U project/tags/1.1.1/file.xml
>
> It's the grep part of the command: "grep ^tags/" will not match
> "project/tags/...". It only matches if "tags" is at the very beginning of
> the line (because "^" matches beginning of line).
>
> So I guess that snippet only works for repositories that have "tags" at
> the root of the repository, and not below individual project folders...
>
> Johan
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2400186
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe_at_subversion.tigris.org].
>
>

-- 
View this message in context: http://www.nabble.com/implementing-pre-commit-hook-to-prevent-overwriting-files-under-tags-dir-tp25570855p25610614.html
Sent from the Subversion Users mailing list archive at Nabble.com.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2400201
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-25 13:46:00 CEST

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.