Commit Graph

8 Commits

Author SHA1 Message Date
Jun Wu
7fa918cefd perftweaks: move commit head detection removal logic to core
Summary: Also change the internal API so it no longer accepts the "heads" argument.

Reviewed By: ryanmce

Differential Revision: D6745865

fbshipit-source-id: 368742be49b192f7630421003552d0a10eb0b76d
2018-04-13 21:50:52 -07:00
Yuya Nishihara
99bf8cc324 revpair: do not optimize tree to check for odd-range spec
At 9069882b46bf, we had to optimize a parsed tree to resolve x^:y ambiguity.
Since we've moved the resolution of x^:y to parse(), we no longer have to call
optimize(). Therefore, (x:y) can be taken as a single expression, not an odd
range expression x:y.
2016-08-06 20:46:53 +09:00
Yuya Nishihara
8e8af6e090 revpair: restrict odd-range handling to top-level x:y expression (issue4774)
The odd-range hack was introduced by 9afcfbca1710 for backward compatibility,
but it was too widely applied. I've checked cmdutil.revpair() at 1.6, and
found that ".:", ":0" and ":" are also handled as pairs. So let's enable the
hack only for "x:y", "x:", "y:" and ":".

test-revset.t is updated because "tip^::tip^ or tip^" shouldn't be taken as
an odd range. This patch adds "tip^:tip^" instead.

This patch is written for the default branch because parse() of the stable
branch lacks compatibility hack for "foo+bar" tag. If we want to mitigate the
issue in stable, we can add something like "and '::' in revs[0]".
2015-08-13 16:15:43 +09:00
Yuya Nishihara
de0c78a969 revpair: update test to make a difference if odd range not handled specially
It was added at 9afcfbca1710, but there was no difference between -r2 and -r2:2
because the working directory was clean.
2015-08-13 16:27:32 +09:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Matt Mackall
d4e4a5b5be revpair: handle odd ranges (issue3474) 2012-05-30 14:13:57 -05:00
Mads Kiilerich
4c1897dde5 tests: fix incorrect markup of continued lines of sh commands 2012-04-23 01:39:26 +02:00
Adrian Buehlmann
eb3a2da1b5 tests: unify test-diff-change 2010-08-30 14:38:15 +02:00