Mercurial > hg
changeset 9974:da5209afe1bc
context: parents() already filters nullid
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 01 Dec 2009 01:08:16 +0100 |
parents | d1319ad5071b |
children | 2e67734e1453 |
files | mercurial/context.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Tue Dec 01 01:03:54 2009 +0100 +++ b/mercurial/context.py Tue Dec 01 01:08:16 2009 +0100 @@ -439,12 +439,11 @@ for f in sorted(visit, key=lambda x: x.rev()): curr = decorate(f.data(), f) for p in parents(f): - if p != nullid: - curr = pair(hist[p], curr) - # trim the history of unneeded revs - needed[p] -= 1 - if not needed[p]: - del hist[p] + curr = pair(hist[p], curr) + # trim the history of unneeded revs + needed[p] -= 1 + if not needed[p]: + del hist[p] hist[f] = curr return zip(hist[f][0], hist[f][1].splitlines(True))