HomePhabricator

basestore: remove unnecessary files with suffix '_old' during clean up

Authored by singhsrb.

Description

basestore: remove unnecessary files with suffix '_old' during clean up

Summary:
There is no logic in place right now to delete the files with suffix
'_old' which are created solely for debugging purposes in addremotefilelognode
method. There is no need to keep these files around if a corresponding file
without the '_old' doesn't exist. Therefore, this commit removes such files if
they are no longer required. This also allows for more robust deletion of the
directories during the clean up because sometimes they contain only the files
with '_old' suffix.

Test Plan:

  • Ran all the tests.
  • Tested that the files with '_old' suffix are removed during hg repack --incremental on a sample repo.

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D1569

Details

Committed
singhsrbDec 1 2017, 2:43 PM
Reviewer
Restricted Project
Differential Revision
D1569: basestore: remove unnecessary files with suffix '_old' during clean up
Parents
rFBHGX3ba13425adb0: basestore: use tryunlink from mercurial.util to try and remove files
Branches
Unknown
Tags
Unknown