Show More
@@ -587,6 +587,9 b" coreconfigitem('experimental', 'remotena" | |||||
587 | coreconfigitem('experimental', 'removeemptydirs', |
|
587 | coreconfigitem('experimental', 'removeemptydirs', | |
588 | default=True, |
|
588 | default=True, | |
589 | ) |
|
589 | ) | |
|
590 | coreconfigitem('experimental', 'revisions.prefixhexnode', | |||
|
591 | default=False, | |||
|
592 | ) | |||
590 | coreconfigitem('experimental', 'revlogv2', |
|
593 | coreconfigitem('experimental', 'revlogv2', | |
591 | default=None, |
|
594 | default=None, | |
592 | ) |
|
595 | ) |
@@ -437,6 +437,9 b' def formatrevnode(ui, rev, node):' | |||||
437 | return '%d:%s' % (rev, hexfunc(node)) |
|
437 | return '%d:%s' % (rev, hexfunc(node)) | |
438 |
|
438 | |||
439 | def resolvehexnodeidprefix(repo, prefix): |
|
439 | def resolvehexnodeidprefix(repo, prefix): | |
|
440 | if (prefix.startswith('x') and | |||
|
441 | repo.ui.configbool('experimental', 'revisions.prefixhexnode')): | |||
|
442 | prefix = prefix[1:] | |||
440 | try: |
|
443 | try: | |
441 | # Uses unfiltered repo because it's faster when prefix is ambiguous/ |
|
444 | # Uses unfiltered repo because it's faster when prefix is ambiguous/ | |
442 | # This matches the shortesthexnodeidprefix() function below. |
|
445 | # This matches the shortesthexnodeidprefix() function below. |
@@ -1773,6 +1773,16 b' Test explicit numeric revision' | |||||
1773 |
|
1773 | |||
1774 | Test hexadecimal revision |
|
1774 | Test hexadecimal revision | |
1775 | $ log 'id(2)' |
|
1775 | $ log 'id(2)' | |
|
1776 | $ log 'id(5)' | |||
|
1777 | 2 | |||
|
1778 | $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x5)' | |||
|
1779 | 2 | |||
|
1780 | $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x5' | |||
|
1781 | 2 | |||
|
1782 | $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x)' | |||
|
1783 | $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x' | |||
|
1784 | abort: 00changelog.i@: ambiguous identifier! | |||
|
1785 | [255] | |||
1776 | $ log 'id(23268)' |
|
1786 | $ log 'id(23268)' | |
1777 | 4 |
|
1787 | 4 | |
1778 | $ log 'id(2785f51eece)' |
|
1788 | $ log 'id(2785f51eece)' |
General Comments 0
You need to be logged in to leave comments.
Login now