mercurial/context.py
changeset 37171 d7f3fdab94c4
parent 37151 05c13e5aa9ec
child 37173 05ff1a155a21
equal deleted inserted replaced
37170:b837655c1509 37171:d7f3fdab94c4
    64             be committed."""
    64             be committed."""
    65     def __new__(cls, repo, changeid='', *args, **kwargs):
    65     def __new__(cls, repo, changeid='', *args, **kwargs):
    66         if isinstance(changeid, basectx):
    66         if isinstance(changeid, basectx):
    67             return changeid
    67             return changeid
    68 
    68 
    69         o = super(basectx, cls).__new__(cls)
    69         return super(basectx, cls).__new__(cls)
    70 
       
    71         o._repo = repo
       
    72         o._rev = nullrev
       
    73         o._node = nullid
       
    74 
       
    75         return o
       
    76 
    70 
    77     def __bytes__(self):
    71     def __bytes__(self):
    78         return short(self.node())
    72         return short(self.node())
    79 
    73 
    80     __str__ = encoding.strmethod(__bytes__)
    74     __str__ = encoding.strmethod(__bytes__)