Ticket #470 (new enhancement)
SVN step, sub-directory of branch and add peg revision
| Reported by: | ipv6guru | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.+ |
| Version: | 0.7.10 | Keywords: | svn |
| Cc: |
Description (last modified by dustin) (diff)
Details:
1) Allow the user to specify a sub-directory of a branch. Previously when using branches there was no way to checkout a sub-directory of the branch.
- Add peg revision to svnurl. see http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html
Perhaps the peg revision should only be appended if the user has supplied a workdir argument? Otherwise the directory will have @<revision> tacked onto it's name when it is checked out.
3) Show the branch name instead of just "[branch]" in the status description of the step
Comment 1:
One drawback of adding the peg revision to the svnurl is that any checkouts in "update" mode will become checkouts in "clobber" mode. This happens because the .buildbot_sourcedata file, which is based on the svnurl, will have the revision number in it. Thus calls to SourceBase?.sourcedataMatches() will always return False.
The following patch will fix this
Index: buildbot/slave/commands.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
retrieving revision 1.77
diff -u -r1.77 commands.py
--- buildbot/slave/commands.py 23 Jan 2007 19:24:11 -0000 1.77
+++ buildbot/slave/commands.py 24 Jan 2007 02:05:50 -0000
@@ -1443,6 +1443,16 @@
self.svnurl = args['svnurl']
self.sourcedata = "%s\n" % self.svnurl
+ def sourcedataMatches(self):
+ try:
+ olddata = open(self.sourcedatafile, "r").read()
+ # do not considter peg revision if it exists
+ if oldata.split('@')[0] != self.sourcedata.split('@')[0]:
+ return False
+ except IOError:
+ return False
+ return True
+
def sourcedirIsUpdateable(self):
if os.path.exists(os.path.join(self.builder.basedir,
self.srcdir,
".buildbot-patched")):
Attachments
Change History
comment:2 Changed 2 years ago by dustin
- Type changed from defect to enhancement
- Milestone changed from undecided to 0.7.+
This seems like a pretty major change. I'd want assurances either that this wouldn't change default behavior, or that it's much-desired, before merging it..
comment:4 Changed 11 months ago by pythonian4000
Point 1 above has already been fixed - you can now specify a baseURL containing the string '%%BRANCH%%' and that will be replaced with the branch property, rather than the branch property being appended to the baseURL. Points 2 and 3 however are not present in the current trunk.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
