diff mercurial/subrepo.py @ 35676:9c575c22dcf4

svnsubrepo: check if subrepo is missing when checking dirty state (issue5657) During an hg convert command, subrepos are not checked out. However, a manifestmerge may occur during an hg convert if there is a merge commit, which in particular will check the dirty state of subrepos. Before this change, the lack of a checked out subrepo would error out. This check for svn subrepos is modelled after 2fdea636f254 for git subrepos.
author Jordi Guti?rrez Hermoso <jordigh@octave.org>
date Tue, 16 Jan 2018 08:40:14 -0500
parents 1c0ee0befba0
children 0c0689a7565e
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Jan 17 13:02:42 2018 +0100
+++ b/mercurial/subrepo.py	Tue Jan 16 08:40:14 2018 -0500
@@ -1332,6 +1332,8 @@
 
     @annotatesubrepoerror
     def dirty(self, ignoreupdate=False, missing=False):
+        if self._svnmissing():
+            return self._state[1] != ''
         wcchanged = self._wcchanged()
         changed = wcchanged[0] or (missing and wcchanged[2])
         if not changed: