bzr-svn: set_tag assertion error

Bug #816338 reported by ChriS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

When trying to push a branch with tags to svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cairo, I get the traceback

bzr: ERROR: exceptions.AssertionError:

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 923, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1123, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 688, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1132, in run
    use_existing_dir=use_existing_dir, no_tree=no_tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/push.py", line 140, in _show_push_branch
    remember, create_prefix)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/remote.py", line 394, in push_branch
    overwrite=overwrite)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 1095, in push
    *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/branch.py", line 931, in push
    result.tag_conflicts = self.update_tags(overwrite)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/branch.py", line 910, in update_tags
    return self.source.tags.merge_to(self.target.tags, overwrite)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tag.py", line 209, in merge_to
    return operation.run(to_tags, overwrite, ignore_master)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tag.py", line 242, in _merge_to_operation
    conflicts = self._merge_to(to_tags, source_dict, overwrite)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tag.py", line 255, in _merge_to
    to_tags._set_tag_dict(result)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/tags.py", line 346, in _set_tag_dict
    self.set_tag(k, v)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/tags.py", line 191, in set_tag
    assert isinstance(path, str)
AssertionError

bzr 2.3.1 on python 2.6.7 (Linux-3.0.0-rc4-x86_64-with-debian-wheezy-sid)
arguments: ['/usr/bin/bzr', 'push', 'svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cairo']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bash_completion /usr/lib/python2.6/dist-packages/bzrlib/plugins/bash_completion [2.3.1]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.3.1]
  dbus /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [0.1.0dev]
  explorer /usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer [1.1.3]
  fastimport /usr/lib/python2.6/dist-packages/bzrlib/plugins/fastimport [0.11.0dev]
  git /usr/lib/python2.6/dist-packages/bzrlib/plugins/git [0.6.2dev]
  gtk /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.101.0dev]
  hg /usr/lib/python2.6/dist-packages/bzrlib/plugins/hg [0.2.0dev]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.3.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.3.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.3.1]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.20.1]
  stats /usr/lib/python2.6/dist-packages/bzrlib/plugins/stats [0.1.0]
  svn /usr/lib/python2.6/dist-packages/bzrlib/plugins/svn [1.1.0dev]

Related branches

Revision history for this message
ChriS (christophe-troestler) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 816338] Re: bzr-svn: set_tag assertion error

On Tue, 2011-07-26 at 10:02 +0000, ChriS wrote:
> ** Attachment added: ".bzr.log"
> https://bugs.launchpad.net/bugs/816338/+attachment/2233347/+files/.bzr.log
What is the layout you are using for this branch ?

"bzr svn-layout
svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cairo" should tell you.

My guess is that bzr-svn is trying to push tags, but that it does not
know where to push them to.

Cheers,

Jelmer

Revision history for this message
ChriS (christophe-troestler) wrote :

On Tue, 26 Jul 2011 12:31:59 +0000, Jelmer Vernooij wrote:
>
> On Tue, 2011-07-26 at 10:02 +0000, ChriS wrote:
> > ** Attachment added: ".bzr.log"
> > https://bugs.launchpad.net/bugs/816338/+attachment/2233347/+fi
> les/.bzr.log
> What is the layout you are using for this branch ?
>
> "bzr svn-layout
> svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cairo" should tell
> you.

$ bzr svn-layout svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cai
ro
Repository root: svn+ssh://svn.forge.ocamlcore.org/svn/archimedes
Layout: WildcardLayout(['trunk', 'cairo', 'branches/*'],['tags/*'])
Branch path: cairo
Project: cairo
No custom branch support
Push merged revisions: False

> My guess is that bzr-svn is trying to push tags, but that it does n
> ot
> know where to push them to.

Maybe indeed I made a mistake. Since the layout was unusual ("cairo"
 and "trunk" are branches ― related projects but not sharing history)
, I had to put in ~/.bazaar/subversion.conf

[073b04eb-ee37-4885-9600-4b38ac648819]
locations = svn+ssh://<email address hidden>/svn/archimedes;sv
n://svn.forge.ocamlcore.org/svn/archimedes;svn+ssh://svn.forge.ocamlc
ore.org/svnroot/archimedes;svn+ssh://svn.forge.ocamlcore.org/svn/arch
imedes
guessed-layout = trunk0
tags = tags/*
branches = trunk;cairo;branches/*

without this I got:

bzr: ERROR: Tags not supported by SvnBranch('svn+ssh://svn.forge.ocam
lcore.org/svn/archimedes/cairo'); you may be able to use bzr upgrade.

I was expecting a error message if I made an error and maybe this is
what I got in form of an assertion error (a nicer message then would
be greatly appreciated).

Thanks for your prompt reply,
C.

Jelmer Vernooij (jelmer)
affects: bzr → bzr-svn
tags: removed: svn
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Tue, 2011-07-26 at 12:53 +0000, ChriS wrote:
> On Tue, 26 Jul 2011 12:31:59 +0000, Jelmer Vernooij wrote:
> >
> > On Tue, 2011-07-26 at 10:02 +0000, ChriS wrote:
> > > ** Attachment added: ".bzr.log"
> > > https://bugs.launchpad.net/bugs/816338/+attachment/2233347/+fi
> > les/.bzr.log
> > What is the layout you are using for this branch ?
> >
> > "bzr svn-layout
> > svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cairo" should tell
> > you.
>
> $ bzr svn-layout svn+ssh://svn.forge.ocamlcore.org/svn/archimedes/cai
> ro
> Repository root: svn+ssh://svn.forge.ocamlcore.org/svn/archimedes
> Layout: WildcardLayout(['trunk', 'cairo', 'branches/*'],['tags/*'])
> Branch path: cairo
> Project: cairo
> No custom branch support
> Push merged revisions: False
>
> > My guess is that bzr-svn is trying to push tags, but that it does n
> > ot
> > know where to push them to.
>
> Maybe indeed I made a mistake. Since the layout was unusual ("cairo"
> and "trunk" are branches ― related projects but not sharing history)
> , I had to put in ~/.bazaar/subversion.conf
>
> [073b04eb-ee37-4885-9600-4b38ac648819]
> locations = svn+ssh://<email address hidden>/svn/archimedes;sv
> n://svn.forge.ocamlcore.org/svn/archimedes;svn+ssh://svn.forge.ocamlc
> ore.org/svnroot/archimedes;svn+ssh://svn.forge.ocamlcore.org/svn/arch
> imedes
> guessed-layout = trunk0
> tags = tags/*
> branches = trunk;cairo;branches/*
>
> without this I got:
>
> bzr: ERROR: Tags not supported by SvnBranch('svn+ssh://svn.forge.ocam
> lcore.org/svn/archimedes/cairo'); you may be able to use bzr upgrade.
>
> I was expecting a error message if I made an error and maybe this is
> what I got in form of an assertion error (a nicer message then would
> be greatly appreciated).
Thanks for the reply - I've added support in WildcardLayout for basic
tags. If your configuration does not support tag setting, you should at
least get a decent error now.

  assignee jelmer
  status fixcommitted

Cheers,

Jelmer

Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
status: New → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Undecided → Medium
milestone: none → 1.1.0
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.