D468: util: use ~ as a suffix for a temp file in the same directory as a source file
mbolin (Michael Bolin)
phabricator at mercurial-scm.org
Wed Aug 23 20:47:05 UTC 2017
mbolin added a comment.
@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.
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