1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Yuya Nishihara  committed f3817a7

hgversion: carry minor digit to major like 1.9 to 2.0

  • Participants
  • Parent commits 08559b0
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/util/hgversion.py

View file
     vers = re.split(r'\.|-', v)[:2]
     if vers == reqver or len(vers) < 2:
         return
-    nextver = list(reqver)
-    nextver[1] = str(int(reqver[1])+1)
+    nextver = map(str, divmod(int(reqver[0]) * 10 + int(reqver[1]) + 1, 10))
     if vers == nextver:
         return
     return (('This version of TortoiseHg requires Mercurial '