Mercurial > treepkg
comparison bin/listpackages.py @ 328:dd2bd0ccd674
Revisions are now handled as strings
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 17 Mar 2010 14:26:16 +0000 |
parents | 1fcdffbeb9de |
children |
comparison
equal
deleted
inserted
replaced
327:f5282057838a | 328:dd2bd0ccd674 |
---|---|
41 | 41 |
42 split_revision = raw_revision.split("-") | 42 split_revision = raw_revision.split("-") |
43 if len(split_revision) > 2: | 43 if len(split_revision) > 2: |
44 raise ValueError("Cannot parse revision %r; too many '-' signs" | 44 raise ValueError("Cannot parse revision %r; too many '-' signs" |
45 % raw_revision) | 45 % raw_revision) |
46 revision = int(split_revision[0]) | 46 revision = split_revision[0] |
47 if len(split_revision) == 1: | 47 if len(split_revision) == 1: |
48 rulesrev = None | 48 rulesrev = None |
49 else: | 49 else: |
50 rulesrev = int(split_revision[1]) | 50 rulesrev = split_revision[1] |
51 | 51 |
52 return revision, rulesrev | 52 return revision, rulesrev |
53 | 53 |
54 def format_revision(main_rev, rules_rev): | 54 def format_revision(main_rev, rules_rev): |
55 formatted = str(main_rev) | 55 formatted = str(main_rev) |