Mercurial > hg
diff contrib/shrink-revlog.py @ 14034:1f667030b139
shrink-revlog: defend against null first parents
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 29 Apr 2011 09:28:45 -0500 |
parents | e5dd974a99fa |
children | b9e1b041744f |
line wrap: on
line diff
--- a/contrib/shrink-revlog.py Fri Apr 29 12:46:56 2011 -0500 +++ b/contrib/shrink-revlog.py Fri Apr 29 09:28:45 2011 -0500 @@ -30,7 +30,10 @@ while visit: cur = visit[-1] for p in edges[cur]: - if p not in finished: + # defend against node.nullrev because it's occasionally + # possible for a node to have parents (null, something) + # rather than (something, null) + if p not in finished and p != node.nullrev: visit.append(p) break else: