Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 18466:ac0c12123743 stable
log: remove any ancestors of nullrev (issue3772)
For the special case, ":null" we remove the implied revision 0 since that
wouldn't make any sense here. A test case is added to make sure only nullrev is
shown.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 23 Jan 2013 00:12:52 -0600 |
parents | 4f9a52858512 |
children | eb95cf4e219d 227479f61db9 |
comparison
equal
deleted
inserted
replaced
18465:3aa8b4b36b64 | 18466:ac0c12123743 |
---|---|
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from i18n import _ | 8 from i18n import _ |
9 from mercurial.node import nullrev | |
9 import util, error, osutil, revset, similar, encoding, phases | 10 import util, error, osutil, revset, similar, encoding, phases |
10 import match as matchmod | 11 import match as matchmod |
11 import os, errno, re, stat, sys, glob | 12 import os, errno, re, stat, sys, glob |
12 | 13 |
13 def nochangesfound(ui, repo, excluded=None): | 14 def nochangesfound(ui, repo, excluded=None): |
645 | 646 |
646 if _revrangesep in spec: | 647 if _revrangesep in spec: |
647 start, end = spec.split(_revrangesep, 1) | 648 start, end = spec.split(_revrangesep, 1) |
648 start = revfix(repo, start, 0) | 649 start = revfix(repo, start, 0) |
649 end = revfix(repo, end, len(repo) - 1) | 650 end = revfix(repo, end, len(repo) - 1) |
651 if end == nullrev and start <= 0: | |
652 start = nullrev | |
650 rangeiter = repo.changelog.revs(start, end) | 653 rangeiter = repo.changelog.revs(start, end) |
651 if not seen and not l: | 654 if not seen and not l: |
652 # by far the most common case: revs = ["-1:0"] | 655 # by far the most common case: revs = ["-1:0"] |
653 l = list(rangeiter) | 656 l = list(rangeiter) |
654 # defer syncing seen until next iteration | 657 # defer syncing seen until next iteration |