mercurial/context.py
changeset 19687 54b3b4821bfb
parent 19686 e189c8ff33d3
child 19688 21e1068109a7
equal deleted inserted replaced
19686:e189c8ff33d3 19687:54b3b4821bfb
   985         assert self._ignored is not None  # must call status first
   985         assert self._ignored is not None  # must call status first
   986         return self._ignored
   986         return self._ignored
   987     def clean(self):
   987     def clean(self):
   988         assert self._clean is not None  # must call status first
   988         assert self._clean is not None  # must call status first
   989         return self._clean
   989         return self._clean
       
   990     def branch(self):
       
   991         return encoding.tolocal(self._extra['branch'])
   990 
   992 
   991 class workingctx(commitablectx):
   993 class workingctx(commitablectx):
   992     """A workingctx object makes access to data related to
   994     """A workingctx object makes access to data related to
   993     the current working directory convenient.
   995     the current working directory convenient.
   994     date - any valid date string or (unixtime, offset), or None.
   996     date - any valid date string or (unixtime, offset), or None.
  1012         p = self._repo.dirstate.parents()
  1014         p = self._repo.dirstate.parents()
  1013         if p[1] == nullid:
  1015         if p[1] == nullid:
  1014             p = p[:-1]
  1016             p = p[:-1]
  1015         return [changectx(self._repo, x) for x in p]
  1017         return [changectx(self._repo, x) for x in p]
  1016 
  1018 
  1017     def branch(self):
       
  1018         return encoding.tolocal(self._extra['branch'])
       
  1019     def closesbranch(self):
  1019     def closesbranch(self):
  1020         return 'close' in self._extra
  1020         return 'close' in self._extra
  1021     def extra(self):
  1021     def extra(self):
  1022         return self._extra
  1022         return self._extra
  1023 
  1023