This is an archive of the discontinued Mercurial Phabricator instance.

merge-lists: make it possible to specify pattern to match
ClosedPublic

Authored by martinvonz on Tue, Mar 22, 12:58 AM.

Details

Summary

The merge-lists tool doesn't know anything about Python other than
its regex that attempts to match import lines. Let's make it possible
to pass in a custom regex so it's easy to use the tool for e.g. C/C++
#include lines or Rust use lines (given the limited).

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

martinvonz created this revision.Tue, Mar 22, 12:58 AM
Alphare accepted this revision as: Alphare.Tue, Mar 22, 5:44 AM
Alphare added a subscriber: Alphare.

The same comments as the last patch apply here.

The same comments as the last patch apply here.

Done. Thanks again for the tip about clap's "derive" feature!

Alphare added inline comments.Wed, Mar 23, 4:42 AM
contrib/merge-lists/src/main.rs
1

Missing a space here?

martinvonz marked an inline comment as done.Thu, Mar 24, 11:51 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.