Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
35675:01496e9269f9 | 35676:9c575c22dcf4 |
---|---|
1330 return True, True, bool(missing) | 1330 return True, True, bool(missing) |
1331 return bool(changes), False, bool(missing) | 1331 return bool(changes), False, bool(missing) |
1332 | 1332 |
1333 @annotatesubrepoerror | 1333 @annotatesubrepoerror |
1334 def dirty(self, ignoreupdate=False, missing=False): | 1334 def dirty(self, ignoreupdate=False, missing=False): |
1335 if self._svnmissing(): | |
1336 return self._state[1] != '' | |
1335 wcchanged = self._wcchanged() | 1337 wcchanged = self._wcchanged() |
1336 changed = wcchanged[0] or (missing and wcchanged[2]) | 1338 changed = wcchanged[0] or (missing and wcchanged[2]) |
1337 if not changed: | 1339 if not changed: |
1338 if self._state[1] in self._wcrevs() or ignoreupdate: | 1340 if self._state[1] in self._wcrevs() or ignoreupdate: |
1339 return False | 1341 return False |