# HG changeset patch # User Matt Mackall # Date 1305243304 18000 # Node ID ba883fa211f336cd98bcec44ae6952f4e65ba972 # Parent 9bbac962f4ddb8bf5277004ea5f61453eb8d7698 subrepo: use a safer revision check for hg repos This avoids a traceback if the expected revision has been stripped. diff -r 9bbac962f4dd -r ba883fa211f3 mercurial/subrepo.py --- a/mercurial/subrepo.py Thu May 12 20:27:35 2011 +0200 +++ b/mercurial/subrepo.py Thu May 12 18:35:04 2011 -0500 @@ -408,7 +408,7 @@ if r == '' and not ignoreupdate: # no state recorded return True w = self._repo[None] - if w.p1() != self._repo[r] and not ignoreupdate: + if r != w.p1().node() and not ignoreupdate: # different version checked out return True return w.dirty() # working directory changed