##// END OF EJS Templates
get_changeset uses now mercurial revrange to filter out branches....
marcink -
r3746:76b935e7 beta
parent child Browse files
Show More
@@ -18,8 +18,9 b' from rhodecode.lib.vcs.utils.lazy import'
18 from rhodecode.lib.vcs.utils.ordered_dict import OrderedDict
18 from rhodecode.lib.vcs.utils.ordered_dict import OrderedDict
19 from rhodecode.lib.vcs.utils.paths import abspath
19 from rhodecode.lib.vcs.utils.paths import abspath
20
20
21 from rhodecode.lib.vcs.utils.hgcompat import ui, nullid, match, patch, diffopts, clone, \
21 from rhodecode.lib.vcs.utils.hgcompat import ui, nullid, match, patch, \
22 get_contact, pull, localrepository, RepoLookupError, Abort, RepoError, hex
22 diffopts, clone, get_contact, pull, localrepository, RepoLookupError, \
23 Abort, RepoError, hex, scmutil
23
24
24
25
25 class MercurialRepository(BaseRepository):
26 class MercurialRepository(BaseRepository):
@@ -472,14 +473,19 b' class MercurialRepository(BaseRepository'
472 ' this repository' % branch_name)
473 ' this repository' % branch_name)
473 if end_pos is not None:
474 if end_pos is not None:
474 end_pos += 1
475 end_pos += 1
476 #filter branches
475
477
476 slice_ = reversed(self.revisions[start_pos:end_pos]) if reverse else \
478 if branch_name:
477 self.revisions[start_pos:end_pos]
479 revisions = scmutil.revrange(self._repo,
480 ['branch("%s")' % (branch_name)])
481 else:
482 revisions = self.revisions
483
484 slice_ = reversed(revisions[start_pos:end_pos]) if reverse else \
485 revisions[start_pos:end_pos]
478
486
479 for id_ in slice_:
487 for id_ in slice_:
480 cs = self.get_changeset(id_)
488 cs = self.get_changeset(id_)
481 if branch_name and cs.branch != branch_name:
482 continue
483 if start_date and cs.date < start_date:
489 if start_date and cs.date < start_date:
484 continue
490 continue
485 if end_date and cs.date > end_date:
491 if end_date and cs.date > end_date:
General Comments 0
You need to be logged in to leave comments. Login now