cmdcore: override user aliases on hg log
If a user aliased "hg log" to "hg log --graph" (apparently this is widespread, see ), the filter toolbar (CTRL+S), is no longer usable. The reason is that, under the hood, the filter toolbar parses the textual output of hg log, which would now be modified by the aliasing . This change undoes any aliasing of hg log, which reverts back to a well-defined format, ensuring the parsing always succeeds. The fix comes from a suggestion by Yuya: https://groups.google.com/forum/#!msg/thg-dev/CTS0X7KYH_8/Qrz1e-gFAgAJ  https://www.mercurial-scm.org/repo/hg/rev/604c086ddde6f40309c03ae7e5050c7c8d87e75a  For example, looking for head() in the filter toolbar caused this error: Traceback (most recent call last): File "<base>/tortoisehg/hgqt/repomodel.py", line 350, in _onQueryFinished revs = pycompat.maplist(int, bytes(sess.readAll()).splitlines()) ValueError: invalid literal for int() with base 10: 'o 19186' Where the 'o' comes from the graphlog.
Showing with 3 additions and 0 deletions