bzr push to svn crashes after moving some files, in some french file with percents in the name

Bug #1075548 reported by Thorsten Glaser on 2012-11-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin

Bug Description

When trying to push a bzr repository to svn, updating it after some commits
and merges, some of them moving files, have been made, "bzr push" crashes
with errorlevel 4 and the log below. The bzr backport I use on hardy (bzr
2.3.4-0~bazaar1~hardy1, bzr-svn 1.0.4+bzr3475-1~bazaar1~hardy1) has the
same problem, but this is on stock sid (bzr 2.6.0~bzr6526-1, bzr-svn 1.2.1-1)
with svn 1.6.17dfsg-4 pinned to avoid 1.7 to be installed.

The publicly viewable access to the push location is:

The bzr repo is on lolando’s box, so I can’t give access to it, but if it
helps, I’ll ask him (cloning takes quite some time though, due to the size).

tglase@tglase-nb:~/Evolvis/tarent-5.1 $ bzr push svn+ssh://<email address hidden>/svnroot/evolvis/trunk/gforge_b>
Initialising Subversion metadata cache in /home/tglase/.bazaar/svn-cache/8ed69402-faa4-4b47-986e-66d49b2a90d8.
bzr: ERROR: subvertpy.SubversionException: ("Failure opening '/trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/locale/fr/pgsrc/Aide/PluginCr\xc3\xa9erUnePage'", 160016)

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 1141, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 673, in run_argv_aliases
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 1394, in run
    use_existing_dir=use_existing_dir, no_tree=no_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 146, in _show_push_branch
    remember, create_prefix)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 551, in push_branch
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 1114, in push
    lossy, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 1152, in push
    lossy=lossy, fetch_non_mainline=fetch_non_mainline))
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 1131, in _basic_push
    lossy=lossy, fetch_non_mainline=fetch_non_mainline)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 1093, in _update_revisions
    stop_revision, overwrite=overwrite, push_metadata=(not lossy))
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 1073, in _push,
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 340, in push_branch
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 361, in push_todo
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 398, in push_revision_series
    project=project, layout=layout)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 417, in push_revision_inclusive
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 447, in push_single_revision
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 178, in push_revision_tree
    revid = builder.commit(rev.message)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 141, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/", line 864, in commit
SubversionException: ("Failure opening '/trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/locale/fr/pgsrc/Aide/PluginCr\xc3\xa9erUnePage'", 160016)

