comparison hgsubversion/compathacks.py @ 1599:7bb6562feb85

compathacks: drop branchset() which is compat code for hg<2.9
author Pulkit Goyal <pulkit@yandex-team.ru>
date Tue, 27 Nov 2018 14:08:11 +0300
parents 51e105c7f0c6
children 5d8603f080c5
comparison
equal deleted inserted replaced
1598:394007c5efea 1599:7bb6562feb85
2 2
3 import errno 3 import errno
4 import sys 4 import sys
5 5
6 from mercurial import util 6 from mercurial import util
7
8 def branchset(repo):
9 """Return the set of branches present in a repo.
10
11 Works around branchtags() vanishing between 2.8 and 2.9.
12 """
13 try:
14 return set(repo.branchmap())
15 except AttributeError:
16 return set(repo.branchtags())
17 7
18 def pickle_load(f): 8 def pickle_load(f):
19 import cPickle as pickle 9 import cPickle as pickle
20 f.seek(0) 10 f.seek(0)
21 return pickle.load(f) 11 return pickle.load(f)