From patchwork Mon Apr 2 17:15:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3021: context: drop support for changeid='' (API) From: phabricator X-Patchwork-Id: 30135 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Mon, 2 Apr 2018 17:15:53 +0000 martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Since the previous commit, there seem to be no users who pass '' to repo.__getitem__, so let's drop support for it. It may seem like a small cost to keep support for it, but I've spent time being confused by it twice already. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3021 AFFECTED FILES mercurial/context.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -411,9 +411,6 @@ """changeid is a revision number, node, or tag""" super(changectx, self).__init__(repo) - if changeid == '': - changeid = '.' - try: if isinstance(changeid, int): self._node = repo.changelog.node(changeid)