This is an archive of the discontinued Mercurial Phabricator instance.

clone: use better names for temp files
ClosedPublic

Authored by aalekseyev on Tue, May 10, 3:30 PM.

Details

Summary

Before this commit, the file names are /tmp/tmpn8smvlr8
After this commit, they are more like /tmp/hg-clone-n8smvlr8/00manifest.ndb3qj52v6,
which makes it much clearer what these files correspond to.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

aalekseyev created this revision.Tue, May 10, 3:30 PM
marmoute requested changes to this revision.Tue, May 17, 11:12 AM
marmoute added a subscriber: marmoute.

There seems to be three patches in one here :

  1. adding a tryrmdir as a last line of defence
  2. using prefix= in mkstemp`
  3. a comment about hardlink=True (that could probably we a fix to the issue here).

Can you split that patch into three patches?

This revision now requires changes to proceed.Tue, May 17, 11:12 AM

I'll remove a hardlink=True comment (which is not really worthy of a phabsend), but I don't understand the purpose of the split between (1) and (2). The only reason we're removing a directory is that we're creating it and putting temp files there.
Actually, a commit message could be improved...

aalekseyev edited the summary of this revision. (Show Details)Tue, May 17, 1:28 PM
aalekseyev updated this revision to Diff 33404.
marmoute accepted this revision.Thu, May 19, 4:57 AM

I'll remove a hardlink=True comment (which is not really worthy of a phabsend), but I don't understand the purpose of the split between (1) and (2). The only reason we're removing a directory is that we're creating it and putting temp files there.
Actually, a commit message could be improved...

Ho right, my mistake.

Alphare accepted this revision.Tue, May 24, 8:47 AM
This revision is now accepted and ready to land.Tue, May 24, 8:47 AM
baymax updated this revision to Diff 33420.

โœ… refresh by Heptapod after a successful CI run (๐Ÿ™ ๐Ÿ’š)

This revision was automatically updated to reflect the committed changes.