Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

Merge with stable

Changeset bee856b13dd3

Parents 8f309946adce

Parents 266cc36f9999

by Adrian Buehlmann

Changes to one file · Browse files at bee856b13dd3 Showing diff from parent 8f309946adce 266cc36f9999 Diff from another changeset...

 
49
50
51
52
 
 
 
53
54
 
 
 
 
 
 
 
55
56
 
57
58
59
60
61
62
 
 
63
64
65
 
49
50
51
 
52
53
54
55
 
56
57
58
59
60
61
62
63
 
64
65
66
67
68
 
 
69
70
71
72
73
@@ -49,17 +49,25 @@
 def package_version():   try:   branch, version = liveversion() - if '+' in version: + + extra = None + if '+' in version:   version, extra = version.split('+', 1) - major, minor, periodic = version.split('.') + + v = [int(x) for x in version.split('.')] + while len(v) < 3: + v.append(0) + major, minor, periodic = v + + if extra != None:   tagdistance = int(extra.split('-', 1)[0]) - periodic = int(periodic) * 10000 + periodic *= 10000   if branch == 'default':   periodic += tagdistance + 5000   else:   periodic += tagdistance + 1000 - version = '.'.join([major, minor, str(periodic)]) - return version + + return '.'.join([str(x) for x in (major, minor, periodic)])   except:   pass   return _('unknown')