check in a bzr branch into subversion

Jelmer Vernooij jelmer at samba.org
Wed Oct 24 16:38:41 BST 2007


Am Mittwoch, den 24.10.2007, 17:04 +0200 schrieb Martin Steigerwald:
> Am Mittwoch, 24. Oktober 2007 schrieb Jelmer Vernooij:
> > > I just thought bzr-svn might be able to help me there. Otherwise I
> would
> > > try whether tailor can convert it for me. But my last experiences
> with
> > > tailor - I wanted to convert mercurial to bazaar - haven't been
> that
> > > convincing.
> >
> > You should be able to use the 'svn-push' command from bzr-svn; for
> > example, you can run something like (from the bzr branch you'd like
> to
> > push):
> >
> > bzr svn-push svn://foobar.host/repository/trunk
> >
> > I'd recommend using the latest version of bzr-svn for this.
> Thanks for your answer.
> 
> I just tried it with bzr-svn 0.43 and bzr 0.91 and it worked nicely
> when I 
> tried it with a playground subversion URL, but not on the production
> one - on 
> the same subversion server. I will try with the latest versions from
> your 
> branch after my holidays. So please just ignore when the following
> seems like 
> an already fixed bug. I thought I report it anyway in case it contains
> some 
> helpful debugging information. Feel free to wait until I tried with
> the 
> newest versions before looking at my bug report (if the bug is in
> there too).
[...]
> I svn rm'd the directory for the branch again,  tried importing it again and 
> got:
> 
> ---------------------------------------------------------------------
> ms at mango> bzr svn-push svn+https://somesite/svn/Software/notifysync
> bzr: ERROR: exceptions.AssertionError:
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 800, in 
> run_bzr_catch_errors
>     return run_bzr(argv)
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 758, in 
> run_bzr
>     ret = run(*run_argv)
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in 
> run_argv_aliases
>     return self.run(**all_cmd_args)
>   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/__init__.py", line 
> 294, in run
>     target_branch = bzrdir.import_branch(source_branch, revision_id)
>   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/format.py", line 
> 156, in import_branch
>     push_new(repos, target_branch_path, source, stop_revision)
>   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/commit.py", line 
> 639, in push_new
>     validate=validate)
>   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/commit.py", line 
> 674, in push
>     builder.commit(rev.message)
>   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/commit.py", line 
> 479, in commit
>     assert self._new_revision_id is None or self._new_revision_id == revid
> AssertionError
> 
> bzr 0.91.0 on python 2.4.4.final.0 (linux2)
> arguments: 
> ['/usr/bin/bzr', 'svn-push', 'svn+https://intra.teamix.net/svn/Software/notifysync']
> 
> ** please send this report to bazaar at lists.ubuntu.com
> ---------------------------------------------------------------------
Yes, this is a recently fixed bug. The fix will be in 0.4.4.

> A call to bzr svn-branching-scheme gave this error instead BTW:
> --------------------------------------------------------------------
> ms at mango> bzr svn-branching-scheme                                                                             
> ~/Kunden/TVI/Webcluster/NotifySync#3
> bzr: ERROR: exceptions.AttributeError: 'KnitRepository' object has no 
> attribute 'get_scheme'
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 800, in 
> run_bzr_catch_errors
>     return run_bzr(argv)
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 758, in 
> run_bzr
>     ret = run(*run_argv)
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in 
> run_argv_aliases
>     return self.run(**all_cmd_args)
>   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/__init__.py", line 
> 324, in run
>     scheme = repos.get_scheme()
> AttributeError: 'KnitRepository' object has no attribute 'get_scheme'
> 
> bzr 0.91.0 on python 2.4.4.final.0 (linux2)
> arguments: ['/usr/bin/bzr', 'svn-branching-scheme']
> 
> ** please send this report to bazaar at lists.ubuntu.com
> ---------------------------------------------------------------------
You have to specify the Subversion repository to set the branching 
scheme. More recent versions now give a more appropriate error.


> I also tried creating the branch directory in svn first, but then bzr-svn 
> complained:
> 
> ---------------------------------------------------------------------
> ms at mango> bzr svn-push svn+https://somesite/svn/Software/notifysync                                    
> ~/Kunden/TVI/Webcluster/NotifySync#3
> bzr: ERROR: These branches have diverged. Use the merge command to reconcile 
> them.
> ---------------------------------------------------------------------
> Thus it seems to expect that the branch directory does not yet exist in svn.
Yes, that's correct.

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org



More information about the bazaar mailing list