annotate tests/fixtures/symlinks.sh @ 97:0d3a2a7cefa3

hg_delta_editor: fix symlink prefix confusion - SubversionRepo.get_file() strips the symlink prefix - Enforce that hg_delta_editor symlink data always contains the prefix. The alternative was seducing and more consistent with hg content but it makes the code more complicated since svn:special can be set before or after the content is set, and we need it in apply_textdelta() This issue fixes jQuery repository conversion at r3674.
author Patrick Mezard <pmezard@gmail.com>
date Thu, 20 Nov 2008 22:41:15 -0600
parents
children 24a64fb0e74b
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
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
23 mkdir d
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
24 ln -s a d/linka
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
25 svn add a linka d
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
26 svn ci -m "add symlinks"
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
27 # Move symlinks
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
28 svn mv linka linkaa
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
29 svn mv d d2
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
30 svn commit -m "moving symlinks"
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
31 # Update symlinks (test "link " prefix vs applydelta)
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
32 echo b > b
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
33 rm linkaa
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
34 ln -s b linkaa
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
35 rm d2/linka
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
36 ln -s b d2/linka
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
37 svn ci -m "update symlinks"
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
38 cd ../..
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
39
0d3a2a7cefa3 hg_delta_editor: fix symlink prefix confusion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
40 svnadmin dump testrepo > ../symlinks.svndump