annotate tests/fixtures/symlinks.sh @ 1541:adba152a5177

test_util: make developer warnings cause our tests to fail Previously hgsubversion didn't get any help from develwarn calls, because we don't use core's testrunner. The upstream configitem refactor was easier to hunt down using the develwarn being a failure, which prompted this code. It also exposed several locking correctness bugs, so it feels like it's worth keeping around long term. We don't bother with develwarn on anything so old that we don't try to use smartset. The smartset deprecation was not handled gracefully, so hg complains for many versions without actually breaking anything, and it'd pointlessly complicate our code to handle smartset living in multiple places between when the warning was introduced and the present.
author Augie Fackler <raf@durin42.com>
date Sun, 29 Oct 2017 09:07:12 -0400
parents b37c401b7f92
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
97
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1 #!/bin/sh
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
2 #
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
3 # Generate symlinks.svndump
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
4 #
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
5
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
6 mkdir temp
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
7 cd temp
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
8
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
9 mkdir project-orig
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
10 cd project-orig
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
11 mkdir trunk
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
12 mkdir branches
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
13 cd ..
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
14
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
15 svnadmin create testrepo
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
16 svnurl=file://`pwd`/testrepo
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
17 svn import project-orig $svnurl -m "init project"
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
18
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
19 svn co $svnurl project
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
20 cd project/trunk
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
21 echo a > a
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
22 ln -s a linka
145
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
23 ln -s a linka2
97
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
24 mkdir d
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
25 ln -s a d/linka
145
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
26 svn add a linka linka2 d
97
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
27 svn ci -m "add symlinks"
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
28 # Move symlinks
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
29 svn mv linka linkaa
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
30 svn mv d d2
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
31 svn commit -m "moving symlinks"
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
32 # Update symlinks (test "link " prefix vs applydelta)
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
33 echo b > b
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
34 rm linkaa
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
35 ln -s b linkaa
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
36 rm d2/linka
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
37 ln -s b d2/linka
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
38 svn ci -m "update symlinks"
126
24a64fb0e74b run.py: register and develop test_fetch_symlinks
Patrick Mezard <pmezard@gmail.com>
parents: 97
diff changeset
39 # Replace a symlink with a regular file
24a64fb0e74b run.py: register and develop test_fetch_symlinks
Patrick Mezard <pmezard@gmail.com>
parents: 97
diff changeset
40 rm linkaa
24a64fb0e74b run.py: register and develop test_fetch_symlinks
Patrick Mezard <pmezard@gmail.com>
parents: 97
diff changeset
41 echo data > linkaa
24a64fb0e74b run.py: register and develop test_fetch_symlinks
Patrick Mezard <pmezard@gmail.com>
parents: 97
diff changeset
42 svn propdel svn:special linkaa
145
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
43 # Replace another symlink with a regular file in another way
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
44 # It should mark linka2 as R(eplaced)
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
45 svn rm linka2
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
46 echo data2 > linka2
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
47 svn add linka2
b37c401b7f92 hg_delta_editor: reset properties of deleted entries
Patrick Mezard <pmezard@gmail.com>
parents: 126
diff changeset
48 svn propdel svn:special linka2
126
24a64fb0e74b run.py: register and develop test_fetch_symlinks
Patrick Mezard <pmezard@gmail.com>
parents: 97
diff changeset
49 svn rm d2/linka
24a64fb0e74b run.py: register and develop test_fetch_symlinks
Patrick Mezard <pmezard@gmail.com>
parents: 97
diff changeset
50 svn ci -m "undo link"
97
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
51 cd ../..
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
52
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
53 svnadmin dump testrepo > ../symlinks.svndump