mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
debugnamecomplete: show 9 digits for autocompleted rev numbers
Summary: Show 9 characters for autocompleted revs, to match rev numbers shown in e.g. `hg sl`. This makes it a little easier to verify the rev that was autocompleted for you matches the one you were looking at in the smart log (i.e. if you're looking at the end of the rev rather than the beginning). Reviewed By: zzl0 Differential Revision: D46398818 fbshipit-source-id: 70f19d60df7aa85371e1c1838b362b621da5b493
This commit is contained in:
parent
9b36c19d6d
commit
1ffac63e6d
@ -2401,7 +2401,7 @@ def debugnamecomplete(ui, repo, *args, **opts) -> None:
|
||||
|
||||
age = ui.configint("zsh", "completion-age")
|
||||
draft = repo.set("sort(draft() and age('<{}d'), -date)".format(age))
|
||||
draft = [repo.changelog.shortest(cs.hex(), 8) for cs in draft]
|
||||
draft = [repo.changelog.shortest(cs.hex(), 9) for cs in draft]
|
||||
all_completions = []
|
||||
all_completions.extend(draft)
|
||||
all_completions.extend(sorted(n for n in names if n not in ["default", "tip"]))
|
||||
|
Loading…
Reference in New Issue
Block a user