[JIRA] Updated: (CC-1044) svnrevision property should reflect externals

"Daniel Tihelka (JIRA)" <[email protected]> Fri, 23 Sep 2011 16:28:18 -0500 (CDT)
Newsgroups gmane.comp.java.cruise-control.devel
Message-ID <1684722492.1316813298130.JavaMail.jira@chidmzhosting02.thoughtworks.com>
     [ http://jira.public.thoughtworks.org/browse/CC-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Tihelka updated CC-1044:
-------------------------------

    Attachment: SVN_revision_01.patch

I am sending the second patch which could be considered as that implementing the required functionality. It works for our repo and does not break unit tests of SVN class (well, small changes were required).

However, I am not sure that the solution is robust enough. I will be happy to hear any suggestions for improvements!

Regards,
Dan T.

> svnrevision property should reflect externals
> ---------------------------------------------
>
>                 Key: CC-1044
>                 URL: http://jira.public.thoughtworks.org/browse/CC-1044
>             Project: CruiseControl
>          Issue Type: Improvement
>          Components: Core Application
>    Affects Versions: 2.8.4
>            Reporter: Daniel Tihelka
>         Attachments: SVN_revision_00.patch, SVN_revision_01.patch
>
>
> The value of 'svnrevision' property is always set to the highest revision number found. The problem appears when you have some part of the project linked through svn:externals into different repository.
> Let us consider a repository REPO1 with actual HEAD in revision 100. It has some of its part linked to external repository REPO2 (on path src_REPO2) with head being at 500. The 'svnrevision' property is used to identify the build, e.g. the result is copied to output/rev${svnrevision}, or the value is built-in into the binary object.
> When when someone commits to REPO2, the build will start and  CC  will place the results to 'output/rev501'. Now, when we commit changes to REPO1, the CC will place result to ''output/rev101'.  So, the listing will look like:
> output/rev101
> output/rev501
> although the rev501build is actually older.
> To deal with this issue, I am suggesting to limit 'svnrevision' number only to "main" repository path, and to store the revisions from the external repositories in 'svnrevision.path_to_external' (i.e. 'svnrevision.src_REPO2'). The result could than be used to distinguish individual builds, for example like:
> output/rev100_REPO2-rev501
> output/rev101_REPO2-rev501

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2