D464: commit: use an unambiguous path suffix for the commit editor file

smf (Sean Farley) phabricator at mercurial-scm.org
Mon Aug 28 18:00:29 EDT 2017


smf added inline comments.

INLINE COMMENTS

> durin42 wrote in cmdutil.py:3214
> I agree with smf: this patch is accomplishing a reasonable thing, but we should clean up this interface if we're going to use it. Let's add an action= parameter that's optional in the 4.4 cycle, with a devel warning if it's not specified. Then in 4.4 we can make it a mandatory parameter for ui.edit().
> 
> Right now the only client of this poke-something-in-extra API is histedit, so the time is right to clean up the API before more consumers do silly things. For your immediate goal in this patch, here's what I'd suggest as a compromise:
> 
> 1. Add the new action=None business to ui.edit(), which then makes suffix='.hg$ACTION.txt' or similar
> 2. Update histedit to use that instead of screwing around with 'suffix' in extra
> 3. Remove support for 'suffix' in extra
> 4. Do this patch, but with action='commit' instead of poking '.hgcommit.txt' in the extra
> 
> How does that sound to everyone?

Yeah, this is pretty much what I had in mind (sorry again for the confusion!). I also don't have any preference for '.hg.$ACTION.txt' just for it to be something sane / stable.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D464

To: mbolin, quark, durin42, #hg-reviewers, ryanmce
Cc: smf, ryanmce, mercurial-devel


More information about the Mercurial-devel mailing list