Mercurial > hg > mercurial-source
changeset 12973:6e0a9f9227bd
merge with stable
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sat, 13 Nov 2010 11:58:51 +0900 |
parents | 91cbba199d8b (current diff) 7916a84c0758 (diff) |
children | 278e3c9b939e |
files | mercurial/cmdutil.py |
diffstat | 2 files changed, 40 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1143,7 +1143,7 @@ continue # only yield rev for which we have the changelog, it can # happen while doing "hg log" during a pull or commit - if linkrev > maxrev or linkrev >= cl_count: + if linkrev >= cl_count: break parentlinkrevs = [] @@ -1185,11 +1185,20 @@ # iterate from latest to oldest revision for rev, flparentlinkrevs, copied in filerevgen(filelog, last): - if rev not in ancestors: - continue - # XXX insert 1327 fix here - if flparentlinkrevs: - ancestors.update(flparentlinkrevs) + if not follow: + if rev > maxrev: + continue + else: + # Note that last might not be the first interesting + # rev to us: + # if the file has been changed after maxrev, we'll + # have linkrev(last) > maxrev, and we still need + # to explore the file graph + if rev not in ancestors: + continue + # XXX insert 1327 fix here + if flparentlinkrevs: + ancestors.update(flparentlinkrevs) fncache.setdefault(rev, []).append(file_) wanted.add(rev)
--- a/tests/test-log.t +++ b/tests/test-log.t @@ -1020,6 +1020,15 @@ summary: add foo, related +Also check when maxrev < lastrevfilelog + + $ hg --traceback log -f -r4 foo + changeset: 4:88176d361b69 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add foo, related + + Issue2383: hg log showing _less_ differences than hg diff $ hg init issue2383 @@ -1092,3 +1101,19 @@ +b $ cd .. + +'hg log -r rev fn' when last(filelog(fn)) != rev + + $ hg init simplelog; cd simplelog + $ echo f > a + $ hg ci -Am'a' -d '0 0' + adding a + $ echo f >> a + $ hg ci -Am'a bis' -d '1 0' + + $ hg log -r0 a + changeset: 0:9f758d63dcde + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a +