# HG changeset patch # User Yuya Nishihara # Date 2018-03-24 08:19:32 # Node ID 7f025c9b78655be24edf8364abfe3ff0237fb386 # Parent db114320df7ee744047fe9a92a01afc40f9d0e87 directaccess: do not abort by 'ff...' hash Since the 'ff...' hash should never be hidden, we can just ignore it. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1419,7 +1419,7 @@ def _getrevsfromsymbols(repo, symbols): try: s = pmatch(s) - except error.LookupError: + except (error.LookupError, error.WdirUnsupported): s = None if s is not None: diff --git a/tests/test-directaccess.t b/tests/test-directaccess.t --- a/tests/test-directaccess.t +++ b/tests/test-directaccess.t @@ -179,6 +179,19 @@ This should not throw error foo -bar +Test special hash/rev + + $ hg log -qr 'null:wdir() & 000000000000' + -1:000000000000 + $ hg log -qr 'null:wdir() & ffffffffffff' + 2147483647:ffffffffffff + $ hg log -qr 'null:wdir() & rev(-1)' + -1:000000000000 + $ hg log -qr 'null:wdir() & rev(2147483647)' + 2147483647:ffffffffffff + $ hg log -qr 'null:wdir() & 2147483647' + 2147483647:ffffffffffff + Commands with undefined cmdtype should not work right now $ hg phase -r 28ad74