return True
return False
+ pq_re = re.compile(r'^%s$' % (pq_format_str % dict(branch="(?P<base>\S+)")))
+ if pq_re.match(branch):
+ return True
+ return False
def pq_branch_name(branch, options, extra_keys=None):
"""
if not is_pq_branch(branch, options):
return pq_format_str % format_fields
+ if not is_pq_branch(branch, options):
+ return pq_format_str % dict(branch=branch)
def pq_branch_base(pq_branch, options):
"""
return GitModifier()
+<<<<<<< HEAD
def switch_to_pq_branch(repo, branch, options, name_keys=None):
+=======
+def switch_to_pq_branch(repo, branch, options):
+>>>>>>> 3ba82da... gbp-pq: readiness to configure the pq branch name
"""
Switch to patch-queue branch if not already there, create it if it
doesn't exist yet
if is_pq_branch(branch, options):
return
+<<<<<<< HEAD
pq_branch = pq_branch_name(branch, options, name_keys)
+=======
+ pq_branch = pq_branch_name(branch, options)
+>>>>>>> 3ba82da... gbp-pq: readiness to configure the pq branch name
if not repo.has_branch(pq_branch):
try:
repo.create_branch(pq_branch)
repo.update_ref('HEAD', commit, msg="gbp-pq import %s" % patch.path)
+<<<<<<< HEAD
def drop_pq(repo, branch, options, name_keys=None):
+=======
+def drop_pq(repo, branch, options):
+>>>>>>> 3ba82da... gbp-pq: readiness to configure the pq branch name
if is_pq_branch(branch, options):
gbp.log.err("On a patch-queue branch, can't drop it.")
raise GbpError
else:
+<<<<<<< HEAD
pq_branch = pq_branch_name(branch, options, name_keys)
+=======
+ pq_branch = pq_branch_name(branch, options)
+>>>>>>> 3ba82da... gbp-pq: readiness to configure the pq branch name
if repo.has_branch(pq_branch):
repo.delete_branch(pq_branch)
repo = self.repo
start = repo.get_branch()
pq = os.path.join('patch-queue', start)
- switch_pq(repo, start)
+ switch_pq(repo, start, TestExport.Options)
self.assertEqual(repo.get_branch(), pq)
export_patches(repo, pq, TestExport.Options)
self.assertEqual(repo.get_branch(), start)