Patchwork [43,of,48,RFC] commitablectx: move dirs from workingctx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <337d91d1d8fa975f2e05.1378411657@laptop.local>
Download mbox | patch
Permalink /patch/2381/
State Accepted
Commit 8f48f5969b475a3140ed9cc78513065cba2e533d
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376516434 18000
#      Wed Aug 14 16:40:34 2013 -0500
# Node ID 337d91d1d8fa975f2e0589d87c716cabfea98592
# Parent  2ce3f8546d756db6b937ff22c6a53308bd7a0724
commitablectx: move dirs from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1057,10 +1057,13 @@ 
             self._repo.dirstate.normal(f)
         for f in self.removed():
             self._repo.dirstate.drop(f)
         self._repo.dirstate.setparents(node)
 
+    def dirs(self):
+        return self._repo.dirstate.dirs()
+
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
     date - any valid date string or (unixtime, offset), or None.
     user - username string, or None.
@@ -1183,13 +1186,10 @@ 
                     self._repo.dirstate.add(dest)
                 self._repo.dirstate.copy(source, dest)
             finally:
                 wlock.release()
 
-    def dirs(self):
-        return self._repo.dirstate.dirs()
-
 class workingfilectx(basefilectx):
     """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):
         self._repo = repo