From cc4d89e57d19b1f569e890920f3d9fb90adf1df1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 29 Jul 2010 12:33:54 -0700 Subject: Make fedpkg clone -b f?? package work Also works for el? and olpc? --- src/pyfedpkg/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit