summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2010-08-09 15:07:19 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2010-08-09 15:07:19 +0200
commit1cb583bbb0aaf7bce3a252b093420477b32dd7cb (patch)
treeff51459753ff2c3862de0803f3c8156437f537e2
parentc145fe8c80d4d6922c92da1c6dbeb068117739bc (diff)
downloadfedora-packager-initial-merge-command/squashed.zip
fedora-packager-initial-merge-command/squashed.tar.gz
fedora-packager-initial-merge-command/squashed.tar.xz
Update doc strings for the sorting functionsinitial-merge-command/squashed
-rwxr-xr-xsrc/pyfedpkg/initial_merge.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pyfedpkg/initial_merge.py b/src/pyfedpkg/initial_merge.py
index 9ca0be8..8fdb179 100755
--- a/src/pyfedpkg/initial_merge.py
+++ b/src/pyfedpkg/initial_merge.py
@@ -45,9 +45,10 @@ log = logging.getLogger("fedpkg")
def str_numsplit(s):
- """Helper function for properly ordering branch names
+ """Helper function for properly ordering branch names.
- Handles branch names like 'fc6', 'f8', 'f10', 'master'.
+ Converts branch names like 'fc6', 'f8', 'f10', 'master' into
+ ('fc',6), ('f',8), ('f',10), 'master', respectively.
"""
assert(not s[0].isdigit())
if not s[-1].isdigit():
@@ -62,7 +63,11 @@ def str_numsplit(s):
def cmp_relbranch(a, b):
- """Comparison function for sort() calls"""
+ """Comparison function release branch names (for sort() calls)
+
+ Sorts branch names like 'el4', 'fc6', 'f8', 'f10', 'master' in
+ that order.
+ """
asplit = str_numsplit(a)
bsplit = str_numsplit(b)
if type(asplit) == str and type(bsplit) == str: