This is an archive of the discontinued Mercurial Phabricator instance.

rhg: fix dirstate-v2 data file removal system
ClosedPublic

Authored by Alphare on Apr 25 2022, 12:15 PM.

Details

Summary

In D12581 I introduced logic to remove the previous dirstate-v2 data file
after a new one is created (and its corresponding docket), but the logic was
flawed. I fixed it and made it simpler to understand by gather all logic in
a single expression.

Diff Detail

Repository
rHG Mercurial
Branch
stable
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

Alphare created this revision.Apr 25 2022, 12:15 PM
Alphare planned changes to this revision.Apr 25 2022, 12:51 PM

There are some minor issues with this patch, I'll update it soon

baymax updated this revision to Diff 33314.Apr 26 2022, 10:30 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)
⚠ This patch is intended for stable ⚠

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
baymax updated this revision to Diff 33319.Apr 27 2022, 10:33 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)
⚠ This patch is intended for stable ⚠

av6 added a subscriber: av6.Wed, May 4, 7:30 AM
av6 added inline comments.
tests/test-dirstate.t
137

I know this already landed, but I don't think bash or dash allow you to match variables with globs like that. In my limited testing this was always echoing no:

P=rust+c
if [ "$P" = *"rust"* ]; then echo yes; else echo no; fi