# HG changeset patch # User Pierre-Yves David # Date 1439856098 25200 # Node ID f869033391b9e1f4325224111a13a7189d23c851 # Parent 8f469f81129cb1dc5c1883a7bcb0a2151b0030d6 directaccesss: also look for symbol into list revrange is now much smarted and optimise multiple simple symbol (like hash) into an efficient '_list' call. So we need to look into these to find user provided input too. diff -r 8f469f81129c -r f869033391b9 hgext/directaccess.py --- a/hgext/directaccess.py Wed Aug 12 20:38:39 2015 -0700 +++ b/hgext/directaccess.py Mon Aug 17 17:01:38 2015 -0700 @@ -129,6 +129,8 @@ hashre = util.re.compile('[0-9a-fA-F]{1,40}') +_listtuple = ('symbol', '_list') + def gethashsymbols(tree): # Returns the list of symbols of the tree that look like hashes # for example for the revset 3::abe3ff it will return ('abe3ff') @@ -143,6 +145,13 @@ if hashre.match(tree[1]): return [tree[1]] return [] + elif tree[0] == "func" and tree[1] == _listtuple: + # the optimiser will group sequence of hash request + result = [] + for entry in tree[2][1].split('\0'): + if hashre.match(entry): + result.append(entry) + return result elif len(tree) == 3: return gethashsymbols(tree[1]) + gethashsymbols(tree[2]) else: diff -r 8f469f81129c -r f869033391b9 tests/test-inhibit.t --- a/tests/test-inhibit.t Wed Aug 12 20:38:39 2015 -0700 +++ b/tests/test-inhibit.t Mon Aug 17 17:01:38 2015 -0700 @@ -404,8 +404,7 @@ [255] $ hg rebase -r ad78ff7d621f -r 53a94305e133 -d 2db36d8066ff Warning: accessing hidden changesets 2db36d8066ff for write operation - Warning: accessing hidden changesets ad78ff7d621f for write operation - Warning: accessing hidden changesets 53a94305e133 for write operation + Warning: accessing hidden changesets ad78ff7d621f,53a94305e133 for write operation rebasing 10:ad78ff7d621f "add cK" rebasing 11:53a94305e133 "add cL" $ hg log -G