[Updated] D10930: dirstate: add default value to _addpath
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sat Jul 3 19:28:35 UTC 2021
Closed by commit rHG523c00383e79: dirstate: add default value to _addpath (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10930?vs=28731&id=28762
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10930/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10930
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
@@ -438,7 +438,7 @@
def copies(self):
return self._map.copymap
- def _addpath(self, f, state, mode, size, mtime):
+ def _addpath(self, f, state, mode, size=NONNORMAL, mtime=AMBIGUOUS_TIME):
oldstate = self[f]
if state == b'a' or oldstate == b'r':
scmutil.checkfilename(f)
@@ -509,7 +509,7 @@
return
if entry[0] == b'm' or entry[0] == b'n' and entry[2] == FROM_P2:
return
- self._addpath(f, b'n', 0, NONNORMAL, AMBIGUOUS_TIME)
+ self._addpath(f, b'n', 0)
self._map.copymap.pop(f, None)
def otherparent(self, f):
@@ -519,15 +519,15 @@
raise error.Abort(msg)
if f in self and self[f] == b'n':
# merge-like
- self._addpath(f, b'm', 0, FROM_P2, AMBIGUOUS_TIME)
+ self._addpath(f, b'm', 0, FROM_P2)
else:
# add-like
- self._addpath(f, b'n', 0, FROM_P2, AMBIGUOUS_TIME)
+ self._addpath(f, b'n', 0, FROM_P2)
self._map.copymap.pop(f, None)
def add(self, f):
'''Mark a file added.'''
- self._addpath(f, b'a', 0, NONNORMAL, AMBIGUOUS_TIME)
+ self._addpath(f, b'a', 0)
self._map.copymap.pop(f, None)
def remove(self, f):
To: marmoute, #hg-reviewers, SimonSapin, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210703/184df17f/attachment-0002.html>
More information about the Mercurial-patches
mailing list