# HG changeset patch # User Sune Foldager <c...@cyanite.org> # Date 1258722828 -3600 # Node ID 93571981eb5dbde97b3a34c8c429e32789082c2e # Parent 67d9c1223260d5fd5107d37354185492c16bbd01 improve parsing of Mercurual version string
diff --git a/tortoisehg/util/hgversion.py b/tortoisehg/util/hgversion.py --- a/tortoisehg/util/hgversion.py +++ b/tortoisehg/util/hgversion.py @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. +import re + try: # post 1.1.2 from mercurial import util @@ -23,7 +25,7 @@ if not v or v == 'unknown' or len(v) >= 12: # can't make any intelligent decisions about unknown or hashes return - vers = v.split('.')[:2] + vers = re.split(r'\.|-', v)[:2] if vers == reqver or len(vers) < 2: return nextver = list(reqver) ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop