import os
+import subprocess
from debian_bundle import changelog
-from debian_bundle import deb822
import invirt.common as c
from invirt.config import structs as config
continue
b = pocketToGit(p)
- current_commit = c.captureOutput(['git', 'rev-parse', b],
- cwd=package_repo).strip()
+ try:
+ current_commit = c.captureOutput(['git', 'rev-parse', b],
+ cwd=package_repo).strip()
+ except subprocess.CalledProcessError:
+ # Guess we haven't created this pocket yet
+ continue
+
current_version = getVersion(package, b)
if current_version == new_version:
# Almost by definition, A is a fast-forward of B if B..A is
# empty
- if not c.captureOutput(['git', 'rev-list', '%s..%s' % (commit, branch)]):
+ if not c.captureOutput(['git', 'rev-list', '%s..%s' % (commit, branch)],
+ cwd=package_repo):
raise InvalidBuild('New commit %s of %s is not a fast-forward of'
'commit currently in pocket %s' %
(commit, package, pocket))