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

Bug #1075548 reported by Thorsten Glaser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
New
Undecided
Unassigned

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:
svn://evolvis.org/scmrepos/svn/evolvis/trunk/gforge_base/evolvisforge-5.1

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/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1141, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1394, in run
    use_existing_dir=use_existing_dir, no_tree=no_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/push.py", line 146, in _show_push_branch
    remember, create_prefix)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/remote.py", line 551, in push_branch
    overwrite=overwrite)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 1114, in push
    lossy, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/branch.py", line 1152, in push
    lossy=lossy, fetch_non_mainline=fetch_non_mainline))
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/branch.py", line 1131, in _basic_push
    lossy=lossy, fetch_non_mainline=fetch_non_mainline)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/branch.py", line 1093, in _update_revisions
    stop_revision, overwrite=overwrite, push_metadata=(not lossy))
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/branch.py", line 1073, in _push
    layout=self.target.layout, project=self.target.project)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/push.py", line 340, in push_branch
    append_revisions_only=append_revisions_only)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/push.py", line 361, in push_todo
    push_metadata=push_metadata)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/push.py", line 398, in push_revision_series
    project=project, layout=layout)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/push.py", line 417, in push_revision_inclusive
    base_foreign_info=base_foreign_info)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/push.py", line 447, in push_single_revision
    root_action=root_action)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/push.py", line 178, in push_revision_tree
    revid = builder.commit(rev.message)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/errors.py", line 141, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/svn/commit.py", line 864, in commit
    editor.close()
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-
    sid)
arguments: ['/usr/bin/bzr', 'push', 'svn+ssh://<email address hidden>/svnroot/e
    volvis/trunk/gforge_base/evolvisforge-5.1']
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],
    weave_fmt[2.6.0dev2]
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
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Jelmer Vernooij (jelmer)
affects: bzr → bzr-svn
Revision history for this message
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.

Revision history for this message
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 commit.py ('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.

Revision history for this message
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/git_remote_helper.py", line 171, in process
    self.process_line(l, outf)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/git_remote_helper.py", line 187, in process_line
    self.commands[argv[0]](self, outf, argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/git_remote_helper.py", line 120, in cmd_list
    for ref, git_sha1 in refs.as_dict().iteritems():
  File "/usr/lib/python2.7/dist-packages/dulwich/repo.py", line 202, in as_dict
    ret[key] = self[("%s/%s" % (base, key)).strip("/")]
  File "/usr/lib/python2.7/dist-packages/dulwich/repo.py", line 273, in __getitem__
    _, sha = self._follow(name)
  File "/usr/lib/python2.7/dist-packages/dulwich/repo.py", line 255, in _follow
    contents = self.read_ref(refname)
  File "/usr/lib/python2.7/dist-packages/dulwich/repo.py", line 231, in read_ref
    contents = self.read_loose_ref(refname)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/refs.py", line 136, in read_loose_ref
    return self.object_store._lookup_revision_sha1(revid)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/object_store.py", line 580, in _lookup_revision_sha1
    self._update_sha_map(revid)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/object_store.py", line 384, in _update_sha_map
    self._update_sha_map_revision(revid)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/object_store.py", 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/object_store.py", 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/object_store.py", line 296, in _tree_to_objects
    assert tree.kind(file_id) == 'directory'
  File "/usr/lib/python2.7/dist-packages/bzrlib/revisiontree.py", line 173, in kind
    return inv[inv_file_id].kind
  File "/usr/lib/python2.7/dist-packages/bzrlib/inventory.py", 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).

Revision history for this message
Thorsten Glaser (mirabilos) wrote : Re: bzr push to svn and git crashes after moving some files, in some french file with percents in the name

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
Revision history for this message
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 <http://gnu.org/licenses/gpl.html>

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:

<http://www.gnu.org/software/gdb/bugs/>...

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

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/libthread_db.so.1".

 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/commit.py, 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,

   ...

Revision history for this message
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
Revision history for this message
Thorsten Glaser (mirabilos) wrote :

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

Jelmer Vernooij (jelmer)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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