Commits

windix committed c5e588b

Fix the compare logic for outgoing -- to make it works for hg version >= 2.1

  • Participants
  • Parent commits e461cd2

Comments (0)

Files changed (1)

File mercurial_reviewboard/__init__.py

         return repo.findoutgoing(remoterepo)
 
     try:
-        if util.version().startswith('2.1'):
+        # grab the first two digits of version number and convert to float, so '2.2.1' => 2.2
+        version = float('.'.join(util.version().split('.')[:2]))
+
+        if version >= 2.1:
             outgoing = discovery.findcommonoutgoing(repo, remoterepo)
             return outgoing.missing
         common, outheads = discovery.findcommonoutgoing(repo, remoterepo)