Commits

Jang Junseong committed b2a080e

use distutils LooseVersion to detect mercurial version

Comments (0)

Files changed (1)

mercurial_reviewboard/__init__.py

 
 import os, errno, re, sys
 import cStringIO
+from distutils.version import LooseVersion
 import operator
 
 from mercurial import cmdutil, hg, ui, mdiff, patch, util
         return repo.findoutgoing(remoterepo)
 
     try:
-        version = map(int, util.version().split('.'))
-        if version >= [2, 1, 0]:
+        if LooseVersion(util.version()) >= LooseVersion('2.1'):
             outgoing = discovery.findcommonoutgoing(repo, remoterepo)
             return outgoing.missing
         else: