Mercurial > hg
comparison tests/test-subrepo-svn @ 10954:33119d0252c1 stable
subrepo: fix repo root path handling in svn subrepo
author | Brett Cannon <brett@python.org> |
---|---|
date | Sun, 18 Apr 2010 14:20:08 -0700 |
parents | 48c8eb9de0c8 |
children | 0bf79efeaa20 |
comparison
equal
deleted
inserted
replaced
10953:f1250e2e8fd1 | 10954:33119d0252c1 |
---|---|
14 if [ $? -ne 0 ]; then | 14 if [ $? -ne 0 ]; then |
15 escapedwd="/$escapedwd" | 15 escapedwd="/$escapedwd" |
16 fi | 16 fi |
17 escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"` | 17 escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"` |
18 filterpath="s|$escapedwd|/root|" | 18 filterpath="s|$escapedwd|/root|" |
19 filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /' | 19 filteroutofdate='s/ in transaction.*/ is out of date/;s/Out of date: /File /' |
20 filterexternal="s|Fetching external item into '.*/s/externals'|Fetching external item into 's/externals'|g" | |
20 | 21 |
21 echo % create subversion repo | 22 echo % create subversion repo |
22 | 23 |
23 SVNREPO="file://$escapedwd/svn-repo" | 24 SVNREPO="file://$escapedwd/svn-repo" |
24 WCROOT="`pwd`/svn-wc" | 25 WCROOT="`pwd`/svn-wc" |
60 | 61 |
61 echo | 62 echo |
62 echo % change file in svn and hg, commit | 63 echo % change file in svn and hg, commit |
63 echo a >> a | 64 echo a >> a |
64 echo alpha >> s/alpha | 65 echo alpha >> s/alpha |
65 hg commit -m 'Message!' | 66 hg commit -m 'Message!' | sed "$filterexternal" |
66 hg debugsub | sed "$filterpath" | 67 hg debugsub | sed "$filterpath" |
67 | 68 |
68 echo | 69 echo |
69 echo a > s/a | 70 echo a > s/a |
70 echo % should be empty despite change to s/a | 71 echo % should be empty despite change to s/a |
79 svn ci -m 'amend a from svn' | 80 svn ci -m 'amend a from svn' |
80 cd ../../sub/t | 81 cd ../../sub/t |
81 | 82 |
82 echo % this commit from hg will fail | 83 echo % this commit from hg will fail |
83 echo zzz >> s/alpha | 84 echo zzz >> s/alpha |
84 hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn" | 85 hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate" |
85 svn revert -q s/alpha | 86 svn revert -q s/alpha |
86 | 87 |
87 echo % this commit fails because of meta changes | 88 echo % this commit fails because of meta changes |
88 svn propset svn:mime-type 'text/html' s/alpha | 89 svn propset svn:mime-type 'text/html' s/alpha |
89 hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn" | 90 hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate" |
90 svn revert -q s/alpha | 91 svn revert -q s/alpha |
91 | 92 |
92 echo % this commit fails because of externals changes | 93 echo % this commit fails because of externals changes |
93 echo zzz > s/externals/other | 94 echo zzz > s/externals/other |
94 hg ci -m 'amend externals from hg' | 95 hg ci -m 'amend externals from hg' |
104 cd .. | 105 cd .. |
105 hg clone t tc | fix_path | 106 hg clone t tc | fix_path |
106 cd tc | 107 cd tc |
107 echo % debugsub in clone | 108 echo % debugsub in clone |
108 hg debugsub | sed "$filterpath" | 109 hg debugsub | sed "$filterpath" |
110 | |
111 echo % verify subrepo is contained within the repo directory | |
112 python -c "import os.path; print os.path.exists('s')" |