diff mercurial/subrepo.py @ 12162:af8c4929931c

localrepo: add auditor attribute which knows about subrepos
author Martin Geisler <mg@lazybytes.net>
date Fri, 03 Sep 2010 12:58:51 +0200
parents 63eab3b74ba6
children 441a74b8def1
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Sep 02 23:45:47 2010 +0200
+++ b/mercurial/subrepo.py	Fri Sep 03 12:58:51 2010 +0200
@@ -210,6 +210,10 @@
         """
         raise NotImplementedError
 
+    def checknested(path):
+        """check if path is a subrepository within this repository"""
+        return False
+
     def commit(self, text, user, date):
         """commit the current changes to the subrepo with the given
         log message. Use given user and date if possible. Return the
@@ -280,6 +284,9 @@
             return True
         return w.dirty() # working directory changed
 
+    def checknested(self, path):
+        return self._repo._checknested(self._repo.wjoin(path))
+
     def commit(self, text, user, date):
         self._repo.ui.debug("committing subrepo %s\n" % relpath(self))
         n = self._repo.commit(text, user, date)