Mercurial > hgsubversion
annotate tests/test_externals.py @ 235:2969a20e0eef
Add support for user:pass@url repositories to be hg-like
author | Daniel Tang <dytang@cs.purdue.edu> |
---|---|
date | Mon, 06 Apr 2009 11:19:51 -0400 |
parents | a360ddc97719 |
children | ba8e91a7c077 |
rev | line source |
---|---|
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 import unittest |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 import svnexternals |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 import test_util |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 class TestFetchExternals(test_util.TestBase): |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 def test_externalsfile(self): |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 f = svnexternals.externalsfile() |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 f['t1'] = 'dir1 -r10 svn://foobar' |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 f['t 2'] = 'dir2 -r10 svn://foobar' |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 f['t3'] = ['dir31 -r10 svn://foobar', 'dir32 -r10 svn://foobar'] |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
13 |
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
14 refext = """[t 2] |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 dir2 -r10 svn://foobar |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 [t1] |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 dir1 -r10 svn://foobar |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 [t3] |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 dir31 -r10 svn://foobar |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 dir32 -r10 svn://foobar |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 """ |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 value = f.write() |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 self.assertEqual(refext, value) |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 f2 = svnexternals.externalsfile() |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 f2.read(value) |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 self.assertEqual(sorted(f), sorted(f2)) |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 for t in f: |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 self.assertEqual(f[t], f2[t]) |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 def test_externals(self, stupid=False): |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 repo = self._load_fixture_and_fetch('externals.svndump', stupid=stupid) |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
34 ref0 = """[.] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
35 ^/externals/project1 deps/project1 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
37 self.assertEqual(ref0, repo[0]['.hgsvnexternals'].data()) |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
38 ref1 = """[.] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
39 ^/externals/project1 deps/project1 |
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
40 ^/externals/project2 deps/project2 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
42 self.assertEqual(ref1, repo[1]['.hgsvnexternals'].data()) |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
44 ref2 = """[.] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
45 ^/externals/project2 deps/project2 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
46 [subdir] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
47 ^/externals/project1 deps/project1 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
48 [subdir2] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
49 ^/externals/project1 deps/project1 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
51 actual = repo[2]['.hgsvnexternals'].data() |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
52 self.assertEqual(ref2, actual) |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
53 |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
54 ref3 = """[.] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
55 ^/externals/project2 deps/project2 |
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
56 [subdir] |
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
57 ^/externals/project1 deps/project1 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
58 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
59 self.assertEqual(ref3, repo[3]['.hgsvnexternals'].data()) |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
60 |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
61 ref4 = """[subdir] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
62 ^/externals/project1 deps/project1 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
63 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
64 self.assertEqual(ref4, repo[4]['.hgsvnexternals'].data()) |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
65 |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
66 ref5 = """[.] |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
67 ^/externals/project2 deps/project2 |
184
d3ea6c98a086
Do not recurse for externals on copied directory in stupid mode
Patrick Mezard <pmezard@gmail.com>
parents:
183
diff
changeset
|
68 [subdir2] |
d3ea6c98a086
Do not recurse for externals on copied directory in stupid mode
Patrick Mezard <pmezard@gmail.com>
parents:
183
diff
changeset
|
69 ^/externals/project1 deps/project1 |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
70 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
71 self.assertEqual(ref5, repo[5]['.hgsvnexternals'].data()) |
183
1c46ad3f56aa
test_externals: test branch copy, use absolute externals
Patrick Mezard <pmezard@gmail.com>
parents:
176
diff
changeset
|
72 |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
73 ref6 = """[.] |
184
d3ea6c98a086
Do not recurse for externals on copied directory in stupid mode
Patrick Mezard <pmezard@gmail.com>
parents:
183
diff
changeset
|
74 ^/externals/project2 deps/project2 |
d3ea6c98a086
Do not recurse for externals on copied directory in stupid mode
Patrick Mezard <pmezard@gmail.com>
parents:
183
diff
changeset
|
75 """ |
218
a360ddc97719
branches: change handling again, but this time a little less magic.
Augie Fackler <durin42@gmail.com>
parents:
215
diff
changeset
|
76 self.assertEqual(ref6, repo[6]['.hgsvnexternals'].data()) |
184
d3ea6c98a086
Do not recurse for externals on copied directory in stupid mode
Patrick Mezard <pmezard@gmail.com>
parents:
183
diff
changeset
|
77 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
78 def test_externals_stupid(self): |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
79 self.test_externals(True) |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
80 |
175
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
81 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
82 class TestPushExternals(test_util.TestBase): |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
83 def setUp(self): |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
84 test_util.TestBase.setUp(self) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
85 test_util.load_fixture_and_fetch('pushexternals.svndump', |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
86 self.repo_path, |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
87 self.wc_path) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
88 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
89 def test_push_externals(self, stupid=False): |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
90 # Add a new reference on an existing and non-existing directory |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
91 changes = [ |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
92 ('.hgsvnexternals', '.hgsvnexternals', |
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
93 """[dir] |
175
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
94 ../externals/project2 deps/project2 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
95 [subdir1] |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
96 ../externals/project1 deps/project1 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
97 [subdir2] |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
98 ../externals/project2 deps/project2 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
99 """), |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
100 ('subdir1/a', 'subdir1/a', 'a'), |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
101 ('subdir2/a', 'subdir2/a', 'a'), |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
102 ] |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
103 self.commitchanges(changes) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
104 self.pushrevisions(stupid) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
105 self.assertchanges(changes, self.repo['tip']) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
106 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
107 # Remove all references from one directory, add a new one |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
108 # to the other (test multiline entries) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
109 changes = [ |
215
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
110 ('.hgsvnexternals', '.hgsvnexternals', |
b5ef9a404f5d
Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk.
Augie Fackler <durin42@gmail.com>
parents:
195
diff
changeset
|
111 """[subdir1] |
175
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
112 ../externals/project1 deps/project1 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
113 ../externals/project2 deps/project2 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
114 """), |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
115 # This removal used to trigger the parent directory removal |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
116 ('subdir1/a', None, None), |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
117 ] |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
118 self.commitchanges(changes) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
119 self.pushrevisions(stupid) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
120 self.assertchanges(changes, self.repo['tip']) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
121 # Check subdir2/a is still there even if the externals were removed |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
122 self.assertTrue('subdir2/a' in self.repo['tip']) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
123 self.assertTrue('subdir1/a' not in self.repo['tip']) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
124 |
176
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
125 # Test externals removal |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
126 changes = [ |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
127 ('.hgsvnexternals', None, None), |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
128 ] |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
129 self.commitchanges(changes) |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
130 self.pushrevisions(stupid) |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
131 self.assertchanges(changes, self.repo['tip']) |
c4115b3918e9
Really delete the .hgsvnexternals file when explicitely removed
Patrick Mezard <pmezard@gmail.com>
parents:
175
diff
changeset
|
132 |
175
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
133 def test_push_externals_stupid(self): |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
134 self.test_push_externals(True) |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
135 |
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
136 |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
137 def suite(): |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
138 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchExternals), |
175
2412800b1258
Support svn:externals changes via .hgsvnexternals updates
Patrick Mezard <pmezard@gmail.com>
parents:
174
diff
changeset
|
139 unittest.TestLoader().loadTestsFromTestCase(TestPushExternals), |
174
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
140 ] |
f80132c5fea5
Convert svn:externals properties into a .hgsvnexternals file
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
141 return unittest.TestSuite(all) |