changeset 781:16252bea2026

svnexternals: update subrepo after mercurial changes
author Patrick Mezard <pmezard@gmail.com>
date Sun, 23 Jan 2011 22:41:42 +0100
parents 13e24740a500
children 1f1aeb1f5ffc
files hgsubversion/svnexternals.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnexternals.py
+++ b/hgsubversion/svnexternals.py
@@ -408,9 +408,14 @@ if subrepo:
         def dirty(self, ignoreupdate=False):
             # You cannot compare anything with HEAD. Just accept it
             # can be anything.
-            wcrev = self._wcrev()
-            if (wcrev == 'HEAD' or self._state[1] == 'HEAD' or
-                wcrev == self._state[1] or ignoreupdate) and not self._wcchanged()[0]:
+            if hasattr(self, '_wcrevs'):
+                wcrevs = self._wcrevs()
+            else:
+                wcrev = self._wcrev()
+                wcrevs = (wcrev, wcrev)
+            if (('HEAD' in wcrevs or self._state[1] == 'HEAD' or
+                self._state[1] in wcrevs or ignoreupdate)
+                and not self._wcchanged()[0]):
                 return False
             return True