Comment 1 for bug 118787

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 118787] NotImplementedError raised for SvnBranch.set_revision_history

  status confirmed
  importance wishlist
  summary "push --overwrite support"

Thanks for the bug report.

On Tue, 2007-06-05 at 15:01 +0000, Sabin Iacob wrote:
> Public bug reported:
>
> while trying to get over the "no common ancestor" problem that keeps
> preventing me to push to svn while preserving the branch history, I
> tried bzr push --overwrite, and got:
What version of bzr-svn are you using? If your original branch was
created using the 0.3 series and you are now using 0.4, that might give
errors about no common ancestors.

> bzr: ERROR: exceptions.NotImplementedError: <bound method
> SvnBranch.set_revision_history of SvnBranch('http://svn.wp-plugins.org
> /inline-gallery/tags/0.3.8')>
>
> Traceback (most recent call last):
> File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 718, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 679, in run_bzr
> ret = run(*run_argv)
> File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 375, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 820, in run
> push_result = br_from.push(br_to, overwrite)
> File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 127, in read_locked
> return unbound(self, *args, **kwargs)
> File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1542, in push
> _override_hook_source_branch=_override_hook_source_branch)
> File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1584, in _push_with_bound_branches
> result = self._basic_push(target, overwrite, stop_revision)
> File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1608, in _basic_push
> target.set_revision_history(self.revision_history())
> File "/home/iacobs/.bazaar/plugins/svn/branch.py", line 152, in set_revision_history
> raise NotImplementedError(self.set_revision_history)
> NotImplementedError: <bound method SvnBranch.set_revision_history of SvnBranch('http://svn.wp-plugins.org/inline-gallery/tags/0.3.8')>
>
> bzr 0.17.0dev0 on python 2.4.4.final.0 (linux2)
> arguments: ['/usr/bin/bzr', 'push', '--overwrite', 'http://svn.wp-plugins.org/inline-gallery/tags/0.3.8']

push --overwrite will be pretty hard to support. Among other things,
this would first require Bazaar core to not use set_revision_history()
but set_last_revision_info().

CHeers,

Jelmer

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/