annotate tests/test-convert @ 5483:0c43f87baba3 default tip

Fix file-changed-to-dir and dir-to-file commits (issue660). Allow adding to dirstate files that clash with previously existing but marked for removal. Protect from reintroducing clashes by revert. This change doesn't address related issues with update. Current workaround is to do "clean" update by manually removing conflicting files/dirs from working directory.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 27 Oct 2007 16:27:55 +0400
parents 71e7c86adcb7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5015
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 #!/bin/sh
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3 echo "[extensions]" >> $HGRCPATH
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4 echo "convert=" >> $HGRCPATH
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
5
5437
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
6 hg help convert
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
7
5015
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8 hg init a
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9 cd a
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
10 echo a > a
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11 hg ci -d'0 0' -Ama
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12 hg cp a b
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13 hg ci -d'1 0' -mb
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
14 hg rm a
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15 hg ci -d'2 0' -mc
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
16 hg mv b a
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17 hg ci -d'3 0' -md
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
18 echo a >> a
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 hg ci -d'4 0' -me
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
21 cd ..
5028
36e8983fe44d test-convert: Hide warning about missing subversion bindings.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5015
diff changeset
22 hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
5015
cb100605a516 convert: add test
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
23 hg --cwd a-hg pull ../a
5437
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
24
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
25 touch bogusfile
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
26 echo % should fail
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
27 hg convert a bogusfile
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
28
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
29 mkdir bogusdir
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
30 chmod 000 bogusdir
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
31
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
32 echo % should fail
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
33 hg convert a bogusdir
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
34
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
35 echo % should succeed
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
36 chmod 700 bogusdir
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
37 hg convert a bogusdir