Patchwork [2,of,3] svnsubrepo: add new method _svnmissing

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Jan. 16, 2018, 1:42 p.m.
Message ID <cebbb137db75c45e891a.1516110136@Iris>
Download mbox | patch
Permalink /patch/26785/
State Accepted
Headers show

Comments

Jordi Gutiérrez Hermoso - Jan. 16, 2018, 1:42 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1515949626 18000
#      Sun Jan 14 12:07:06 2018 -0500
# Node ID cebbb137db75c45e891a65a8dbc50631ed8cb83c
# Parent  fde3cd2487e1f4d5867bf8c6e79139b6fe475779
svnsubrepo: add new method _svnmissing

This is modelled after _gitmissing from dea6efdd7ec4 and also
necessary for svn. I'm not sure exactly how this hasn't been more of a
problem for svn until now, actually.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1284,6 +1284,9 @@  class svnsubrepo(abstractsubrepo):
             raise error.Abort(_('cannot retrieve svn tool version'))
         return (int(m.group(1)), int(m.group(2)))
 
+    def _svnmissing(self):
+        return not self.wvfs.exists('.svn')
+
     def _wcrevs(self):
         # Get the working directory revision as well as the last
         # commit revision so we can compare the subrepo state with