Mercurial > hgsubversion
annotate tests/test_fetch_branches.py @ 547:9e6499c415a9
tags: fix files edited during tag creation
This was broken because file edits were skipped if they were in tags, but
committags in svnmeta didn't check to see if any files were changed during
initial tag creation.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 06 Feb 2010 10:36:21 -0600 |
parents | 45df4d9320fa |
children | d17cec76e769 |
rev | line source |
---|---|
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 import unittest |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
284
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
3 from mercurial import hg |
133
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
4 from mercurial import node |
284
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
5 from mercurial import ui |
344
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
6 from mercurial import util as hgutil |
133
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
7 |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 import test_util |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 class TestFetchBranches(test_util.TestBase): |
313
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
12 def _load_fixture_and_fetch(self, fixture_name, stupid, noupdate=True, |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
13 subdir=''): |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path, |
278
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
15 self.wc_path, stupid=stupid, |
313
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
16 noupdate=noupdate, subdir=subdir) |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 |
284
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
18 def _load_fixture_and_fetch_with_anchor(self, fixture_name, anchor): |
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
19 test_util.load_svndump_fixture(self.repo_path, fixture_name) |
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
20 source = '%s#%s' % (test_util.fileurl(self.repo_path), anchor) |
326
33736e2e25f0
alternate approach for supporting svn schemes for repository paths
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
313
diff
changeset
|
21 repo = hg.clone(ui.ui(), source=source, dest=self.wc_path) |
284
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
22 return hg.repository(ui.ui(), self.wc_path) |
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
23 |
372
a62965b179c1
Test for open branches in the pull result.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
344
diff
changeset
|
24 def openbranches(self, repo): |
425
f5222d021665
tests: fix for new branch heads change in upstream hg.
Augie Fackler <durin42@gmail.com>
parents:
397
diff
changeset
|
25 hctxs = [repo[hn] for hn in repo.heads()] |
f5222d021665
tests: fix for new branch heads change in upstream hg.
Augie Fackler <durin42@gmail.com>
parents:
397
diff
changeset
|
26 branches = set(ctx.branch() for ctx in hctxs if |
f5222d021665
tests: fix for new branch heads change in upstream hg.
Augie Fackler <durin42@gmail.com>
parents:
397
diff
changeset
|
27 ctx.extra().get('close', None) != '1') |
372
a62965b179c1
Test for open branches in the pull result.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
344
diff
changeset
|
28 return sorted(branches) |
a62965b179c1
Test for open branches in the pull result.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
344
diff
changeset
|
29 |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 def test_unrelatedbranch(self, stupid=False): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 heads = [repo[n] for n in repo.heads()] |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 heads = dict([(ctx.branch(), ctx) for ctx in heads]) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
34 # Let these tests disabled yet as the fix is not obvious |
120
f508c1fa19a5
hg_delta_editor: do not assume branches are copied from trunk by default
Patrick Mezard <pmezard@gmail.com>
parents:
117
diff
changeset
|
35 self.assertEqual(heads['branch1'].manifest().keys(), ['b']) |
f508c1fa19a5
hg_delta_editor: do not assume branches are copied from trunk by default
Patrick Mezard <pmezard@gmail.com>
parents:
117
diff
changeset
|
36 self.assertEqual(heads['branch2'].manifest().keys(), ['a', 'b']) |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
37 |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
38 def test_unrelatedbranch_stupid(self): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
39 self.test_unrelatedbranch(True) |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
40 |
131
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
41 def test_unorderedbranch(self, stupid=False): |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
42 repo = self._load_fixture_and_fetch('unorderedbranch.svndump', stupid) |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
43 r = repo['branch'] |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
44 self.assertEqual(0, r.parents()[0].rev()) |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
45 self.assertEqual(['a', 'c', 'z'], sorted(r.manifest())) |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
46 |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
47 def test_unorderedbranch_stupid(self): |
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
48 self.test_unorderedbranch(True) |
147
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
49 |
133
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
50 def test_renamed_branch_to_trunk(self, stupid=False): |
147
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
51 repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump', |
133
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
52 stupid) |
147
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
53 self.assertEqual(node.hex(repo['default'].node()), |
154
6fa97cfbf62f
fetch: Refactor extra creation to be shared by real and diff replay.
Augie Fackler <durin42@gmail.com>
parents:
147
diff
changeset
|
54 '14d252aef315857df241dd3fa4bc7833b09bd2f5') |
201
883976b654b6
Be more explicit about which branch I'm checking.
Augie Fackler <durin42@gmail.com>
parents:
158
diff
changeset
|
55 self.assertEqual(repo['default'].parents()[0].branch(), 'dev_branch') |
133
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
56 self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default') |
372
a62965b179c1
Test for open branches in the pull result.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
344
diff
changeset
|
57 expected = ['default', 'old_trunk'] |
a62965b179c1
Test for open branches in the pull result.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
344
diff
changeset
|
58 self.assertEqual(self.openbranches(repo), expected) |
133
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
59 |
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
60 def test_renamed_branch_to_trunk_stupid(self): |
2242dd1163c6
hg_delta_editor: fix bad parent revision calculation in the case of a branch
Augie Fackler <durin42@gmail.com>
parents:
131
diff
changeset
|
61 self.test_renamed_branch_to_trunk(stupid=True) |
131
4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Patrick Mezard <pmezard@gmail.com>
parents:
120
diff
changeset
|
62 |
147
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
63 def test_replace_trunk_with_branch(self, stupid=False): |
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
64 repo = self._load_fixture_and_fetch('replace_trunk_with_branch.svndump', |
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
65 stupid) |
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
66 self.assertEqual(repo['default'].parents()[0].branch(), 'test') |
375
af9fc01299b4
Make branch closing more Mercurial-like.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
372
diff
changeset
|
67 self.assertEqual(repo['tip'].branch(), 'default') |
af9fc01299b4
Make branch closing more Mercurial-like.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
372
diff
changeset
|
68 self.assertEqual(repo['tip'].extra().get('close'), '1') |
372
a62965b179c1
Test for open branches in the pull result.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
344
diff
changeset
|
69 self.assertEqual(self.openbranches(repo), ['default']) |
147
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
70 |
397
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
71 def test_copybeforeclose(self, stupid=False): |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
72 repo = self._load_fixture_and_fetch('copybeforeclose.svndump', stupid) |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
73 self.assertEqual(repo['tip'].branch(), 'test') |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
74 self.assertEqual(repo['test'].extra().get('close'), '1') |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
75 self.assertEqual(repo['test']['b'].data(), 'a\n') |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
76 |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
77 def test_copybeforeclose_stupid(self): |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
78 self.test_copybeforeclose(True) |
1b9d004a8c0a
branches: correctly deal with branch closing directly after copy/rename
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
375
diff
changeset
|
79 |
147
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
80 def test_replace_trunk_with_branch_stupid(self): |
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
81 self.test_replace_trunk_with_branch(stupid=True) |
22162380c4b9
Improve branch closing in the case of a single-rev replacement of one branch
Augie Fackler <durin42@gmail.com>
parents:
133
diff
changeset
|
82 |
232
c0063328587f
Fix and test for directory deletes during branch creation.
Augie Fackler <durin42@gmail.com>
parents:
201
diff
changeset
|
83 def test_branch_create_with_dir_delete_works(self, stupid=False): |
c0063328587f
Fix and test for directory deletes during branch creation.
Augie Fackler <durin42@gmail.com>
parents:
201
diff
changeset
|
84 repo = self._load_fixture_and_fetch('branch_create_with_dir_delete.svndump', |
c0063328587f
Fix and test for directory deletes during branch creation.
Augie Fackler <durin42@gmail.com>
parents:
201
diff
changeset
|
85 stupid) |
c0063328587f
Fix and test for directory deletes during branch creation.
Augie Fackler <durin42@gmail.com>
parents:
201
diff
changeset
|
86 self.assertEqual(repo['tip'].manifest().keys(), |
c0063328587f
Fix and test for directory deletes during branch creation.
Augie Fackler <durin42@gmail.com>
parents:
201
diff
changeset
|
87 ['alpha', 'beta', 'iota', 'gamma', ]) |
c0063328587f
Fix and test for directory deletes during branch creation.
Augie Fackler <durin42@gmail.com>
parents:
201
diff
changeset
|
88 |
278
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
89 def test_branch_tip_update_to_default(self, stupid=False): |
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
90 repo = self._load_fixture_and_fetch('unorderedbranch.svndump', |
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
91 stupid, noupdate=False) |
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
92 self.assertEqual(repo[None].branch(), 'default') |
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
93 self.assertTrue('tip' not in repo[None].tags()) |
337
46e69be8e2c8
Reorganize to have a more conventional module structure.
Augie Fackler <durin42@gmail.com>
parents:
326
diff
changeset
|
94 |
278
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
95 def test_branch_tip_update_to_default_stupid(self): |
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
96 self.test_branch_tip_update_to_default(True) |
337
46e69be8e2c8
Reorganize to have a more conventional module structure.
Augie Fackler <durin42@gmail.com>
parents:
326
diff
changeset
|
97 |
344
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
98 def test_branch_pull_anchor(self): |
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
99 self.assertRaises(hgutil.Abort, |
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
100 self._load_fixture_and_fetch_with_anchor, |
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
101 'unorderedbranch.svndump', 'NaN') |
284
f8f9a2993705
Implement parseurl support (#revision in repository urls)
Martijn Pieters <mj@zopatista.com>
parents:
278
diff
changeset
|
102 repo = self._load_fixture_and_fetch_with_anchor( |
344
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
103 'unorderedbranch.svndump', '4') |
4dfab1b8b7be
Mention what failed when given a non-numeric revision to clone/pull.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
337
diff
changeset
|
104 self.assertTrue('c' not in repo.branchtags()) |
278
60acc38eac96
clone: prefer tip of default to overall tip when updating
Martijn Pieters <mj@zopatista.com>
parents:
232
diff
changeset
|
105 |
313
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
106 def test_branches_weird_moves(self, stupid=False): |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
107 repo = self._load_fixture_and_fetch('renamedproject.svndump', stupid, |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
108 subdir='project') |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
109 heads = [repo[n] for n in repo.heads()] |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
110 heads = dict((ctx.branch(), ctx) for ctx in heads) |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
111 mdefault = sorted(heads['default'].manifest().keys()) |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
112 mbranch = sorted(heads['branch'].manifest().keys()) |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
113 self.assertEqual(mdefault, ['a', 'b', 'd/a']) |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
114 self.assertEqual(mbranch, ['a']) |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
115 |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
116 def test_branches_weird_moves_stupid(self): |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
117 self.test_branches_weird_moves(True) |
942f198b8ff5
hg_delta_editor: detect new branches issued from non-branch directories
Patrick Mezard <pmezard@gmail.com>
parents:
284
diff
changeset
|
118 |
473
45df4d9320fa
Fix 'parent dir of a branch is deleted' refactoring from 343da84.
Max Bowsher <maxb@f2s.com>
parents:
425
diff
changeset
|
119 def test_branch_delete_parent_dir(self, stupid=False): |
45df4d9320fa
Fix 'parent dir of a branch is deleted' refactoring from 343da84.
Max Bowsher <maxb@f2s.com>
parents:
425
diff
changeset
|
120 repo = self._load_fixture_and_fetch('branch_delete_parent_dir.svndump', |
45df4d9320fa
Fix 'parent dir of a branch is deleted' refactoring from 343da84.
Max Bowsher <maxb@f2s.com>
parents:
425
diff
changeset
|
121 stupid) |
45df4d9320fa
Fix 'parent dir of a branch is deleted' refactoring from 343da84.
Max Bowsher <maxb@f2s.com>
parents:
425
diff
changeset
|
122 self.assertEqual(node.hex(repo['tip'].node()), |
45df4d9320fa
Fix 'parent dir of a branch is deleted' refactoring from 343da84.
Max Bowsher <maxb@f2s.com>
parents:
425
diff
changeset
|
123 '4108a81a82c7925d5551091165dc54c41b06a8a8') |
45df4d9320fa
Fix 'parent dir of a branch is deleted' refactoring from 343da84.
Max Bowsher <maxb@f2s.com>
parents:
425
diff
changeset
|
124 |
117
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
125 def suite(): |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
126 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBranches), |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
127 ] |
3afe404042a3
Add a disabled test for unrelated branches
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
128 return unittest.TestSuite(all) |