Mercurial > public > mercurial-scm > hg
comparison mercurial/changelog.py @ 26094:df41c7be16d6
reachableroots: construct and sort baseset in revset module
This can remove the dependency from changelog to revset, which seems a bit awkward
for me.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 28 Aug 2015 11:14:24 +0900 |
parents | be8a4e0800d8 |
children | ed003859f1d8 |
comparison
equal
deleted
inserted
replaced
26093:204131131766 | 26094:df41c7be16d6 |
---|---|
16 | 16 |
17 from . import ( | 17 from . import ( |
18 encoding, | 18 encoding, |
19 error, | 19 error, |
20 revlog, | 20 revlog, |
21 revset, | |
22 util, | 21 util, |
23 ) | 22 ) |
24 | 23 |
25 _defaultextra = {'branch': 'default'} | 24 _defaultextra = {'branch': 'default'} |
26 | 25 |
184 # XXX need filtering too | 183 # XXX need filtering too |
185 self.rev(self.node(0)) | 184 self.rev(self.node(0)) |
186 return self._nodecache | 185 return self._nodecache |
187 | 186 |
188 def reachableroots(self, minroot, heads, roots, includepath=False): | 187 def reachableroots(self, minroot, heads, roots, includepath=False): |
189 rroots = self.index.reachableroots2(minroot, heads, roots, includepath) | 188 return self.index.reachableroots2(minroot, heads, roots, includepath) |
190 rroots = revset.baseset(rroots) | |
191 rroots.sort() | |
192 return rroots | |
193 | 189 |
194 def headrevs(self): | 190 def headrevs(self): |
195 if self.filteredrevs: | 191 if self.filteredrevs: |
196 try: | 192 try: |
197 return self.index.headrevsfiltered(self.filteredrevs) | 193 return self.index.headrevsfiltered(self.filteredrevs) |