comparison hgsubversion/util.py @ 1040:ada2400241c4

fixes for running under Mercurial 2.0
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Mon, 05 Aug 2013 20:27:31 +0200
parents 3df6ed4e7561
children 67e11b650e94
comparison
equal deleted inserted replaced
1039:3df6ed4e7561 1040:ada2400241c4
6 6
7 from mercurial import cmdutil 7 from mercurial import cmdutil
8 from mercurial import error 8 from mercurial import error
9 from mercurial import hg 9 from mercurial import hg
10 from mercurial import node 10 from mercurial import node
11 from mercurial import repair
11 from mercurial import util as hgutil 12 from mercurial import util as hgutil
12 13
13 try: 14 try:
14 from collections import deque 15 from collections import deque
15 except: 16 except:
81 map(lambda p: os.path.exists(os.path.join(path, p)), 82 map(lambda p: os.path.exists(os.path.join(path, p)),
82 ('hooks', 'format', 'db',))): 83 ('hooks', 'format', 'db',))):
83 return True 84 return True
84 path = path.rsplit('/', 1)[0] 85 path = path.rsplit('/', 1)[0]
85 return False 86 return False
87
88 def strip(ui, repo, changesets, *args , **opts):
89 try:
90 repair.strip(ui, repo, changesets, *args, **opts)
91 except TypeError:
92 # only 2.1.2 and later allow strip to take a list of nodes
93 for changeset in changesets:
94 repair.strip(ui, repo, changeset, *args, **opts)
86 95
87 96
88 def version(ui): 97 def version(ui):
89 """Return version information if available.""" 98 """Return version information if available."""
90 try: 99 try: