summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-08-22 14:15:26 +0200
committerGuido Günther <agx@sigxcpu.org>2009-08-23 17:28:49 +0200
commit46d6c1badef27429b76819025388383ec6163d30 (patch)
tree8276f24bd0b9430d372a0dc0572b5e335a48ec69
parent715d42a8dbbe0f78076bd5ab486b9c933d4f35e7 (diff)
downloadgit-buildpackage-46d6c1badef27429b76819025388383ec6163d30.tar.gz
git-buildpackage-46d6c1badef27429b76819025388383ec6163d30.tar.bz2
git-buildpackage-46d6c1badef27429b76819025388383ec6163d30.zip
make sanitize_version a private function
-rw-r--r--gbp/git.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/git.py b/gbp/git.py
index cf22718a..2fc29c9b 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -188,6 +188,7 @@ class GitRepository(object):
name = os.getenv("GIT_AUTHOR_NAME", name)
return (name, email)
+
def create_repo(path):
"""create a repository at path"""
abspath = os.path.abspath(path)
@@ -206,10 +207,10 @@ def create_repo(path):
def build_tag(format, version):
"""Generate a tag from a given format and a version"""
- return format % dict(version=sanitize_version(version))
+ return format % dict(version=__sanitize_version(version))
-def sanitize_version(version):
+def __sanitize_version(version):
"""sanitize a version so git accepts it as a tag"""
if ':' in version: # strip of any epochs
version = version.split(':', 1)[1]