summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-07-29 12:33:54 -0700
committerJesse Keating <jkeating@redhat.com>2010-07-29 12:34:30 -0700
commitcc4d89e57d19b1f569e890920f3d9fb90adf1df1 (patch)
tree8574d471b848c58c44ae5632f35dd33415b63633
parentf120061eb07471770245783a786b70b6dc90e9a0 (diff)
downloadfedora-packager-cc4d89e57d19b1f569e890920f3d9fb90adf1df1.tar.gz
fedora-packager-cc4d89e57d19b1f569e890920f3d9fb90adf1df1.tar.xz
fedora-packager-cc4d89e57d19b1f569e890920f3d9fb90adf1df1.zip
Make fedpkg clone -b f?? package work
Also works for el? and olpc?
-rw-r--r--src/pyfedpkg/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index c956eec..992ca54 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -278,6 +278,12 @@ def clone(module, user, path=os.getcwd(), branch=None, bare_dir=None):
else:
giturl = ANONGITURL % {'module': module}
+ # do some branch name conversions
+ if branch:
+ remotere = 'f\d\d|el\d|olpc\d'
+ if re.match(remotere, branch):
+ branch = '%s/master' % branch
+
# Create the command
cmd = ['git', 'clone']
# do the clone