Skip to content

Commit

Permalink
Fix GitPoller using peeled tags in the ls-remote output
Browse files Browse the repository at this point in the history
  • Loading branch information
obynio committed Sep 25, 2017
1 parent 1b0d355 commit fce8e85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/changes/gitpoller.py
Expand Up @@ -135,7 +135,7 @@ def describe(self):
return str

def _getBranches(self):
d = self._dovccmd('ls-remote', [self.repourl])
d = self._dovccmd('ls-remote', ['--refs', self.repourl])

@d.addCallback
def parseRemote(rows):
Expand Down
10 changes: 5 additions & 5 deletions master/buildbot/test/unit/test_changes_gitpoller.py
Expand Up @@ -706,7 +706,7 @@ def comments(rev):
def test_poll_allBranches_single(self):
self.expectCommands(
gpo.Expect(b'git', b'init', b'--bare', b'gitpoller-work'),
gpo.Expect(b'git', b'ls-remote', self.REPOURL)
gpo.Expect(b'git', b'ls-remote', b'--refs', self.REPOURL)
.stdout(b'4423cdbcbb89c14e50dd5f4152415afd686c5241\t'
b'refs/heads/master\n'),
gpo.Expect(b'git', b'fetch', self.REPOURL,
Expand Down Expand Up @@ -819,7 +819,7 @@ def cb(_):
def test_poll_allBranches_multiple(self):
self.expectCommands(
gpo.Expect(b'git', b'init', b'--bare', b'gitpoller-work'),
gpo.Expect(b'git', b'ls-remote', self.REPOURL)
gpo.Expect(b'git', b'ls-remote', b'--refs', self.REPOURL)
.stdout(b'\n'.join([
b'4423cdbcbb89c14e50dd5f4152415afd686c5241\trefs/heads/master',
b'9118f4ab71963d23d02d4bdc54876ac8bf05acf2\trefs/heads/release',
Expand Down Expand Up @@ -920,7 +920,7 @@ def cb(_):
def test_poll_callableFilteredBranches(self):
self.expectCommands(
gpo.Expect(b'git', b'init', b'--bare', b'gitpoller-work'),
gpo.Expect(b'git', b'ls-remote', self.REPOURL)
gpo.Expect(b'git', b'ls-remote', b'--refs', self.REPOURL)
.stdout(b'\n'.join([
b'4423cdbcbb89c14e50dd5f4152415afd686c5241\trefs/heads/master',
b'9118f4ab71963d23d02d4bdc54876ac8bf05acf2\trefs/heads/release',
Expand Down Expand Up @@ -1010,7 +1010,7 @@ def cb(_):
def test_poll_branchFilter(self):
self.expectCommands(
gpo.Expect(b'git', b'init', b'--bare', b'gitpoller-work'),
gpo.Expect(b'git', b'ls-remote', self.REPOURL)
gpo.Expect(b'git', b'ls-remote', b'--refs', self.REPOURL)
.stdout(b'\n'.join([
b'4423cdbcbb89c14e50dd5f4152415afd686c5241\t'
b'refs/pull/410/merge',
Expand Down Expand Up @@ -1190,7 +1190,7 @@ def check_changes(_):
def test_poll_callableCategory(self):
self.expectCommands(
gpo.Expect(b'git', b'init', b'--bare', b'gitpoller-work'),
gpo.Expect(b'git', b'ls-remote', self.REPOURL)
gpo.Expect(b'git', b'ls-remote', b'--refs', self.REPOURL)
.stdout(b'4423cdbcbb89c14e50dd5f4152415afd686c5241\t'
b'refs/heads/master\n'),
gpo.Expect(b'git', b'fetch', self.REPOURL,
Expand Down

0 comments on commit fce8e85

Please sign in to comment.