D3021: context: drop support for changeid='' (API)
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Apr 2 17:15:53 UTC 2018
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
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)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list