mercurial/context.py
changeset 19666 09459edfb48b
parent 19665 cb0c94ef1ebe
child 19667 40040e4015f9
equal deleted inserted replaced
19665:cb0c94ef1ebe 19666:09459edfb48b
   854                 raise util.Abort(_('branch name not in UTF-8!'))
   854                 raise util.Abort(_('branch name not in UTF-8!'))
   855             self._extra['branch'] = branch
   855             self._extra['branch'] = branch
   856         if self._extra['branch'] == '':
   856         if self._extra['branch'] == '':
   857             self._extra['branch'] = 'default'
   857             self._extra['branch'] = 'default'
   858 
   858 
       
   859     def __str__(self):
       
   860         return str(self._parents[0]) + "+"
       
   861 
   859 class workingctx(commitablectx):
   862 class workingctx(commitablectx):
   860     """A workingctx object makes access to data related to
   863     """A workingctx object makes access to data related to
   861     the current working directory convenient.
   864     the current working directory convenient.
   862     date - any valid date string or (unixtime, offset), or None.
   865     date - any valid date string or (unixtime, offset), or None.
   863     user - username string, or None.
   866     user - username string, or None.
   866                or None to use the repository status.
   869                or None to use the repository status.
   867     """
   870     """
   868     def __init__(self, repo, text="", user=None, date=None, extra=None,
   871     def __init__(self, repo, text="", user=None, date=None, extra=None,
   869                  changes=None):
   872                  changes=None):
   870         super(workingctx, self).__init__(repo, text, user, date, extra, changes)
   873         super(workingctx, self).__init__(repo, text, user, date, extra, changes)
   871 
       
   872     def __str__(self):
       
   873         return str(self._parents[0]) + "+"
       
   874 
   874 
   875     def __nonzero__(self):
   875     def __nonzero__(self):
   876         return True
   876         return True
   877 
   877 
   878     def __contains__(self, key):
   878     def __contains__(self, key):