Patchwork [2,of,6,V2] subrepo: introduce storeclean method

login
register
mail settings
Submitter Angel Ezquerra
Date March 9, 2013, 12:12 a.m.
Message ID <2571bfc8b921dcf449cf.1362787955@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/1088/
State Accepted
Commit 9a171baa9202fed5169884713f4e03e676af092f
Headers show

Comments

Angel Ezquerra - March 9, 2013, 12:12 a.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1360973480 -3600
#      Sat Feb 16 01:11:20 2013 +0100
# Node ID 2571bfc8b921dcf449cfc755ee4f4c82f681edf6
# Parent  252c0f551d94b790f50361cf67f14ff7fcb029b0
subrepo: introduce storeclean method

Currently this method is unused and it is not implemented for any specific
subrepo type (it always returns False). It receives a remote repository path
because a repository may have a clean store versus a given repository but not
versus another.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -313,6 +313,13 @@ 
 
 class abstractsubrepo(object):
 
+    def storeclean(self, path):
+        """
+        returns true if the repository has not changed since it was last
+        cloned from or pushed to a given repository.
+        """
+        return False
+
     def dirty(self, ignoreupdate=False):
         """returns true if the dirstate of the subrepo is dirty or does not
         match current stored state. If ignoreupdate is true, only check