mercurial/subrepo.py
branchstable
changeset 14898 95ced9f5bf29
parent 14820 7ef125fa9b35
child 14963 c035f1c53e39
child 14994 a115b5ee9c63
--- a/mercurial/subrepo.py	Mon Jul 18 22:58:21 2011 +0200
+++ b/mercurial/subrepo.py	Tue Jul 19 13:43:53 2011 -0500
@@ -420,6 +420,10 @@
         return self._repo._checknested(self._repo.wjoin(path))
 
     def commit(self, text, user, date):
+        # don't bother committing in the subrepo if it's only been
+        # updated
+        if not self.dirty(True):
+            return self._repo['.'].hex()
         self._repo.ui.debug("committing subrepo %s\n" % subrelpath(self))
         n = self._repo.commit(text, user, date)
         if not n: