D468: util: use ~ as a suffix for a temp file in the same directory as a source file
smf (Sean Farley)
phabricator at mercurial-scm.org
Wed Aug 23 16:52:57 EDT 2017
smf added a comment.
In https://phab.mercurial-scm.org/D468#7912, @mbolin wrote:
> @smf As I put in the summary, I think this use of `tempfile.mkstemp()` is different than the others in the codebase because it uses the `dir=` argument to create a file in the working copy. As such, I'd argue that it's reasonable to consider it separately from the others.
>
> In particular, I think it's independent of how temp files are created for things like commit messages as those are paths that are intended to be exposed to the user insofar as they are opened in the user's editor. As it stands, I have https://phab.mercurial-scm.org/D464 out for review as a first step to impose some order on path names for those types of files.
>
> As far as this change is concerned, the focus is to preserve the existing behavior of `mktempcopy()` while minimizing its impact on other developer tools.
Jesus, I confused myself on this patch. Yes, you're right. I completely mistook this for other patches I worked on mucking around with the tmp directories.
That's definitely on me, sorry!
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D468
To: mbolin, #hg-reviewers, quark, durin42
Cc: smf, mercurial-devel
More information about the Mercurial-devel
mailing list