Skip to content

Commit

Permalink
Replace self.srcdir to self.workdir where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
maruel committed Nov 20, 2009
1 parent d8fddfa commit 281207c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions buildbot/slave/commands.py
Expand Up @@ -1471,7 +1471,7 @@ def sourcedataMatches(self):

def sourcedirIsPatched(self):
return os.path.exists(os.path.join(self.builder.basedir,
self.srcdir,
self.workdir,
".buildbot-patched"))

def _handleGotRevision(self, res):
Expand Down Expand Up @@ -1649,7 +1649,9 @@ def doPatch(self, res):
]
dir = os.path.join(self.builder.basedir, self.workdir)
# mark the directory so we don't try to update it later
open(os.path.join(dir, ".buildbot-patched"), "w").write("patched\n")
marker = open(os.path.join(dir, ".buildbot-patched"), "w")
marker.write("patched\n")
marker.close()

# Update 'dir' with the 'root' option. Make sure it is a subdirectory
# of dir.
Expand Down Expand Up @@ -2671,8 +2673,7 @@ def _parseIdentify(res):
msg = "Fresh hg repo, don't worry about in-repo branch name"
log.msg(msg)

elif os.path.exists(os.path.join(self.builder.basedir,
self.srcdir, ".buildbot-patched")):
elif self.sourcedirIsPatched():
self.clobber = self._purge

elif self.update_branch != current_branch:
Expand Down

0 comments on commit 281207c

Please sign in to comment.