Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable 2.0 hgversion: require Mercurial 1.8

Changeset 81a60ce2dba7

Parent 998b7fa5956e

by Steve Borho

Changes to one file · Browse files at 81a60ce2dba7 Showing diff from parent 998b7fa5956e Diff from another changeset...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
22
23
24
25
26
27
28
29
30
31
32
33
34
35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 # hgversion.py - Version information for Mercurial  #  # Copyright 2009 Steve Borho <steve@borho.org>  #  # 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   hgversion = util.version()  except AttributeError:   # <= 1.1.2   from mercurial import version   hgversion = version.get_version()    def checkhgversion(v):   """range check the Mercurial version""" - reqver = ['1', '7'] + reqver = ['1', '8']   v = v.split('+')[0]   if not v or v == 'unknown' or len(v) >= 12:   # can't make any intelligent decisions about unknown or hashes   return   vers = re.split(r'\.|-', v)[:2]   if vers == reqver or len(vers) < 2:   return   nextver = list(reqver)   nextver[1] = chr(ord(reqver[1])+1)   if vers == nextver:   return   return (('This version of TortoiseHg requires Mercurial '   'version %s.n to %s.n, but finds %s') %   ('.'.join(reqver), '.'.join(nextver), v))