[Updated] D11010: dirstate: introduce an internal `_add` method
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Sat Jul 10 20:51:08 UTC 2021
baymax added a comment.
baymax edited the summary of this revision.
baymax retitled this revision from "dirstate: introduce and internal `_add` method" to "dirstate: introduce an internal `_add` method".
baymax updated this revision to Diff 29145.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11010?vs=29141&id=29145
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11010/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11010
AFFECTED FILES
mercurial/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -387,7 +387,7 @@
source = self._map.copymap.get(f)
if source:
copies[f] = source
- self.add(f)
+ self._add(f)
return copies
def setbranch(self, branch):
@@ -547,8 +547,12 @@
def add(self, f):
'''Mark a file added.'''
- self._addpath(f, added=True)
- self._map.copymap.pop(f, None)
+ self._add(f)
+
+ def _add(self, filename):
+ """internal function to mark a file as added"""
+ self._addpath(filename, added=True)
+ self._map.copymap.pop(filename, None)
def remove(self, f):
'''Mark a file removed.'''
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210710/cb90fa53/attachment-0002.html>
More information about the Mercurial-patches
mailing list