Commits

Yuya Nishihara  committed f3817a7

hgversion: carry minor digit to major like 1.9 to 2.0

  • Participants
  • Parent commits 08559b0

Comments (0)

Files changed (1)

File tortoisehg/util/hgversion.py

     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 '