vamolessa / verco

A simple Git/Mercurial/PlasticSCM tui client based on keyboard shortcuts
229 stars 13 forks source link

More robust log manipulation for shortcuts #18

Closed Alphare closed 3 years ago

Alphare commented 4 years ago

The current log replacement for shortcuts does not work well when hashes are referred to inside revision descriptions.

This change does 2 things:

This requires the addition of a dependency on regex, which is one of the best crates in the ecosystem and will most likely be used in other future patches.

Alphare commented 4 years ago

Two notes:

The regex is re-compiled at every invocation. It should not really matter since it's small, but in general, they should be in a lazy_static.

Also I think this notion of shortcuts would be better served with a more intuitive and robust "selection mode", so maybe this whole dance is temporary

vamolessa commented 4 years ago

This is cool

At the same time, however, I'd like to design something more robust to deal with inputing commit hashes. The current system has some limitations such as: only the first 26 visible or something hashes have shortcuts; you can only use them if you first run log;

Some suggestions:

Gonna open an issue for this

Alphare commented 4 years ago

Oh absolutely. This is just a temporary fix, because right now the output is slower than it needs and bugged. I agree that the log view (and the general handling) should be rethought, as mentioned in #24

vamolessa commented 4 years ago

With the new reelase, the hash is parsed directly from the raw output, which is then formatted to the screen. We can revisit this solution if we get to the point of, say, reconstruct the log graph inside verco.

vamolessa commented 3 years ago

closing this since we no longer use log shortcuts instead focusing on a 'menu' like interface to drive quick checkouts/merges/diffs