annotate tests/test_single_dir_clone.py @ 501:c617dcaac86d

single: fix push
author Vitaliy Filippov <vitalif@yourcmc.ru>
date Wed, 25 Nov 2009 23:10:32 -0500
parents 5ddc212dbc56
children 89eda60c90b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
499
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 import shutil
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
2
500
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
3 from mercurial import commands
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
4 from mercurial import context
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
5 from mercurial import hg
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
6 from mercurial import node
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
7 from mercurial import ui
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
8
499
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
9 import test_util
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
10
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
11
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
12 class TestSingleDir(test_util.TestBase):
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
13 def test_clone_single_dir_simple(self):
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
14 repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
15 stupid=False,
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
16 layout='single',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
17 subdir='')
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
18 self.assertEqual(repo.branchtags().keys(), ['default'])
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
19 self.assertEqual(repo['tip'].manifest().keys(),
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
20 ['trunk/beta',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
21 'tags/copied_tag/alpha',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
22 'trunk/alpha',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
23 'tags/copied_tag/beta',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
24 'branches/branch_from_tag/alpha',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
25 'tags/tag_r3/alpha',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
26 'tags/tag_r3/beta',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
27 'branches/branch_from_tag/beta'])
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
28
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
29 def test_auto_detect_single(self):
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
30 repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
31 stupid=False,
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
32 layout='auto')
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
33 self.assertEqual(repo.branchtags().keys(), ['default',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
34 'branch_from_tag'])
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
35 oldmanifest = test_util.filtermanifest(repo['default'].manifest().keys())
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
36 # remove standard layout
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
37 shutil.rmtree(self.wc_path)
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
38 # try again with subdir to get single dir clone
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
39 repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
40 stupid=False,
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
41 layout='auto',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
42 subdir='trunk')
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
43 self.assertEqual(repo.branchtags().keys(), ['default', ])
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
44 self.assertEqual(repo['default'].manifest().keys(), oldmanifest)
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
45
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
46 def test_externals_single(self):
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
47 repo = self._load_fixture_and_fetch('externals.svndump',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
48 stupid=False,
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
49 layout='single')
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
50 for rev in repo:
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
51 assert '.hgsvnexternals' not in repo[rev].manifest()
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
52 return # TODO enable test when externals in single are fixed
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
53 expect = """[.]
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
54 -r2 ^/externals/project2@2 deps/project2
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
55 [subdir]
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
56 ^/externals/project1 deps/project1
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
57 [subdir2]
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
58 ^/externals/project1 deps/project1
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
59 """
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
60 test = 2
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
61 self.assertEqual(self.repo[test]['.hgsvnexternals'].data(), expect)
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
62
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
63 def test_externals_single_whole_repo(self):
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
64 # This is the test which demonstrates the brokenness of externals
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
65 return # TODO enable test when externals in single are fixed
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
66 repo = self._load_fixture_and_fetch('externals.svndump',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
67 stupid=False,
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
68 layout='single',
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
69 subdir='')
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
70 for rev in repo:
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
71 rc = repo[rev]
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
72 if '.hgsvnexternals' in rc:
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
73 extdata = rc['.hgsvnexternals'].data()
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
74 assert '[.]' not in extdata
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
75 print extdata
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
76 expect = '' # Not honestly sure what this should be...
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
77 test = 4
1fd3cfa47c5e Support for single-directory clones.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
78 self.assertEqual(self.repo[test]['.hgsvnexternals'].data(), expect)
500
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
79
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
80 def test_push_single_dir(self):
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
81 # Tests simple pushing from default branch to a single dir repo
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
82 repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
83 stupid=False,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
84 layout='single',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
85 subdir='')
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
86 def file_callback(repo, memctx, path):
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
87 if path == 'adding_file':
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
88 return context.memfilectx(path=path,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
89 data='foo',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
90 islink=False,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
91 isexec=False,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
92 copied=False)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
93 raise IOError()
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
94 ctx = context.memctx(repo,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
95 (repo['tip'].node(), node.nullid),
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
96 'automated test',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
97 ['adding_file'],
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
98 file_callback,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
99 'an_author',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
100 '2009-10-19 18:49:30 -0500',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
101 {'branch': 'default',})
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
102 repo.commitctx(ctx)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
103 hg.update(repo, repo['tip'].node())
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
104 self.pushrevisions()
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
105 self.assertTrue('adding_file' in self.svnls(''))
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
106
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
107 def test_push_single_dir_branch(self):
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
108 # Tests local branches pushing to a single dir repo. Creates a fork at
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
109 # tip. The default branch adds a file called default, while branch foo
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
110 # adds a file called foo, then tries to push the foo branch and default
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
111 # branch in that order.
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
112 repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
113 stupid=False,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
114 layout='single',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
115 subdir='')
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
116 def file_callback(data):
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
117 def cb(repo, memctx, path):
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
118 if path == data:
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
119 return context.memfilectx(path=path,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
120 data=data,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
121 islink=False,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
122 isexec=False,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
123 copied=False)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
124 raise IOError()
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
125 return cb
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
126
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
127 def commit_to_branch(name, parent):
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
128 repo.commitctx(context.memctx(repo,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
129 (parent, node.nullid),
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
130 'automated test (%s)' % name,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
131 [name],
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
132 file_callback(name),
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
133 'an_author',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
134 '2009-10-19 18:49:30 -0500',
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
135 {'branch': name,}))
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
136
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
137 parent = repo['tip'].node()
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
138 commit_to_branch('default', parent)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
139 commit_to_branch('foo', parent)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
140 hg.update(repo, repo['foo'].node())
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
141 self.pushrevisions()
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
142 repo = self.repo # repo is outdated after the rebase happens, refresh
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
143 self.assertTrue('foo' in self.svnls(''))
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
144 self.assertEqual(repo.branchtags().keys(), ['default'])
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
145 # Have to cross to another branch head, so hg.update doesn't work
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
146 commands.update(ui.ui(),
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
147 self.repo,
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
148 self.repo.branchheads('default')[1],
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
149 clean=True)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
150 self.pushrevisions()
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
151 self.assertTrue('default' in self.svnls(''))
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
152 self.assertEquals(len(self.repo.branchheads('default')), 1)
5ddc212dbc56 push: fix for single directory repository layouts
Daniel Tang <dytang@cs.purdue.edu>
parents: 499
diff changeset
153