Print this page
10328 git pbchk falls over with no changesets
*** 123,133 ****
p = git(["for-each-ref", "--format=%(refname:short) %(upstream:short)",
"refs/heads/"])
if not p:
sys.stderr.write("Failed finding git parent branch\n")
! sys.exit(err)
for line in p:
# Git 1.7 will leave a ' ' trailing any non-tracking branch
if ' ' in line and not line.endswith(' \n'):
local, remote = line.split()
--- 123,133 ----
p = git(["for-each-ref", "--format=%(refname:short) %(upstream:short)",
"refs/heads/"])
if not p:
sys.stderr.write("Failed finding git parent branch\n")
! sys.exit(1)
for line in p:
# Git 1.7 will leave a ' ' trailing any non-tracking branch
if ' ' in line and not line.endswith(' \n'):
local, remote = line.split()
*** 139,150 ****
"""Return a list of any checkin comments on this git branch"""
p = git('log --pretty=tformat:%%B:SEP: %s..' % parent)
if not p:
! sys.stderr.write("Failed getting git comments\n")
! sys.exit(err)
return [x.strip() for x in p if x != ':SEP:\n']
def git_file_list(parent, paths=None):
"""Return the set of files which have ever changed on this branch.
--- 139,150 ----
"""Return a list of any checkin comments on this git branch"""
p = git('log --pretty=tformat:%%B:SEP: %s..' % parent)
if not p:
! sys.stderr.write("No outgoing changesets found - missing -p option?\n");
! sys.exit(1)
return [x.strip() for x in p if x != ':SEP:\n']
def git_file_list(parent, paths=None):
"""Return the set of files which have ever changed on this branch.
*** 155,165 ****
p = git("log --name-only --pretty=format: %s.. %s" %
(parent, ' '.join(paths)))
if not p:
sys.stderr.write("Failed building file-list from git\n")
! sys.exit(err)
ret = set()
for fname in p:
if fname and not fname.isspace() and fname not in ret:
ret.add(fname.strip())
--- 155,165 ----
p = git("log --name-only --pretty=format: %s.. %s" %
(parent, ' '.join(paths)))
if not p:
sys.stderr.write("Failed building file-list from git\n")
! sys.exit(1)
ret = set()
for fname in p:
if fname and not fname.isspace() and fname not in ret:
ret.add(fname.strip())