You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Marc Lustig <ml...@marclustig.com> on 2009/10/05 15:55:23 UTC

identifying release-dir

Hi,

we want a pre-commit-script that prevents modifying any file under a
tagged-version.
The challenge is that different projects use different layouts under tags.
These are the layouts that I discovered:

1) project/tags/1.1.1
2) project/tags/subproject/1.1.1
3) project/tags/subproject-1.1.1
4) project/tags/subproject/subproject-1.1.1


The only common thing is (due to Maven) that the versions 
- are below the tags-dir
- have 3 numbers - major, middle and minor ("digits.digits.digits")

I could already resolve the layouts 1 and 2.
Could somebody give me a hint how to use bash-commands like expr or sed to
identify the layouts 3) and 4).

The reg-exp would probably look somewhat like this:
"([0-9]*)\.([0-9]*)\.([0-9]*)"

The number of digits are arbitrary.



-- 
View this message in context: http://www.nabble.com/identifying-release-dir-tp25753345p25753345.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2403773

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: identifying release-dir

Posted by Lorenz <lo...@yahoo.com>.
Marc Lustig wrote:

>Hi,
>
>we want a pre-commit-script that prevents modifying any file under a
>tagged-version.
>The challenge is that different projects use different layouts under tags.
>These are the layouts that I discovered:
>
>1) project/tags/1.1.1
>2) project/tags/subproject/1.1.1
>3) project/tags/subproject-1.1.1
>4) project/tags/subproject/subproject-1.1.1
>
>
>The only common thing is (due to Maven) that the versions 
>- are below the tags-dir
>- have 3 numbers - major, middle and minor ("digits.digits.digits")
>
>I could already resolve the layouts 1 and 2.
>Could somebody give me a hint how to use bash-commands like expr or sed to
>identify the layouts 3) and 4).
>
>The reg-exp would probably look somewhat like this:
>"([0-9]*)\.([0-9]*)\.([0-9]*)"
>
>The number of digits are arbitrary.

something like

> svnlook ... | gawk '/.*[/]tags[/].*[0-9]+[.][0-9]+[.][0-9]+[/]/ {tagfound=1} END {return tagfound}

-- 
Lorenz

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2403948

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].