equal
deleted
inserted
replaced
833 This adds an output label of "ui.debug". |
833 This adds an output label of "ui.debug". |
834 ''' |
834 ''' |
835 if self.debugflag: |
835 if self.debugflag: |
836 opts['label'] = opts.get('label', '') + ' ui.debug' |
836 opts['label'] = opts.get('label', '') + ' ui.debug' |
837 self.write(*msg, **opts) |
837 self.write(*msg, **opts) |
838 def edit(self, text, user, extra=None, editform=None): |
838 |
|
839 def edit(self, text, user, extra=None, editform=None, pending=None): |
839 if extra is None: |
840 if extra is None: |
840 extra = {} |
841 extra = {} |
841 (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt", |
842 (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt", |
842 text=True) |
843 text=True) |
843 try: |
844 try: |
852 if label in extra: |
853 if label in extra: |
853 environ.update({'HGREVISION': extra[label]}) |
854 environ.update({'HGREVISION': extra[label]}) |
854 break |
855 break |
855 if editform: |
856 if editform: |
856 environ.update({'HGEDITFORM': editform}) |
857 environ.update({'HGEDITFORM': editform}) |
|
858 if pending: |
|
859 environ.update({'HG_PENDING': pending}) |
857 |
860 |
858 editor = self.geteditor() |
861 editor = self.geteditor() |
859 |
862 |
860 self.system("%s \"%s\"" % (editor, name), |
863 self.system("%s \"%s\"" % (editor, name), |
861 environ=environ, |
864 environ=environ, |