Mercurial > evolve
comparison hgext/evolve.py @ 1283:35d8789ea7a8
merge with stable
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 23 Apr 2015 03:18:30 +0200 |
parents | 749c931aa47b 891c3ce894fa |
children | d1c29db2e055 |
comparison
equal
deleted
inserted
replaced
1272:749c931aa47b | 1283:35d8789ea7a8 |
---|---|
17 - alters core commands and extensions that rewrite history to use | 17 - alters core commands and extensions that rewrite history to use |
18 this feature, | 18 this feature, |
19 - improves some aspect of the early implementation in Mercurial core | 19 - improves some aspect of the early implementation in Mercurial core |
20 ''' | 20 ''' |
21 | 21 |
22 __version__ = '5.1.3' | 22 __version__ = '5.1.4' |
23 testedwith = '3.3.3 3.4-rc' | 23 testedwith = '3.3.3 3.4-rc' |
24 buglink = 'http://bz.selenic.com/' | 24 buglink = 'http://bz.selenic.com/' |
25 | 25 |
26 import sys, os | 26 import sys, os |
27 import random | 27 import random |
28 from StringIO import StringIO | 28 from StringIO import StringIO |
29 import struct | 29 import struct |
30 import urllib | |
31 import re | 30 import re |
32 sha1re = re.compile(r'\b[0-9a-f]{6,40}\b') | 31 sha1re = re.compile(r'\b[0-9a-f]{6,40}\b') |
33 | 32 |
34 import mercurial | 33 import mercurial |
35 from mercurial import util | 34 from mercurial import util |
2755 if kwargs.get('obsmarkers', False): | 2754 if kwargs.get('obsmarkers', False): |
2756 if heads is None: | 2755 if heads is None: |
2757 heads = repo.heads() | 2756 heads = repo.heads() |
2758 obscommon = kwargs.get('evo_obscommon', ()) | 2757 obscommon = kwargs.get('evo_obscommon', ()) |
2759 assert obscommon | 2758 assert obscommon |
2760 obsset = repo.set('::%ln - ::%ln', heads, obscommon) | 2759 obsset = repo.unfiltered().set('::%ln - ::%ln', heads, obscommon) |
2761 subset = [c.node() for c in obsset] | 2760 subset = [c.node() for c in obsset] |
2762 markers = repo.obsstore.relevantmarkers(subset) | 2761 markers = repo.obsstore.relevantmarkers(subset) |
2763 exchange.buildobsmarkerspart(bundler, markers) | 2762 exchange.buildobsmarkerspart(bundler, markers) |
2764 | 2763 |
2765 @eh.uisetup | 2764 @eh.uisetup |
2934 elif v0: | 2933 elif v0: |
2935 treefunc = _obsrelsethashtreefm0 | 2934 treefunc = _obsrelsethashtreefm0 |
2936 else: | 2935 else: |
2937 treefunc = _obsrelsethashtreefm1 | 2936 treefunc = _obsrelsethashtreefm1 |
2938 | 2937 |
2939 treefunc = _obsrelsethashtree | |
2940 for chg, obs in treefunc(repo): | 2938 for chg, obs in treefunc(repo): |
2941 ui.status('%s %s\n' % (node.hex(chg), node.hex(obs))) | 2939 ui.status('%s %s\n' % (node.hex(chg), node.hex(obs))) |
2942 | 2940 |
2943 _bestformat = max(obsolete.formats.keys()) | 2941 _bestformat = max(obsolete.formats.keys()) |
2944 | 2942 |