[PATCH STABLE] hghave: deal with "rc" release

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Apr 25 19:19:51 UTC 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1556212622 -7200
#      Thu Apr 25 19:17:02 2019 +0200
# Branch stable
# Node ID fcaf2e87d89a2f4b12dfde47c29183a04436c442
# Parent  ae68418cc3a1a01f7d33f9bad6a3f016d31c544c
# EXP-Topic hghave
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r fcaf2e87d89a
hghave: deal with "rc" release

Without this change, 5.0rc0 is not recognised as 5.0

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -142,7 +142,7 @@ def has_bzr():
 
 @checkvers("bzr", "Canonical's Bazaar client >= %s", (1.14,))
 def has_bzr_range(v):
-    major, minor = v.split('.')[0:2]
+    major, minor = v.split('rc')[0].split('.')[0:2]
     try:
         import bzrlib
         return (bzrlib.__doc__ is not None


More information about the Mercurial-devel mailing list