D4426: zsh_completion: use revsets to exclude this rev from suggestions to hg merge

2018-09-05 Thread av6 (Anton Shestakov)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2815e0db4c54: zsh_completion: use revsets to exclude this rev from suggestions to hg merge (authored by av6, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4426: zsh_completion: use revsets to exclude this rev from suggestions to hg merge

2018-09-03 Thread av6 (Anton Shestakov)
av6 added a comment. Now it's only one call to hg. All possible branches included, even if hg merge that-branch would complain (see my comment above), because in completions it's better to give extra suggestions than to miss some. But this "revision numbers + branch names" got me

D4426: zsh_completion: use revsets to exclude this rev from suggestions to hg merge

2018-09-03 Thread av6 (Anton Shestakov)
av6 updated this revision to Diff 10716. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4426?vs=10682=10716 REVISION DETAIL https://phab.mercurial-scm.org/D4426 AFFECTED FILES contrib/zsh_completion CHANGE DETAILS diff --git

D4426: zsh_completion: use revsets to exclude this rev from suggestions to hg merge

2018-08-31 Thread av6 (Anton Shestakov)
av6 added a comment. It probably would make sense, but you don't need to exclude current branch, because `hg merge mybranch` works when you have more than one branch head (except when you stand on the newest head, unfortunately: "abort: merging with a working directory ancestor has no

D4426: zsh_completion: use revsets to exclude this rev from suggestions to hg merge

2018-08-31 Thread spectral (Kyle Lippincott)
spectral added a comment. Would it make sense to combine this into one hg invocation? I think it wouldn't be that hard (hmm, not as trivial as I thought, but.. not the worst thing ever? :)) allheads=(${(f)"$(_hg_cmd log -r 'sort(head(), -rev)' --template '{ifcontains(rev,

D4426: zsh_completion: use revsets to exclude this rev from suggestions to hg merge

2018-08-30 Thread av6 (Anton Shestakov)
av6 created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY One of the most important aspects of a completion system is its speed, so 2 calls to hg is definitely better than 4. Sorting by rev (descending) is to