comparison mercurial/context.py @ 37151:05c13e5aa9ec

context: change default changeid from old form '' to '.' I don't think I've seen repo[''] in the codebase at least in the last two years. Differential Revision: https://phab.mercurial-scm.org/D2964
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 29 Mar 2018 09:34:17 -0700
parents 656ac240f392
children d7f3fdab94c4
comparison
equal deleted inserted replaced
37150:335e19c6b7fa 37151:05c13e5aa9ec
413 413
414 class changectx(basectx): 414 class changectx(basectx):
415 """A changecontext object makes access to data related to a particular 415 """A changecontext object makes access to data related to a particular
416 changeset convenient. It represents a read-only context already present in 416 changeset convenient. It represents a read-only context already present in
417 the repo.""" 417 the repo."""
418 def __init__(self, repo, changeid=''): 418 def __init__(self, repo, changeid='.'):
419 """changeid is a revision number, node, or tag""" 419 """changeid is a revision number, node, or tag"""
420 420
421 # since basectx.__new__ already took care of copying the object, we 421 # since basectx.__new__ already took care of copying the object, we
422 # don't need to do anything in __init__, so we just exit here 422 # don't need to do anything in __init__, so we just exit here
423 if isinstance(changeid, basectx): 423 if isinstance(changeid, basectx):