This is an archive of the discontinued Mercurial Phabricator instance.

hg-core: fix path encoding usage
ClosedPublic

Authored by acezar on Sep 29 2020, 11:58 AM.

Details

Summary
  1. Hash encoded path are in .hg/store/dh instead of .hg/store/data.
  1. Path encoded index and data files may not have the same parent path. It is not just about replacing .i by .d

Diff Detail

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

Event Timeline

acezar created this revision.Sep 29 2020, 11:58 AM
acezar updated this revision to Diff 22923.Sep 29 2020, 1:31 PM
Alphare requested changes to this revision.Sep 30 2020, 4:07 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
rust/hg-core/src/operations/cat.rs
149

I don't like the use of format! instead of get_path_from_bytes, no need for UTF8 lossy conversion, that just gives the wrong impression. Maybe that wouldn't work on some platforms, even.

This revision now requires changes to proceed.Sep 30 2020, 4:07 AM
acezar updated this revision to Diff 23267.Oct 20 2020, 6:06 AM
acezar marked an inline comment as done.Oct 20 2020, 6:07 AM

@Alphare are you happy with this now?

Alphare accepted this revision.Oct 29 2020, 4:27 AM

Yes, sorry I forgot about this even though I talked about it with Antoine.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.