Mercurial > hg-stable
changeset 10929:c2bf61e48f35
merge with stable
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 16 Apr 2010 01:58:14 +0200 |
parents | 4d81cbd8a851 (current diff) 377d879e9d1b (diff) |
children | 230ab9a23594 |
files | |
diffstat | 3 files changed, 43 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Apr 15 22:34:26 2010 +0200 +++ b/mercurial/context.py Fri Apr 16 01:58:14 2010 +0200 @@ -687,7 +687,7 @@ node, flag = self._repo.manifest.find(mnode, orig) ff = self._repo.dirstate.flagfunc(lambda x: flag or None) try: - return ff(orig) + return ff(path) except OSError: pass
--- a/tests/test-git-import Thu Apr 15 22:34:26 2010 +0200 +++ b/tests/test-git-import Fri Apr 16 01:58:14 2010 +0200 @@ -4,7 +4,7 @@ cd a echo % new file -hg import -mnew - <<EOF +hg import -d "1000000 0" -mnew - <<EOF diff --git a/new b/new new file mode 100644 index 0000000..7898192 @@ -13,25 +13,28 @@ @@ -0,0 +1 @@ +a EOF +hg tip -q echo % new empty file -hg import -mempty - <<EOF +hg import -d "1000000 0" -mempty - <<EOF diff --git a/empty b/empty new file mode 100644 EOF +hg tip -q hg locate empty echo % chmod +x -hg import -msetx - <<EOF +hg import -d "1000000 0" -msetx - <<EOF diff --git a/new b/new old mode 100644 new mode 100755 EOF +hg tip -q test -x new || echo failed echo % copy -hg import -mcopy - <<EOF +hg import -d "1000000 0" -mcopy - <<EOF diff --git a/new b/copy old mode 100755 new mode 100644 @@ -43,6 +46,7 @@ copy from new copy to copyx EOF +hg tip -q if "$TESTDIR/hghave" -q execbit; then test -f copy -a ! -x copy || echo failed @@ -54,17 +58,18 @@ hg cat copy echo % rename -hg import -mrename - <<EOF +hg import -d "1000000 0" -mrename - <<EOF diff --git a/copy b/rename similarity index 100% rename from copy rename to rename EOF +hg tip -q hg locate echo % delete -hg import -mdelete - <<EOF +hg import -d "1000000 0" -mdelete - <<EOF diff --git a/copyx b/copyx deleted file mode 100755 index 7898192..0000000 @@ -73,12 +78,13 @@ @@ -1 +0,0 @@ -a EOF +hg tip -q hg locate test -f copyx && echo failed || true echo % regular diff -hg import -mregular - <<EOF +hg import -d "1000000 0" -mregular - <<EOF diff --git a/rename b/rename index 7898192..72e1fe3 100644 --- a/rename @@ -90,9 +96,10 @@ +a +a EOF +hg tip -q echo % copy and modify -hg import -mcopymod - <<EOF +hg import -d "1000000 0" -mcopymod - <<EOF diff --git a/rename b/copy2 similarity index 80% copy from rename @@ -108,11 +115,12 @@ a a EOF +hg tip -q hg cat copy2 echo % rename and modify -hg import -mrenamemod - <<EOF +hg import -d "1000000 0" -mrenamemod - <<EOF diff --git a/copy2 b/rename2 similarity index 80% rename from copy2 @@ -128,12 +136,13 @@ +c a EOF +hg tip -q hg locate copy2 hg cat rename2 echo % one file renamed multiple times -hg import -mmultirenames - <<EOF +hg import -d "1000000 0" -mmultirenames - <<EOF diff --git a/rename2 b/rename3 rename from rename2 rename to rename3 @@ -141,6 +150,7 @@ rename from rename2 rename to rename3-2 EOF +hg tip -q hg log -vr. --template '{rev} {files} / {file_copies}\n' hg locate rename2 rename3 rename3-2 @@ -152,7 +162,7 @@ hg add foo hg ci -m 'add foo' echo % binary files and regular patch hunks -hg import -m binaryregular - <<EOF +hg import -d "1000000 0" -m binaryregular - <<EOF diff --git a/binary b/binary new file mode 100644 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 @@ -164,11 +174,12 @@ rename from foo rename to foo2 EOF +hg tip -q cat foo2 hg manifest --debug | grep binary echo % many binary files -hg import -m multibinary - <<EOF +hg import -d "1000000 0" -m multibinary - <<EOF diff --git a/mbinary1 b/mbinary1 new file mode 100644 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 @@ -184,10 +195,11 @@ Mc\${NkU|\`?^000jF3jhEB EOF +hg tip -q hg manifest --debug | grep mbinary echo % filenames with spaces -hg import -m spaces - <<EOF +hg import -d "1000000 0" -m spaces - <<EOF diff --git a/foo bar b/foo bar new file mode 100644 index 0000000..257cc56 @@ -196,10 +208,11 @@ @@ -0,0 +1 @@ +foo EOF +hg tip -q cat "foo bar" echo % copy then modify the original file -hg import -m copy-mod-orig - <<EOF +hg import -d "1000000 0" -m copy-mod-orig - <<EOF diff --git a/foo2 b/foo2 index 257cc56..fe08ec6 100644 --- a/foo2 @@ -212,5 +225,6 @@ copy from foo2 copy to foo3 EOF +hg tip -q cat foo3
--- a/tests/test-git-import.out Thu Apr 15 22:34:26 2010 +0200 +++ b/tests/test-git-import.out Fri Apr 16 01:58:14 2010 +0200 @@ -1,29 +1,37 @@ % new file applying patch from stdin +0:ae3ee40d2079 % new empty file applying patch from stdin +1:ab199dc869b5 empty % chmod +x applying patch from stdin +2:3a34410f282e % copy applying patch from stdin +3:37bacb7ca14d a a % rename applying patch from stdin +4:47b81a94361d copyx empty new rename % delete applying patch from stdin +5:d9b001d98336 empty new rename % regular diff applying patch from stdin +6:ebe901e7576b % copy and modify applying patch from stdin +7:18f368958ecd a a b @@ -31,6 +39,7 @@ a % rename and modify applying patch from stdin +8:c32b0d7e6f44 a a b @@ -38,6 +47,7 @@ a % one file renamed multiple times applying patch from stdin +9:034a6bf95330 9 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2) rename3 rename3-2 @@ -54,15 +64,19 @@ a % binary files and regular patch hunks applying patch from stdin +11:c39bce63e786 foo 045c85ba38952325e126c70962cc0f9d9077bc67 644 binary % many binary files applying patch from stdin +12:30b530085242 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1 a874b471193996e7cb034bb301cac7bdaf3e3f46 644 mbinary2 % filenames with spaces applying patch from stdin +13:04750ef42fb3 foo % copy then modify the original file applying patch from stdin +14:c4cd9cdeaa74 foo