Skip to content

Commit

Permalink
Check for sticky dates.
Browse files Browse the repository at this point in the history
If a previous build did check out a specific "revision" (timestamp)
we can't update the directory with cvs update (unless we use -A).
Upload the CVS/Entries file from the slave and check for any sticky
dates.

Entries look like this:

/Filename/1.1/Fri May 17 23:20:00 2013//D2013.10.08.11.20.33
D

Just make sure the last field of each line does not start with D
(and skip the final line)
  • Loading branch information
jpommerening committed Oct 9, 2013
1 parent c048e24 commit b40ac18
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions master/buildbot/steps/source/cvs.py
Expand Up @@ -304,6 +304,23 @@ def _sourcedirIsUpdatable(self):
defer.returnValue(False)
return

# if there are sticky dates (from an earlier build with revision),
# we can't update (unless we remove those tags with cvs update -A)
myFileWriter.buffer = ""
cmd = buildstep.RemoteCommand('uploadFile',
dict(slavesrc='Entries', **args),
ignore_updates=True)
yield self.runCommand(cmd)
if cmd.rc is not None and cmd.rc != 0:
defer.returnValue(False)
return
# fields are separated by slashes, the last field contains the date
# the last line just contains a single "D"
for line in [l.split('/') for l in myFileWriter.buffer.splitlines() if len(l) > 1]:
if line[-1].startswith('D'):
defer.returnValue(False)
return

defer.returnValue(True)

def parseGotRevision(self, res):
Expand Down

0 comments on commit b40ac18

Please sign in to comment.