[PATCH 1 of 4 emacs-for-augie] ui: add a parameter to set the temporary directory for edit
Sean Farley
sean at farley.io
Tue Jan 17 06:40:55 UTC 2017
Sean Farley <sean at farley.io> writes:
> # HG changeset patch
> # User Sean Farley <sean at farley.io>
> # Date 1484629522 28800
> # Mon Jan 16 21:05:22 2017 -0800
> # Node ID cb18a2517507a169a7b3c38b369199130b1c89c0
> # Parent 43c5526916752b0f7476a26069709f35590ddb04
> ui: add a parameter to set the temporary directory for edit
>
> This currently does nothing but will allow hg tooling in emacs to use
> this to allow buffers to find the repo via the temp file's parent
> directory.
>
> diff --git a/mercurial/ui.py b/mercurial/ui.py
> index 1e82af6..7da75c3 100644
> --- a/mercurial/ui.py
> +++ b/mercurial/ui.py
> @@ -1010,20 +1010,26 @@ class ui(object):
> '''
> if self.debugflag:
> opts['label'] = opts.get('label', '') + ' ui.debug'
> self.write(*msg, **opts)
>
> - def edit(self, text, user, extra=None, editform=None, pending=None):
> + def edit(self, text, user, extra=None, editform=None, pending=None,
> + tmpdir=None):
> extra_defaults = {
> 'prefix': 'editor',
> 'suffix': '.txt',
> }
> if extra is not None:
> extra_defaults.update(extra)
> extra = extra_defaults
> +
> + tdir = None
> + if self.configbool('experimental', 'tmpsubhg'):
Suggestions for a better config name are welcomed.
More information about the Mercurial-devel
mailing list