changeset 14312:ba883fa211f3

subrepo: use a safer revision check for hg repos This avoids a traceback if the expected revision has been stripped.
author Matt Mackall <mpm@selenic.com>
date Thu, 12 May 2011 18:35:04 -0500
parents 9bbac962f4dd
children a389dd285282
files mercurial/subrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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