##// END OF EJS Templates
tests: unify test-mq
tests: unify test-mq

File last commit:

r11886:73112cb2 merge default
r11894:a15936ac default
Show More
test-revset
146 lines | 2.3 KiB | text/plain | TextLexer
Peter Arrenbrecht
revset: add some tests
r11409 #!/bin/sh
Matt Mackall
tests: extend revset test
r11419 HGENCODING=utf-8
export HGENCODING
Peter Arrenbrecht
revset: add some tests
r11409 try() {
echo '% hg debugrevspec' $@
Matt Mackall
tests: extend revset test
r11419 hg debugrevspec --debug $@
}
log() {
echo "% log '$1'"
hg log --template '{rev}\n' -r "$1"
Peter Arrenbrecht
revset: add some tests
r11409 }
hg init repo
cd repo
Matt Mackall
tests: extend revset test
r11419
echo a > a
Peter Arrenbrecht
revset: add some tests
r11409 hg branch a
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm0
echo b > b
Peter Arrenbrecht
revset: add some tests
r11409 hg branch b
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm1
rm a
Peter Arrenbrecht
revset: add some tests
r11409 hg branch a-b-c-
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm2 -u Bob
hg co 1
hg branch +a+b+c+
hg ci -Aqm3
hg co 2 # interleave
echo bb > b
Peter Arrenbrecht
revset: add some tests
r11409 hg branch -- -a-b-c-
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm4 -d "May 12 2005"
hg co 3
Peter Arrenbrecht
revset: add some tests
r11409 hg branch /a/b/c/
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm"5 bug"
hg merge 4
Peter Arrenbrecht
revset: add some tests
r11409 hg branch _a_b_c_
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm"6 issue619"
Peter Arrenbrecht
revset: add some tests
r11409 hg branch .a.b.c.
Matt Mackall
tests: extend revset test
r11419 hg ci -Aqm7
hg branch all
hg ci --close-branch -Aqm8
hg co 4
hg branch é
hg ci -Aqm9
hg tag -r6 1.0
Peter Arrenbrecht
revset: add some tests
r11409
Wagner Bruna
revset: fix outgoing argument handling
r11882 hg clone --quiet -U -r 7 . ../remote1
hg clone --quiet -U -r 8 . ../remote2
echo "[paths]" >> .hg/hgrc
echo "default = ../remote1" >> .hg/hgrc
Peter Arrenbrecht
revset: add some tests
r11409 # names that should work without quoting
try a
try b-a
try _a_b_c_
try _a_b_c_-a
try .a.b.c.
try .a.b.c.-a
Matt Mackall
tests: extend revset test
r11419 try -- '-a-b-c-' # complains
log -a-b-c- # succeeds with fallback
try -- -a-b-c--a # complains
try é
Peter Arrenbrecht
revset: add some tests
r11409
# quoting needed
try '"-a-b-c-"-a'
Matt Mackall
tests: extend revset test
r11419 log '1 or 2'
log '1|2'
log '1 and 2'
log '1&2'
try '1&2|3' # precedence - and is higher
try '1|2&3'
try '1&2&3' # associativity
try '1|(2|3)'
log '1.0' # tag
log 'a' # branch
log '2785f51ee'
log 'date(2005)'
log 'date(this is a test)'
log 'date()'
log 'date'
log 'date('
log 'date(tip)'
log '"date"'
log 'date(2005) and 1::'
log 'ancestor(1)'
log 'ancestor(4,5)'
Matt Mackall
revset: fix ancestor subset handling (issue2298)
r11650 log 'ancestor(4,5) and 4'
Matt Mackall
tests: extend revset test
r11419 log 'ancestors(5)'
log 'author(bob)'
log 'branch(é)'
log 'children(ancestor(4,5))'
log 'closed()'
log 'contains(a)'
log 'descendants(2 or 3)'
log 'file(b)'
log 'follow()'
log 'grep("issue\d+")'
log 'head()'
log 'heads(6::)'
log 'keyword(issue)'
log 'limit(head(), 1)'
log 'max(contains(a))'
Nicolas Dumazet
revset: add min function
r11708 log 'min(contains(a))'
Matt Mackall
tests: extend revset test
r11419 log 'merge()'
log 'modifies(b)'
Wagner Bruna
revset: fix outgoing argument handling
r11882 log 'outgoing()'
log 'outgoing("../remote1")'
log 'outgoing("../remote2")'
Matt Mackall
tests: extend revset test
r11419 log 'p1(merge())'
log 'p2(merge())'
log 'parents(merge())'
log 'removes(a)'
log 'roots(all())'
log 'reverse(2 or 3 or 4 or 5)'
log 'sort(limit(reverse(all()), 3))'
log 'sort(2 or 3 or 4 or 5, date)'
log 'tagged()'
log 'user(bob)'
log '4::8'
log '4:8'
log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
Matt Mackall
revset: deal with empty sets in range endpoints...
r11456
log 'not 0 and 0:2'
log 'not 1 and 0:2'
log 'not 2 and 0:2'
log '(1 and 2)::'
log '(1 and 2):'
log '(1 and 2):3'
Matt Mackall
revset: make negate work for sort specs
r11467 log 'sort(head(), -rev)'