comparison tests/test-glog.t @ 16171:336e61875335

graphlog: restore FILE glob expansion on Windows On platforms not supporting shell expansion, scmutil.match() performs glob expansion on 'pats' arguments. But _matchfiles() revset calls match.match() directly, bypassing this behaviour. To avoid duplicating scmutil.match(), a secondary scmutil.matchandpats() is introduced returning both the match object and the expanded inputs. Note the expanded pats are also needed in the fast path, and will be used by --follow code path.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 25 Feb 2012 22:11:34 +0100
parents ef2373ea3d24
children db75321c7a0e
comparison
equal deleted inserted replaced
16170:ef2373ea3d24 16171:336e61875335
1508 1508
1509 $ cd .. 1509 $ cd ..
1510 $ hg init follow 1510 $ hg init follow
1511 $ cd follow 1511 $ cd follow
1512 $ echo a > a 1512 $ echo a > a
1513 $ echo aa > aa
1513 $ hg ci -Am "add a" 1514 $ hg ci -Am "add a"
1514 adding a 1515 adding a
1516 adding aa
1515 $ hg cp a b 1517 $ hg cp a b
1516 $ hg ci -m "copy a b" 1518 $ hg ci -m "copy a b"
1517 $ mkdir dir 1519 $ mkdir dir
1518 $ hg mv b dir 1520 $ hg mv b dir
1519 $ hg ci -m "mv b dir/b" 1521 $ hg ci -m "mv b dir/b"
1547 1549
1548 Test multiple --include/--exclude/paths 1550 Test multiple --include/--exclude/paths
1549 1551
1550 $ testlog --include a --include e --exclude b --exclude e a e 1552 $ testlog --include a --include e --exclude b --exclude e a e
1551 ('group', ('group', ('func', ('symbol', '_matchfiles'), ('list', ('list', ('list', ('list', ('list', ('string', 'p:a'), ('string', 'p:e')), ('string', 'i:a')), ('string', 'i:e')), ('string', 'x:b')), ('string', 'x:e'))))) 1553 ('group', ('group', ('func', ('symbol', '_matchfiles'), ('list', ('list', ('list', ('list', ('list', ('string', 'p:a'), ('string', 'p:e')), ('string', 'i:a')), ('string', 'i:e')), ('string', 'x:b')), ('string', 'x:e')))))
1554
1555 Test glob expansion of pats
1556
1557 $ expandglobs=`python -c "import mercurial.util; \
1558 > print mercurial.util.expandglobs and 'true' or 'false'"`
1559 $ if [ $expandglobs = "true" ]; then
1560 > testlog 'a*';
1561 > else
1562 > testlog a*;
1563 > fi;
1564 ('group', ('group', ('func', ('symbol', 'filelog'), ('string', 'aa'))))