[PATCH 48 of 48 RFC] commitablefilectx: move children from workingfilectx

Sean Farley sean.michael.farley at gmail.com
Thu Sep 5 15:07:42 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376592176 18000
#      Thu Aug 15 13:42:56 2013 -0500
# Node ID 60cb11ee04192bf4bb3189d6c5b4861bc3abbb0e
# Parent  2605b1bde276bfc54a27158b288a2deccd14c53c
commitablefilectx: move children from workingfilectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1224,10 +1224,13 @@
             pl.append((path, filenode(pc, path), fl))
 
         return [filectx(self._repo, p, fileid=n, filelog=l)
                 for p, n, l in pl if n != nullid]
 
+    def children(self):
+        return []
+
 class workingfilectx(commitablefilectx):
     """A workingfilectx object makes access to data related to a particular
        file in the working directory convenient."""
     def __init__(self, repo, path, filelog=None, workingctx=None):
         super(workingfilectx, self).__init__(repo, path, filelog, workingctx)
@@ -1242,13 +1245,10 @@
         rp = self._repo.dirstate.copied(self._path)
         if not rp:
             return None
         return rp, self._changectx._parents[0]._manifest.get(rp, nullid)
 
-    def children(self):
-        return []
-
     def size(self):
         return os.lstat(self._repo.wjoin(self._path)).st_size
     def date(self):
         t, tz = self._changectx.date()
         try:


More information about the Mercurial-devel mailing list