bzr 2.6.0dev2 on python 2.7.3 (Linux-3.2.0-4-amd64-x86_64-with-debian-wheezy-
arguments: ['/usr/bin/bzr', 'push', 'svn+ssh://<email address hidden>/svnroot/e
plugins: bash_completion[2.6.0dev2], bookmarks[unknown], bzrtools[2.5.0],
    changelog_merge[2.6.0dev2], cvsps_import[unknown], git[0.6.9],
    grep[0.5.0dev], launchpad[2.6.0dev2], netrc_credential_store[2.6.0dev2],
    news_merge[2.6.0dev2], pipeline[1.4.0], po_merge[2.6.0dev2],
    rewrite[0.6.4dev], search[1.7.0dev], stats[0.2.0dev], svn[1.2.1],
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'C'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
    including this traceback and a description of the problem.

Jelmer Vernooij (jelmer) on 2012-11-06
affects: bzr → bzr-svn
Thorsten Glaser (mirabilos) wrote :

The problem seems to be this:

-rw-r--r-- 1 tglase Administrators 1502 Sep 20 2011 trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginCr%C3%A9erUnePage

So the %2F is expanded by bzr when it should not be.

Thorsten Glaser (mirabilos) wrote :

from what I wrote in IRC:

I tried with BZR_PDB=1 but that’s not all too easy to use. I ran into several C objects (_ra.Editor and _ra.DirEditor) too, so I couldn’t easily look.

15:37⎜<mira|laptop:#bzr> anyway, in (for me) line 309 of ('changed = True'), the values of
     ⎜ url_join_unescaped_path(base_url,base_tree.id2path(child_ie.file_id).encode("utf-8")) and
     ⎜ full_new_child_path are correct (the '# copy if they existed at different location' elif branch)

So it must come sometime after that. Maybe this helps someone to track it down.

It may be that %2F is expanded one time too many, but then expanded back, as this seems to be only triggered due to the %C3 which gets converted to \xc3 but not (back?) to %C3.

Thorsten Glaser (mirabilos) wrote :

Hum. I tried workarounding it, but git-cloning the repository doesn’t work either:

tglase@tglase-nb:~/Evolvis/x $ git clone bzr::/home/tglase/Evolvis/tarent-5.1
Cloning into 'tarent-5.1'...
Traceback (most recent call last):
  File "/usr/bin/git-remote-bzr", line 49, in <module>
    helper.process(sys.stdin, sys.stdout)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 171, in process
    self.process_line(l, outf)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 187, in process_line
    self.commands[argv[0]](self, outf, argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 120, in cmd_list
    for ref, git_sha1 in refs.as_dict().iteritems():
  File "/usr/lib/python2.7/dist-packages/dulwich/", line 202, in as_dict
    ret[key] = self[("%s/%s" % (base, key)).strip("/")]
  File "/usr/lib/python2.7/dist-packages/dulwich/", line 273, in __getitem__
    _, sha = self._follow(name)
  File "/usr/lib/python2.7/dist-packages/dulwich/", line 255, in _follow
    contents = self.read_ref(refname)
  File "/usr/lib/python2.7/dist-packages/dulwich/", line 231, in read_ref
    contents = self.read_loose_ref(refname)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 136, in read_loose_ref
    return self.object_store._lookup_revision_sha1(revid)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 580, in _lookup_revision_sha1
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 384, in _update_sha_map
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 484, in _update_sha_map_revision
    for path, obj, ie in self._revision_to_objects(rev, tree, lossy=(not self.mapping.roundtripping)):
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 438, in _revision_to_objects
    self._cache.idmap, unusual_modes, self.mapping.BZR_DUMMY_FILE):
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/", line 296, in _tree_to_objects
    assert tree.kind(file_id) == 'directory'
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 173, in kind
    return inv[inv_file_id].kind
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 1868, in __getitem__
    raise errors.NoSuchId(self, file_id)
bzrlib.errors.NoSuchId: The file id "None" is not present in the tree <bzrlib.inventory.CHKInventory object at 0x85ef0d0>.

Neither does 'bzr push'ing to git, it tells me to use dpush (no idea whether that is redoable). Basically, I need a copy of that bzr branch as master/trunk/HEAD in either svn *yuck* or git *yuck* (but that’s $orkplace for you).

OK, as already mentioned on IRC, but for the record here too:

bzr dpush to git *also* crashes with errorlevel 128 and the message
bzr: ERROR: The file id "None" is not present in the tree <bzrlib.inventory.CHKInventory object at 0xd7d4550>.

Though it doesn’t throw a backtrace like git pull from bzr does.

I basically need my bzr bound checkout to be pushed, updatable (after commits and merges on the bzr side), to either svn or git, due to corporate homogenity of tools (cost of introducing bzr as primary tool too would be too high).

summary: - bzr push to svn crashes after moving some files, in some french file
+ bzr push to svn and git crashes after moving some files, in some french
+ file with percents in the name
Thorsten Glaser (mirabilos) wrote :
Download full text (54.3 KiB)

Back to bzr-svn, here’s a backtrace:

tglase@tglase-nb:~/Evolvis/tarent-5.1 $ gdb --args python /usr/bin/bzr push --remember svn+ssh://mirabilos@evol>

GNU gdb (GDB) 7.4.1-debian

Copyright (C) 2012 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu".

For bug reporting instructions, please see:


Reading symbols from /usr/bin/python...Reading symbols from /usr/lib/debug/usr/bin/python2.7...done.


(gdb) b PyErr_NewSubversionException

Function "PyErr_NewSubversionException" not defined.

Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (PyErr_NewSubversionException) pending.

(gdb) r

Starting program: /usr/bin/python /usr/bin/bzr push --remember svn+ssh://<email address hidden>/svnroot/evolvis/trunk/gforge_base/evolvisforge-5.1

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/x86_64-linux-gnu/".

 15075kB 5kB/s - pushing revisions:updating mergeinfo property 0/1

Breakpoint 1, PyErr_NewSubversionException (error=error@entry=0x7ffff6c8d1c0) at subvertpy/util.c:99

99 {

(gdb) bt

#0 PyErr_NewSubversionException (error=error@entry=0x7ffff6c8d1c0) at subvertpy/util.c:99

#1 0x00007fffee940ea5 in PyErr_SetSubversionException (error=0x7ffff6c8d1c0) at subvertpy/util.c:173

#2 0x00007fffee944620 in py_editor_close (self=<_ra.Editor at remote 0x21f1ef8>) at subvertpy/editor.c:802

#3 0x00000000004b2389 in call_function (oparg=<optimized out>, pp_stack=0x7fffffff9ef0)

    at ../Python/ceval.c:4005

#4 PyEval_EvalFrameEx (f=f@entry=

    Frame 0x4945d00, for file /usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/, line 864, in commit (self=<SvnCommitBuilder(_svnprops=<lazy_dict(is_loaded=False, create_fn=<type at remote 0x87a0e0>, initial={}, dict=None, args=(<dictionary-itemiterator at remote 0x2a26368>,)) at remote 0x27cf1d0>, base_revno=10872, random_revid=False, _testament=<StrictTestament(committer=u'Thorsten Glaser <email address hidden>', timestamp=<float at remote 0x13bd620>, revprops={'branch-nick': u'tarent-5.1'}, tree=<InventoryRevisionTree(<email address hidden>', _inventory=<CHKInventory(_fileid_to_entry_cache={'10060@9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fsrc%2Fplugins%2Fwiki%2Fwww%2Fpgsrc%2FHelp%252FPhotoAlbumPlugin': <InventoryFile at remote 0x50ca2f0>, '10060@9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fsrc%2Fwww%2Fforum%2Fmyforums.php': <InventoryFile at remote 0x599b050>, '10060@9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fsrc%2Fwww%2Fstats%2Fviews_graph.php': <Invent...(truncated), throwflag=throwflag@entry=0) at ../Python/ceval.c:2666

#5 0x00000000004b9158 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=

    0x0, args=<optimized out>, argcount=<optimized out>, kws=kws@entry=0x7ffff7f9f068, kwcount=0,


Jelmer Vernooij (jelmer) wrote :

bzr-git not working is a different bug, for which there already is a bug report open.

no longer affects: bzr-git
Thorsten Glaser (mirabilos) wrote :

.oO(could've said which one… trying to track down that one now, for subscribing…

Jelmer Vernooij (jelmer) on 2012-11-29
summary: - bzr push to svn and git crashes after moving some files, in some french
- file with percents in the name
+ bzr push to svn crashes after moving some files, in some french file
+ with percents in the name
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers