[Pkg-bazaar-maint] Bug#482299: bzr-svn: Branching scheme failure

Roland Mas lolando at debian.org
Wed May 21 17:28:55 UTC 2008


Package: bzr-svn
Version: 0.4.10-1
Severity: normal

Apparently bzr-svn is looking for branches where there aren't any, and
that seems to break me accessing one repository.

Here's my setup:
,----
| $ bzr info
| Lightweight checkout (format: dirstate or dirstate-tags or pack-0.92 or rich-root or rich-root-pack)
| Location:
|        light checkout root: .
|   repository checkout root: /home/roland/gnurandal/bzr-repo/slis/upstream-svn/trunk
|         checkout of branch: svn+https://svn.ac-grenoble.fr/svn/slis/slis/sources/trunk
|          shared repository: /home/roland/gnurandal/bzr-repo/slis
| 
| Related branches:
|   parent branch: /home/roland/gnurandal/bzr-repo/slis/local/trunk
`----

Here's what I want to send to SVN:
,----
| $ bzr missing
| Using last location: /home/roland/gnurandal/bzr-repo/slis/local/trunk/
| You are missing 1 revision(s):
| 495: Roland Mas 2008-05-21 More work on the migration to a formal DB upgrade code
`----

Here's what I get:
,----
| $ bzr pull
| Using saved location: /home/roland/gnurandal/bzr-repo/slis/local/trunk/
| bzr: ERROR: libsvn._core.SubversionException: ("PROPFIND request failed on '/svn/slis/!svn/bc/4655/docs/digloo/branches'", 175007)                                                                           
| 
| Traceback (most recent call last):
|   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
|     return run_bzr(argv)
|   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
|     ret = run(*run_argv)
|   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
|     return self.run(**all_cmd_args)
|   File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 665, in run
|     possible_transports=possible_transports)
|   File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
|     return unbound(self, *args, **kwargs)
|   File "/usr/lib/python2.5/site-packages/bzrlib/workingtree.py", line 1493, in pull
|     possible_transports=possible_transports)
|   File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
|     return unbound(self, *args, **kwargs)
|   File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1763, in pull
|     run_hooks=False)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 301, in pull
|     self.update_revisions(source, stop_revision)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 357, in update_revisions
|     stop_revision)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/repository.py", line 204, in lhs_missing_revisions
|     if self.has_revision(revid):
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/repository.py", line 373, in has_revision
|     (path, revnum, _) = self.lookup_revision_id(revision_id)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/repository.py", line 553, in lookup_revision_id
|     return self.get_revmap().get_branch_revnum(revid, layout)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/revids.py", line 172, in get_branch_revnum
|     for entry_revid, branch, revno, mapping in self.actual.discover_revids(layout, self.cache.last_revnum_checked(str(layout)), last_revnum):
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/revids.py", line 72, in discover_revids
|     for (branch, revno) in self.repos.find_fileprop_branches(layout, from_revnum, to_revnum):
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/repository.py", line 806, in find_fileprop_branches
|     for (project, branch, nick) in layout.get_branches(revnum):
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 83, in get_branches
|     find_children):
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 50, in expand_branch_pattern
|     ret += expand_branch_pattern(begin+[c], todo[1:], check_path, get_children)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 50, in expand_branch_pattern
|     ret += expand_branch_pattern(begin+[c], todo[1:], check_path, get_children)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 41, in expand_branch_pattern
|     return expand_branch_pattern(begin+[todo[0]], todo[1:], check_path, get_children)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 42, in expand_branch_pattern
|     children = get_children(path)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 72, in find_children
|     dirents = self.repository.transport.get_dir(path, revnum)[0]
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/transport.py", line 656, in get_dir
|     return conn.get_dir(path, revnum, pool, kind)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/errors.py", line 107, in convert
|     raise convert_error(e)
| SubversionException: ("PROPFIND request failed on '/svn/slis/!svn/bc/4655/docs/digloo/branches'", 175007)
| 
| bzr 1.5 on python 2.5.2 (linux2)
| arguments: ['/usr/bin/bzr', 'pull']
| encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fr_FR.UTF-8'
| plugins:
|   bisect               /home/roland/.bazaar/plugins/bisect [1.1.0pre0]
|   bzrtools             /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
|   gtk                  /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
|   launchpad            /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
|   rebase               /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
|   svn                  /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.10]
| *** Bazaar has encountered an internal error.
|     Please report a bug at https://bugs.launchpad.net/bzr/+filebug
|     including this traceback, and a description of what you
|     were doing when the error occurred.
`----

But /svn/slis/docs/digloo isn't a directory:
,----
| $ svn ls https://svn.ac-grenoble.fr/svn/slis/docs/
| digloo
| general/
| slim
| slis
`----

It's actually a symlink pointing at ../slis/digloo/doc, which would be
equivalent to https://svn.ac-grenoble.fr/svn/slis/slis/digloo/doc, but
that one doesn't contain anything called branches:
,----
| $ svn ls https://svn.ac-grenoble.fr/svn/slis/slis/digloo/doc
| comment-faire-un-digloo.txt
| digloo-slis4-doc.txt
`----

It seems to me bzr-svn shoudldn't fail when it doesn't find
branches, but I guess that's what branching schemes are for.  So,
let's see what to do with those:
,----
| $ bzr svn-branching-scheme https://svn.ac-grenoble.fr/svn/slis/slis/sources/trunk
| */*/trunk
| */*/branches/*
| */*/tags/*
`----

Aha, maybe I could restrict these globs to something specific (since I
only use /svn/slis/slis/sources/ anyway):

,----
| $ bzr svn-branching-scheme --set https://svn.ac-grenoble.fr/svn/slis/slis/sources/trunk

[An editor opens, I remove everything and add "slis/sources/trunk" as
a single line, then exit the editor]

| bzr: ERROR: exceptions.NameError: global name 'set_config_scheme' is not defined
| 
| Traceback (most recent call last):
|   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
|     return run_bzr(argv)
|   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
|     ret = run(*run_argv)
|   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
|     return self.run(**all_cmd_args)
|   File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/__init__.py", line 398, in run
|     set_config_scheme(repos, scheme, mandatory=True)
| NameError: global name 'set_config_scheme' is not defined
| 
| bzr 1.5 on python 2.5.2 (linux2)
| arguments: ['/usr/bin/bzr', 'svn-branching-scheme', '--set', 'https://svn.ac-grenoble.fr/svn/slis/slis/sources/trunk']
| encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fr_FR.UTF-8'
| plugins:
|   bisect               /home/roland/.bazaar/plugins/bisect [1.1.0pre0]
|   bzrtools             /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
|   gtk                  /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
|   launchpad            /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
|   rebase               /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
|   svn                  /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.10]
| *** Bazaar has encountered an internal error.
|     Please report a bug at https://bugs.launchpad.net/bzr/+filebug
|     including this traceback, and a description of what you
|     were doing when the error occurred.
`----

  Okay, I'll open /usr/share/pyshared/bzrlib/plugins/svn/__init__.py
and fix lines 396 and 398 by prepending "mapping3." to them and doing
s/set_config_scheme/set_branching_scheme/ to 398 (I'm not sure
something similar shouldn't be done to 396, too).  The --set now
works, and the bzr pull does too (except I had to sort-of-rebase
stuff, since it seems revids have been changed by the change in
branching-scheme).

Roland.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bzr-svn depends on:
ii  bzr                         1.5-1        easy to use distributed version co
ii  python                      2.5.2-1      An interactive high-level object-o
ii  python-central              0.6.6        register and build utility for Pyt
ii  python-pysqlite2            2.4.1-1      Python interface to SQLite 3
ii  python-subversion           1.4.6dfsg1-4 Python bindings for Subversion

Versions of packages bzr-svn recommends:
ii  bzr-rebase                    0.3-1      Rebase plugin for Bazaar

-- no debconf information

-- 
Roland Mas

$ chown -R us:us your_base*





More information about the Pkg-bazaar-maint mailing list