1 # Copyright (C) 2006-2007 Jelmer Vernooij <jelmer@samba.org>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 from bzrlib.branch import Branch, BranchReferenceFormat
18 from bzrlib.bzrdir import BzrDir, BzrDirFormat
19 from bzrlib.errors import AlreadyBranchError, DivergedBranches
20 from bzrlib.inventory import Inventory
21 from bzrlib.merge import Merger, Merge3Merger
22 from bzrlib.progress import DummyProgress
23 from bzrlib.repository import Repository
24 from bzrlib.tests import KnownFailure, TestCaseWithTransport
25 from bzrlib.trace import mutter
26 from bzrlib.workingtree import WorkingTree
31 from time import sleep
32 from commit import push
33 from repository import MAPPING_VERSION, SVN_PROP_BZR_REVISION_ID
34 from revids import generate_svn_revision_id
35 from tests import TestCaseWithSubversionRepository
37 class TestPush(TestCaseWithSubversionRepository):
39 super(TestPush, self).setUp()
40 self.repos_url = self.make_client('d', 'sc')
42 self.build_tree({'sc/foo/bla': "data"})
43 self.client_add("sc/foo")
44 self.client_commit("sc", "foo")
46 self.svndir = BzrDir.open("sc")
48 self.bzrdir = self.svndir.sprout("dc")
51 svnbranch = self.svndir.open_branch()
52 bzrbranch = self.bzrdir.open_branch()
53 result = svnbranch.pull(bzrbranch)
54 self.assertEqual(0, result.new_revno - result.old_revno)
55 self.assertEqual(svnbranch.revision_history(),
56 bzrbranch.revision_history())
59 self.build_tree({'sc/foo/bar': "data"})
60 self.client_add("sc/foo/bar")
61 self.client_commit("sc", "second message")
63 svnbranch = self.svndir.open_branch()
64 bzrbranch = self.bzrdir.open_branch()
65 result = svnbranch.pull(bzrbranch)
66 self.assertEqual(0, result.new_revno - result.old_revno)
68 def test_diverged(self):
69 self.build_tree({'sc/foo/bar': "data"})
70 self.client_add("sc/foo/bar")
71 self.client_commit("sc", "second message")
73 svndir = BzrDir.open("sc")
75 self.build_tree({'dc/file': 'data'})
76 wt = self.bzrdir.open_workingtree()
78 wt.commit(message="Commit from Bzr")
80 self.assertRaises(DivergedBranches,
81 svndir.open_branch().pull,
82 self.bzrdir.open_branch())
84 def test_change(self):
85 self.build_tree({'dc/foo/bla': 'other data'})
86 wt = self.bzrdir.open_workingtree()
87 newid = wt.commit(message="Commit from Bzr")
89 svnbranch = self.svndir.open_branch()
90 svnbranch.pull(self.bzrdir.open_branch())
92 repos = self.svndir.find_repository()
93 self.assertEquals(newid, svnbranch.last_revision())
94 inv = repos.get_inventory(repos.generate_revision_id(2, "", "none"))
95 self.assertEqual(newid, inv[inv.path2id('foo/bla')].revision)
96 self.assertEqual(wt.branch.last_revision(),
97 repos.generate_revision_id(2, "", "none"))
98 self.assertEqual(repos.generate_revision_id(2, "", "none"),
99 self.svndir.open_branch().last_revision())
100 self.assertEqual("other data",
101 repos.revision_tree(repos.generate_revision_id(2, "",
102 "none")).get_file_text(inv.path2id("foo/bla")))
104 def test_simple(self):
105 self.build_tree({'dc/file': 'data'})
106 wt = self.bzrdir.open_workingtree()
108 wt.commit(message="Commit from Bzr")
110 self.svndir.open_branch().pull(self.bzrdir.open_branch())
112 repos = self.svndir.find_repository()
113 inv = repos.get_inventory(repos.generate_revision_id(2, "", "none"))
114 self.assertTrue(inv.has_filename('file'))
115 self.assertEquals(wt.branch.last_revision(),
116 repos.generate_revision_id(2, "", "none"))
117 self.assertEqual(repos.generate_revision_id(2, "", "none"),
118 self.svndir.open_branch().last_revision())
120 def test_empty_file(self):
121 self.build_tree({'dc/file': ''})
122 wt = self.bzrdir.open_workingtree()
124 wt.commit(message="Commit from Bzr")
126 self.svndir.open_branch().pull(self.bzrdir.open_branch())
128 repos = self.svndir.find_repository()
129 inv = repos.get_inventory(repos.generate_revision_id(2, "", "none"))
130 self.assertTrue(inv.has_filename('file'))
131 self.assertEquals(wt.branch.last_revision(),
132 repos.generate_revision_id(2, "", "none"))
133 self.assertEqual(repos.generate_revision_id(2, "", "none"),
134 self.svndir.open_branch().last_revision())
136 def test_pull_after_push(self):
137 self.build_tree({'dc/file': 'data'})
138 wt = self.bzrdir.open_workingtree()
140 wt.commit(message="Commit from Bzr")
142 self.svndir.open_branch().pull(self.bzrdir.open_branch())
144 repos = self.svndir.find_repository()
145 inv = repos.get_inventory(repos.generate_revision_id(2, "", "none"))
146 self.assertTrue(inv.has_filename('file'))
147 self.assertEquals(wt.branch.last_revision(),
148 repos.generate_revision_id(2, "", "none"))
149 self.assertEqual(repos.generate_revision_id(2, "", "none"),
150 self.svndir.open_branch().last_revision())
152 self.bzrdir.open_branch().pull(self.svndir.open_branch())
154 self.assertEqual(repos.generate_revision_id(2, "", "none"),
155 self.bzrdir.open_branch().last_revision())
157 def test_branch_after_push(self):
158 self.build_tree({'dc/file': 'data'})
159 wt = self.bzrdir.open_workingtree()
161 wt.commit(message="Commit from Bzr")
163 self.svndir.open_branch().pull(self.bzrdir.open_branch())
166 repos = self.svndir.sprout("b")
168 self.assertEqual(Branch.open("dc").revision_history(),
169 Branch.open("b").revision_history())
171 def test_message(self):
172 self.build_tree({'dc/file': 'data'})
173 wt = self.bzrdir.open_workingtree()
175 wt.commit(message="Commit from Bzr")
177 self.svndir.open_branch().pull(self.bzrdir.open_branch())
179 repos = self.svndir.find_repository()
180 self.assertEqual("Commit from Bzr",
181 repos.get_revision(repos.generate_revision_id(2, "", "none")).message)
183 def test_commit_set_revid(self):
184 self.build_tree({'dc/file': 'data'})
185 wt = self.bzrdir.open_workingtree()
187 wt.commit(message="Commit from Bzr", rev_id="some-rid")
189 self.svndir.open_branch().pull(self.bzrdir.open_branch())
191 self.client_update("sc")
192 self.assertEqual("3 some-rid\n",
193 self.client_get_prop("sc", SVN_PROP_BZR_REVISION_ID+"none"))
195 def test_commit_check_rev_equal(self):
196 self.build_tree({'dc/file': 'data'})
197 wt = self.bzrdir.open_workingtree()
199 wt.commit(message="Commit from Bzr")
201 self.svndir.open_branch().pull(self.bzrdir.open_branch())
203 rev1 = self.svndir.find_repository().get_revision(wt.branch.last_revision())
204 rev2 = self.bzrdir.find_repository().get_revision(wt.branch.last_revision())
206 self.assertEqual(rev1.committer, rev2.committer)
207 self.assertEqual(rev1.timestamp, rev2.timestamp)
208 self.assertEqual(rev1.timezone, rev2.timezone)
209 self.assertEqual(rev1.properties, rev2.properties)
210 self.assertEqual(rev1.message, rev2.message)
211 self.assertEqual(rev1.revision_id, rev2.revision_id)
213 def test_multiple(self):
214 self.build_tree({'dc/file': 'data'})
215 wt = self.bzrdir.open_workingtree()
217 wt.commit(message="Commit from Bzr")
219 self.build_tree({'dc/file': 'data2', 'dc/adir': None})
221 wt.commit(message="Another commit from Bzr")
223 self.svndir.open_branch().pull(self.bzrdir.open_branch())
225 repos = self.svndir.find_repository()
227 self.assertEqual(repos.generate_revision_id(3, "", "none"),
228 self.svndir.open_branch().last_revision())
230 inv = repos.get_inventory(repos.generate_revision_id(2, "", "none"))
231 self.assertTrue(inv.has_filename('file'))
232 self.assertFalse(inv.has_filename('adir'))
234 inv = repos.get_inventory(repos.generate_revision_id(3, "", "none"))
235 self.assertTrue(inv.has_filename('file'))
236 self.assertTrue(inv.has_filename('adir'))
238 self.assertEqual(self.svndir.open_branch().revision_history(),
239 self.bzrdir.open_branch().revision_history())
241 self.assertEqual(wt.branch.last_revision(),
242 repos.generate_revision_id(3, "", "none"))
244 wt.branch.repository.get_ancestry(wt.branch.last_revision()),
245 repos.get_ancestry(wt.branch.last_revision()))
247 def test_multiple_diverged(self):
248 oc_url = self.make_client("o", "oc")
250 self.build_tree({'dc/file': 'data'})
251 wt = self.bzrdir.open_workingtree()
253 wt.commit(message="Commit from Bzr")
255 self.build_tree({'oc/file': 'data2', 'oc/adir': None})
256 self.client_add("oc/file")
257 self.client_add("oc/adir")
258 self.client_commit("oc", "Another commit from Bzr")
260 self.assertRaises(DivergedBranches,
261 lambda: Branch.open(oc_url).pull(self.bzrdir.open_branch()))
263 def test_different_branch_path(self):
266 self.build_tree({'sc/trunk/foo': "data", 'sc/branches': None})
267 self.client_add("sc/trunk")
268 self.client_add("sc/branches")
269 self.client_commit("sc", "foo")
271 self.client_copy('sc/trunk', 'sc/branches/mybranch')
272 self.build_tree({'sc/branches/mybranch/foo': "data2"})
273 self.client_commit("sc", "add branch")
275 self.svndir = BzrDir.open("sc/branches/mybranch")
277 self.bzrdir = self.svndir.sprout("mybranch")
279 self.build_tree({'mybranch/foo': 'bladata'})
280 wt = self.bzrdir.open_workingtree()
281 revid = wt.commit(message="Commit from Bzr")
282 push(Branch.open("sc/trunk"), wt.branch,
283 wt.branch.revision_history()[-2])
284 mutter('log %r' % self.client_log("sc/trunk")[4][0])
285 self.assertEquals('M',
286 self.client_log("sc/trunk")[4][0]['/trunk'].action)
287 push(Branch.open("sc/trunk"), wt.branch, wt.branch.last_revision())
288 mutter('log %r' % self.client_log("sc/trunk")[5][0])
289 self.assertEquals("/branches/mybranch",
290 self.client_log("sc/trunk")[5][0]['/trunk'].copyfrom_path)
292 class PushNewBranchTests(TestCaseWithSubversionRepository):
293 def test_single_revision(self):
294 repos_url = self.make_client("a", "dc")
295 bzrwt = BzrDir.create_standalone_workingtree("c",
296 format=format.get_rich_root_format())
297 self.build_tree({'c/test': "Tour"})
299 revid = bzrwt.commit("Do a commit")
300 newdir = BzrDir.open(repos_url+"/trunk")
301 newbranch = newdir.import_branch(bzrwt.branch)
302 newtree = newbranch.repository.revision_tree(revid)
304 self.assertEquals(bzrwt.inventory.root.file_id,
305 newtree.inventory.root.file_id)
307 self.assertEquals(revid, newbranch.last_revision())
308 self.assertEquals([revid], newbranch.revision_history())
310 # revision graph for the two tests below:
319 def test_push_replace_existing_root(self):
320 repos_url = self.make_client("test", "svnco")
321 self.build_tree({'svnco/foo.txt': 'foo'})
322 self.client_add("svnco/foo.txt")
323 self.client_commit("svnco", "add file") #1
324 self.client_update("svnco")
327 dir = BzrDir.open(repos_url).sprout("bzrco")
328 wt = dir.open_workingtree()
329 self.build_tree({'bzrco/bar.txt': 'bar'})
331 base_revid = wt.commit("add another file", rev_id="mybase")
332 wt.branch.push(Branch.open(repos_url))
334 self.build_tree({"svnco/baz.txt": "baz"})
335 self.client_add("svnco/baz.txt")
337 self.client_commit("svnco", "add yet another file")[0])
338 self.client_update("svnco")
340 self.build_tree({"bzrco/qux.txt": "qux"})
342 wt.commit("add still more files", rev_id="mydiver")
344 repos = Repository.open(repos_url)
345 wt.branch.repository.fetch(repos)
346 other_rev = repos.generate_revision_id(3, "", "none")
347 merge = Merger.from_revision_ids(DummyProgress(), wt, other=other_rev)
348 merge.merge_type = Merge3Merger
350 self.assertEquals(base_revid, merge.base_rev_id)
352 self.assertEquals([wt.last_revision(), other_rev], wt.get_parent_ids())
353 wt.commit("merge", rev_id="mymerge")
354 self.assertTrue(os.path.exists("bzrco/baz.txt"))
355 raise KnownFailure("can't work for repository root")
356 wt.branch.push(Branch.open(repos_url))
358 def test_push_replace_existing_branch(self):
359 repos_url = self.make_client("test", "svnco")
360 self.build_tree({'svnco/trunk/foo.txt': 'foo'})
361 self.client_add("svnco/trunk")
362 self.client_commit("svnco", "add file") #1
363 self.client_update("svnco")
366 dir = BzrDir.open(repos_url+"/trunk").sprout("bzrco")
367 wt = dir.open_workingtree()
368 self.build_tree({'bzrco/bar.txt': 'bar'})
370 base_revid = wt.commit("add another file", rev_id="mybase")
371 wt.branch.push(Branch.open(repos_url+"/trunk"))
373 self.build_tree({"svnco/trunk/baz.txt": "baz"})
374 self.client_add("svnco/trunk/baz.txt")
376 self.client_commit("svnco", "add yet another file")[0])
377 self.client_update("svnco")
379 self.build_tree({"bzrco/qux.txt": "qux"})
381 wt.commit("add still more files", rev_id="mydiver")
383 repos = Repository.open(repos_url)
384 wt.branch.repository.fetch(repos)
385 other_rev = repos.generate_revision_id(3, "trunk", "trunk0")
386 merge = Merger.from_revision_ids(DummyProgress(), wt, other=other_rev)
387 merge.merge_type = Merge3Merger
389 self.assertEquals(base_revid, merge.base_rev_id)
391 self.assertEquals([wt.last_revision(), other_rev], wt.get_parent_ids())
392 wt.commit("merge", rev_id="mymerge")
393 self.assertTrue(os.path.exists("bzrco/baz.txt"))
394 wt.branch.push(Branch.open(repos_url+"/trunk"))
398 def test_repeat(self):
399 repos_url = self.make_client("a", "dc")
400 bzrwt = BzrDir.create_standalone_workingtree("c",
401 format=format.get_rich_root_format())
402 self.build_tree({'c/test': "Tour"})
404 revid = bzrwt.commit("Do a commit")
405 newdir = BzrDir.open(repos_url+"/trunk")
406 newbranch = newdir.import_branch(bzrwt.branch)
407 self.assertEquals(revid, newbranch.last_revision())
408 self.assertEquals([revid], newbranch.revision_history())
409 self.build_tree({'c/test': "Tour de France"})
410 bzrwt.commit("Do a commit")
411 newdir = BzrDir.open(repos_url+"/trunk")
412 self.assertRaises(AlreadyBranchError, newdir.import_branch,
415 def test_multiple(self):
416 repos_url = self.make_client("a", "dc")
417 bzrwt = BzrDir.create_standalone_workingtree("c",
418 format=format.get_rich_root_format())
419 self.build_tree({'c/test': "Tour"})
421 revid1 = bzrwt.commit("Do a commit")
422 self.build_tree({'c/test': "Tour de France"})
423 revid2 = bzrwt.commit("Do a commit")
424 newdir = BzrDir.open(repos_url+"/trunk")
425 newbranch = newdir.import_branch(bzrwt.branch)
426 self.assertEquals(revid2, newbranch.last_revision())
427 self.assertEquals([revid1, revid2], newbranch.revision_history())
429 def test_multiple_part_exists(self):
430 repos_url = self.make_client("a", "dc")
431 self.build_tree({'dc/trunk/myfile': "data", 'dc/branches': None})
432 self.client_add('dc/trunk')
433 self.client_add('dc/branches')
434 self.client_commit("dc", "Message")
435 svnrepos = Repository.open(repos_url)
437 bzrdir = BzrDir.open(repos_url+"/trunk").sprout("c")
438 bzrwt = bzrdir.open_workingtree()
439 self.build_tree({'c/myfile': "Tour"})
440 revid1 = bzrwt.commit("Do a commit")
441 self.build_tree({'c/myfile': "Tour de France"})
442 revid2 = bzrwt.commit("Do a commit")
443 newdir = BzrDir.open(repos_url+"/branches/mybranch")
444 newbranch = newdir.import_branch(bzrwt.branch)
445 self.assertEquals(revid2, newbranch.last_revision())
447 svnrepos.generate_revision_id(1, "trunk", "trunk0")
448 , revid1, revid2], newbranch.revision_history())
450 def test_push_overwrite(self):
451 repos_url = self.make_client("a", "dc")
452 self.build_tree({'dc/trunk/bloe': "text"})
453 self.client_add("dc/trunk")
454 self.client_commit("dc", "initial")
457 bzrdir = BzrDir.open(repos_url+"/trunk").sprout("d1")
458 bzrwt1 = bzrdir.open_workingtree()
461 bzrdir = BzrDir.open(repos_url+"/trunk").sprout("d2")
462 bzrwt2 = bzrdir.open_workingtree()
464 self.build_tree({'d1/myfile': "Tour"})
466 revid1 = bzrwt1.commit("Do a commit")
468 self.build_tree({'d2/myfile': "France"})
470 revid2 = bzrwt1.commit("Do a commit")
472 bzrwt1.branch.push(Branch.open(repos_url+"/trunk"))
474 raise KnownFailure("push --overwrite not supported yet")
476 bzrwt2.branch.push(Branch.open(repos_url+"/trunk"), overwrite=True)
478 self.assertEquals([revid2],
479 Branch.open(repos_url+"/trunk").revision_history())
481 def test_complex_rename(self):
482 repos_url = self.make_client("a", "dc")
483 bzrwt = BzrDir.create_standalone_workingtree("c",
484 format=format.get_rich_root_format())
485 self.build_tree({'c/registry/generic.c': "Tour"})
486 bzrwt.add("registry")
487 bzrwt.add("registry/generic.c")
488 revid1 = bzrwt.commit("Add initial directory + file")
489 bzrwt.rename_one("registry", "registry.moved")
490 os.unlink("c/registry.moved/generic.c")
491 bzrwt.remove("registry.moved/generic.c")
492 self.build_tree({'c/registry/generic.c': "bla"})
493 bzrwt.add("registry")
494 bzrwt.add("registry/generic.c")
495 revid2 = bzrwt.commit("Do some funky things")
496 newdir = BzrDir.open(repos_url+"/trunk")
497 newbranch = newdir.import_branch(bzrwt.branch)
498 self.assertEquals(revid2, newbranch.last_revision())
499 self.assertEquals([revid1, revid2], newbranch.revision_history())
500 tree = newbranch.repository.revision_tree(revid2)
501 mutter("inventory: %r" % tree.inventory.entries())
502 delta = tree.changes_from(bzrwt)
503 self.assertFalse(delta.has_changed())
504 self.assertTrue(tree.inventory.has_filename("registry"))
505 self.assertTrue(tree.inventory.has_filename("registry.moved"))
506 self.assertTrue(tree.inventory.has_filename("registry/generic.c"))
507 self.assertFalse(tree.inventory.has_filename("registry.moved/generic.c"))
509 BzrDir.open(repos_url+"/trunk").sprout("n")
511 def test_push_non_lhs_parent(self):
512 repos_url = self.make_client("a", "dc")
513 bzrwt = BzrDir.create_standalone_workingtree("c",
514 format=format.get_rich_root_format())
515 self.build_tree({'c/registry/generic.c': "Tour"})
516 bzrwt.add("registry")
517 bzrwt.add("registry/generic.c")
518 revid1 = bzrwt.commit("Add initial directory + file",
519 rev_id="initialrevid")
521 # Push first branch into Subversion
522 newdir = BzrDir.open(repos_url+"/trunk")
523 newbranch = newdir.import_branch(bzrwt.branch)
525 # Should create dc/trunk
526 self.client_update("dc")
528 self.build_tree({'dc/branches': None})
529 self.client_add("dc/branches")
530 self.client_copy("dc/trunk", "dc/branches/foo")
531 self.client_commit("dc", "Copy branches")
532 self.client_update("dc")
534 self.build_tree({'dc/branches/foo/registry/generic.c': "France"})
535 merge_revno = self.client_commit("dc", "Change copied branch")[0]
536 merge_revid = newdir.find_repository().generate_revision_id(merge_revno, "branches/foo", "trunk0")
538 self.build_tree({'c/registry/generic.c': "de"})
539 revid2 = bzrwt.commit("Change something", rev_id="changerevid")
542 self.build_tree({'c/registry/generic.c': "France"})
543 bzrwt.add_pending_merge(merge_revid)
544 revid3 = bzrwt.commit("Merge something", rev_id="mergerevid")
546 trunk = Branch.open(repos_url + "/branches/foo")
547 trunk.pull(bzrwt.branch)
549 self.assertEquals([revid1, revid2, revid3], trunk.revision_history())
550 self.client_update("dc")
552 '1 initialrevid\n2 changerevid\n3 mergerevid\n',
553 self.client_get_prop("dc/branches/foo", SVN_PROP_BZR_REVISION_ID+"trunk0"))
555 def test_complex_replace_dir(self):
556 repos_url = self.make_client("a", "dc")
557 bzrwt = BzrDir.create_standalone_workingtree("c",
558 format=format.get_rich_root_format())
559 self.build_tree({'c/registry/generic.c': "Tour"})
560 bzrwt.add(["registry"], ["origdir"])
561 bzrwt.add(["registry/generic.c"], ["file"])
562 revid1 = bzrwt.commit("Add initial directory + file")
564 bzrwt.remove('registry/generic.c')
565 bzrwt.remove('registry')
566 bzrwt.add(["registry"], ["newdir"])
567 bzrwt.add(["registry/generic.c"], ["file"])
568 revid2 = bzrwt.commit("Do some funky things")
570 newdir = BzrDir.open(repos_url+"/trunk")
571 newbranch = newdir.import_branch(bzrwt.branch)
572 self.assertEquals(revid2, newbranch.last_revision())
573 self.assertEquals([revid1, revid2], newbranch.revision_history())
576 BzrDir.open(repos_url+"/trunk").sprout("n")
578 def test_push_unnecessary_merge(self):
579 from bzrlib.debug import debug_flags
580 debug_flags.add('transport')
581 debug_flags.add('commit')
582 repos_url = self.make_client("a", "dc")
583 bzrwt = BzrDir.create_standalone_workingtree("c",
584 format=format.get_rich_root_format())
585 self.build_tree({'c/registry/generic.c': "Tour"})
586 bzrwt.add("registry")
587 bzrwt.add("registry/generic.c")
588 revid1 = bzrwt.commit("Add initial directory + file",
589 rev_id="initialrevid")
591 # Push first branch into Subversion
592 newdir = BzrDir.open(repos_url+"/trunk")
593 newbranch = newdir.import_branch(bzrwt.branch)
595 # Should create dc/trunk
596 self.client_update("dc")
598 self.assertTrue(os.path.exists("dc/trunk/registry/generic.c"))
599 sleep(1) # Subversion relies on timestamps to detect
601 self.build_tree({'dc/trunk/registry/generic.c': "BLA"})
602 self.client_commit("dc/trunk", "Change copied branch")
603 self.client_update("dc")
604 merge_revid = newdir.find_repository().generate_revision_id(2, "trunk", "trunk0")
607 self.build_tree({'c/registry/generic.c': "DE"})
608 bzrwt.add_pending_merge(merge_revid)
609 revid2 = bzrwt.commit("Merge something", rev_id="mergerevid")
611 trunk = Branch.open(repos_url + "/trunk")
612 trunk.pull(bzrwt.branch)
614 self.assertEquals([revid1, revid2], trunk.revision_history())
615 self.client_update("dc")
617 '1 initialrevid\n2 mergerevid\n',
618 self.client_get_prop("dc/trunk", SVN_PROP_BZR_REVISION_ID+"trunk0"))