Show More
@@ -273,7 +273,8 b' class svnsubrepo(object):' | |||||
273 | self._ui = ctx._repo.ui |
|
273 | self._ui = ctx._repo.ui | |
274 |
|
274 | |||
275 | def _svncommand(self, commands): |
|
275 | def _svncommand(self, commands): | |
276 | cmd = ['svn'] + commands + [self._path] |
|
276 | path = os.path.join(self._ctx._repo.origroot, self._path) | |
|
277 | cmd = ['svn'] + commands + [path] | |||
277 | cmd = [util.shellquote(arg) for arg in cmd] |
|
278 | cmd = [util.shellquote(arg) for arg in cmd] | |
278 | cmd = util.quotecommand(' '.join(cmd)) |
|
279 | cmd = util.quotecommand(' '.join(cmd)) | |
279 | env = dict(os.environ) |
|
280 | env = dict(os.environ) |
@@ -16,7 +16,8 b' if [ $? -ne 0 ]; then' | |||||
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 |
filter |
|
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 | |||
@@ -62,7 +63,7 b' 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 | |
@@ -81,12 +82,12 b' 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 "$filter |
|
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 "$filter |
|
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 | |
@@ -106,3 +107,6 b' 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')" |
@@ -72,11 +72,11 b' abort: cannot commit svn externals' | |||||
72 |
|
72 | |||
73 | % clone |
|
73 | % clone | |
74 | updating to branch default |
|
74 | updating to branch default | |
75 | A s/alpha |
|
75 | A tc/s/alpha | |
76 | U s |
|
76 | U tc/s | |
77 |
|
77 | |||
78 | Fetching external item into 's/externals' |
|
78 | Fetching external item into 'tc/s/externals' | |
79 | A s/externals/other |
|
79 | A tc/s/externals/other | |
80 | Checked out external at revision 1. |
|
80 | Checked out external at revision 1. | |
81 |
|
81 | |||
82 | Checked out revision 3. |
|
82 | Checked out revision 3. | |
@@ -85,3 +85,5 b' 3 files updated, 0 files merged, 0 files' | |||||
85 | path s |
|
85 | path s | |
86 | source file:///root/svn-repo/src |
|
86 | source file:///root/svn-repo/src | |
87 | revision 3 |
|
87 | revision 3 | |
|
88 | % verify subrepo is contained within the repo directory | |||
|
89 | True |
General Comments 0
You need to be logged in to leave comments.
Login now