Patchwork [25,of,48,RFC] commitablectx: move removed from workingctx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <60969eba78b8efa02147.1378411639@laptop.local>
Download mbox | patch
Permalink /patch/2363/
State Accepted
Commit 42ffc7f31acf576f9046a081aaf6a68788872461
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376514929 18000
#      Wed Aug 14 16:15:29 2013 -0500
# Node ID 60969eba78b8efa021479fa3cb96cbf39adc220c
# Parent  099d75b3133bf6109c1ab426075d9b30957082c7
commitablectx: move removed from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -972,10 +972,12 @@ 
 
     def modified(self):
         return self._status[0]
     def added(self):
         return self._status[1]
+    def removed(self):
+        return self._status[2]
 
 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.
@@ -999,12 +1001,10 @@ 
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def removed(self):
-        return self._status[2]
     def deleted(self):
         return self._status[3]
     def unknown(self):
         assert self._unknown is not None  # must call status first
         return self._unknown