Mercurial > hg
view tests/test-convert-bzr @ 7177:09ed32b79656
mq: Fix --qrefresh --short to work with --exclude and --include
pmezard expects
hg qref -s -X b
to apply the -X to the list of files in the patch, and thus remove b from the
patch.
That's how it worked before f7fc5f5ecd62. That change seemed sensible, but it
wasn't...
mpm says
(17:22:30) pmezard_: kiilerix1: do you mean that -X should be forbidden with -s ?
(17:22:54) pmezard_: kiilerix1: and --include too
(17:23:03) mpm: No because you should be able to say hg qref -s foo* -X foo-bar
so mpm expects
hg qref -s -X b *
to apply the -X to the list of files in the working directory, and thus don't
include b in the patch
This patch tries to make both usecases work by creating a matchfn which uses
the include/excludes but not the filelist.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 19 Oct 2008 16:31:24 +0200 |
parents | 9e6d6568bf7a |
children | dbcf5d52fcf5 |
line wrap: on
line source
#!/bin/sh . "$TESTDIR/bzr-definitions" echo % create and rename on the same file in the same step mkdir test-createandrename cd test-createandrename bzr init -q source cd source echo a > a bzr add -q a bzr commit -q -m 'Initial add: a' bzr mv a b echo a2 >> a bzr add -q a bzr commit -q -m 'rename a into b, create a' cd .. hg convert source source-hg glog -R source-hg echo "% test --rev option" hg convert -r 1 source source-1-hg glog -R source-1-hg cd .. echo % merge mkdir test-merge cd test-merge cat > helper.py <<EOF import sys from bzrlib import workingtree wt = workingtree.WorkingTree.open('.') message, stamp = sys.argv[1:] wt.commit(message, timestamp=int(stamp)) EOF bzr init -q source cd source echo content > a echo content2 > b bzr add -q a b bzr commit -q -m 'Initial add' cd .. bzr branch -q source source-improve cd source echo more >> a python ../helper.py 'Editing a' 100 cd ../source-improve echo content3 >> b python ../helper.py 'Editing b' 200 cd ../source bzr merge -q ../source-improve bzr commit -q -m 'Merged improve branch' cd .. hg convert --datesort source source-hg glog -R source-hg cd .. echo % symlinks and executable files mkdir test-symlinks cd test-symlinks bzr init -q source cd source touch program chmod +x program ln -s program altname bzr add -q altname program bzr commit -q -m 'Initial setup' touch newprog chmod +x newprog rm altname ln -s newprog altname chmod -x program bzr add -q newprog bzr commit -q -m 'Symlink changed, x bits changed' cd .. hg convert source source-hg manifest source-hg 0 manifest source-hg tip cd ..