Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/thmo/buildbot
Browse files Browse the repository at this point in the history
* 'master' of git://github.com/thmo/buildbot:
  Bugfix: Don't use os.chdir(). Set cwd for the catch_up action.

Refs #1007.
  • Loading branch information
Dustin J. Mitchell committed Oct 4, 2010
2 parents 3265cfc + cb23f72 commit eff7865
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions master/buildbot/changes/gitpoller.py
Expand Up @@ -184,11 +184,10 @@ def _get_changes(self):
log.msg('gitpoller: polling git repo at %s' % self.repourl)

self.lastPoll = time.time()
os.chdir(self.workdir)

# get a deferred object that performs the fetch
args = ['fetch', self.repourl, self.branch]
d = utils.getProcessOutput(self.gitbin, args, env={}, errortoo=1 )
d = utils.getProcessOutput(self.gitbin, args, path=self.workdir, env={}, errortoo=1 )

return d

Expand Down Expand Up @@ -228,7 +227,7 @@ def _catch_up(self, res):
log.msg('gitpoller: catching up to FETCH_HEAD')

args = ['reset', '--hard', 'FETCH_HEAD']
d = utils.getProcessOutputAndValue(self.gitbin, args, env={})
d = utils.getProcessOutputAndValue(self.gitbin, args, path=self.workdir, env={})
return d;

def _changes_finished_ok(self, res):
Expand Down

0 comments on commit eff7865

Please sign in to comment.