From patchwork Tue Feb 4 06:12:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D8069: manifest: remove optional default= argument on flags(path) From: phabricator X-Patchwork-Id: 44914 Message-Id: <683b0b69356d6d6a7d083d20314c49d2@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 4 Feb 2020 06:12:33 +0000 Closed by commit rHGdbbae122f5e4: manifest: remove optional default= argument on flags(path) (authored by durin42). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8069?vs=19866&id=19867 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8069/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8069 AFFECTED FILES mercurial/interfaces/repository.py mercurial/manifest.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -460,7 +460,7 @@ __bool__ = __nonzero__ def __setitem__(self, key, node): - self._lm[key] = node, self.flags(key, b'') + self._lm[key] = node, self.flags(key) def __contains__(self, key): if key is None: @@ -595,11 +595,11 @@ except KeyError: return default - def flags(self, key, default=b''): + def flags(self, key): try: return self._lm[key][1] except KeyError: - return default + return b'' def copy(self): c = manifestdict() diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py --- a/mercurial/interfaces/repository.py +++ b/mercurial/interfaces/repository.py @@ -1027,8 +1027,8 @@ def get(path, default=None): """Obtain the node value for a path or a default value if missing.""" - def flags(path, default=b''): - """Return the flags value for a path or a default value if missing.""" + def flags(path): + """Return the flags value for a path (default: empty bytestring).""" def copy(): """Return a copy of this manifest."""