mercurial/context.py
changeset 19689 8dbb66f339f3
parent 19688 21e1068109a7
child 19690 65ff9fd67d8d
equal deleted inserted replaced
19688:21e1068109a7 19689:8dbb66f339f3
   989         return self._clean
   989         return self._clean
   990     def branch(self):
   990     def branch(self):
   991         return encoding.tolocal(self._extra['branch'])
   991         return encoding.tolocal(self._extra['branch'])
   992     def closesbranch(self):
   992     def closesbranch(self):
   993         return 'close' in self._extra
   993         return 'close' in self._extra
       
   994     def extra(self):
       
   995         return self._extra
   994 
   996 
   995 class workingctx(commitablectx):
   997 class workingctx(commitablectx):
   996     """A workingctx object makes access to data related to
   998     """A workingctx object makes access to data related to
   997     the current working directory convenient.
   999     the current working directory convenient.
   998     date - any valid date string or (unixtime, offset), or None.
  1000     date - any valid date string or (unixtime, offset), or None.
  1015     def _parents(self):
  1017     def _parents(self):
  1016         p = self._repo.dirstate.parents()
  1018         p = self._repo.dirstate.parents()
  1017         if p[1] == nullid:
  1019         if p[1] == nullid:
  1018             p = p[:-1]
  1020             p = p[:-1]
  1019         return [changectx(self._repo, x) for x in p]
  1021         return [changectx(self._repo, x) for x in p]
  1020 
       
  1021     def extra(self):
       
  1022         return self._extra
       
  1023 
  1022 
  1024     def tags(self):
  1023     def tags(self):
  1025         t = []
  1024         t = []
  1026         for p in self.parents():
  1025         for p in self.parents():
  1027             t.extend(p.tags())
  1026             t.extend(p.tags())