Page MenuHomePhabricator

rhg: Add support for -R and --repository command-line arguments
ClosedPublic

Authored by SimonSapin on Mon, Feb 8, 5:44 PM.

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

SimonSapin created this revision.Mon, Feb 8, 5:44 PM
Alphare added a subscriber: Alphare.Tue, Feb 9, 4:21 AM
Alphare added inline comments.
rust/hg-core/src/repo.rs
57

TIL that some_path.join(some_absolute_path) == some_abolute_path, which makes sense.

rust/rhg/src/commands/files.rs
57–59

There exists a path_to_hg_path_buf util that you should probably use here and below.

64–65

We should see if working_directory is the same as cwd so as to not allocate in the common path. files is a performance-sensitive command in CI/server environments.

tests/test-rhg.t
14

Just to make the same point as yesterday but publicly: this should only be printed if we're in no-fallback mode (and with a different error code). But we'll get to that later.

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