bzr commands sometimes fail with "ERROR: not well-formed (invalid token)"

Bug #267670 reported by d3k0
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Expired
Medium
Unassigned

Bug Description

I have a c++ project with many apps sharing a common code basis, with many symbolic links (I try to pint out what can be different).
When I initialize bazaar, bzr check and any utility that tries to revert to any previous commit fails.
The same thing with a "fake" code tree works well.

This is the not working:

root@darkstar:/opt/ezechiele# rm -Rf /root/.bzr.log /root/.bazaar/ .bzr/
root@darkstar:/opt/ezechiele# bzr init
root@darkstar:/opt/ezechiele# bzr add
[...]
root@darkstar:/opt/ezechiele# bzr commit -m "initial commit"
[...]
Committed revision 1.
root@darkstar:/opt/ezechiele# bzr check
Checking working tree at 'file:///opt/ezechiele/'.
bzr: ERROR: not well-formed (invalid token): line 10892, column 74
root@darkstar:/opt/ezechiele# touch newfile.txt
root@darkstar:/opt/ezechiele# bzr status
unknown:
  newfile.txt
root@darkstar:/opt/ezechiele# bzr add newfile.txt
added newfile.txt
root@darkstar:/opt/ezechiele# bzr revert
bzr: ERROR: not well-formed (invalid token): line 10892, column 74
root@darkstar:/opt/ezechiele#

And this is the working:

root@darkstar:/opt# mkdir bzr_working
root@darkstar:/opt# cd bzr_working/
root@darkstar:/opt/bzr_working# touch work1.txt
root@darkstar:/opt/bzr_working# bzr init
root@darkstar:/opt/bzr_working# bzr add
added work1.txt
root@darkstar:/opt/bzr_working# bzr commit -m 'one'
Committing to: /opt/bzr_working/
added work1.txt
Committed revision 1.
root@darkstar:/opt/bzr_working# echo "xxx" > work1.txt
root@darkstar:/opt/bzr_working# bzr check
Checking working tree at 'file:///opt/bzr_working/'.
Checking repository at 'file:///opt/bzr_working/'.
checked repository <bzrlib.transport.local.LocalTransport url=file:///opt/bzr_working/> format <RepositoryFormatKnitPack1>
     1 revisions
     1 file-ids
     1 unique file texts
     0 repeated file texts
     0 unreferenced text versions
Checking branch at 'file:///opt/bzr_working/'.
checked branch file:///opt/bzr_working/ format Bazaar Branch Format 6 (bzr 0.15)
root@darkstar:/opt/bzr_working# bzr status
modified:
  work1.txt
root@darkstar:/opt/bzr_working# bzr revert
 M work1.txt

I use slackware-current.
I upgraded python to the last version available on slackware repos.
I tried with bazaar version 1.5, 1.6 (the last available), and the I compiled myself the 1.6.1.
No changes in the errors.
Thank you for the help.

Revision history for this message
d3k0 (daniele-defelice) wrote :
Revision history for this message
d3k0 (daniele-defelice) wrote :

SOLVED!
Thank to the irc support, the problem was solved.
There was a file in the keymapper/ subdirectory, called keymapper/priva.OD,
with nonprintable characters.
That caused the error. I deleted the file and created the branch from scratch, and now all goes well.
May be this could be checked / solved in some way in the future?
Thank you again, irc guys :)

Revision history for this message
Andrew Bennetts (spiv) wrote :

So there's a couple of issues here:

 * bzr add doesn't give an error or warning even though there's a filename that bzr cannot commit
 * the error when it does happen is very unhelpful

(And arguably we should support such filenames in the first place.)

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
d3k0 (daniele-defelice)
description: updated
Revision history for this message
Karl Fogel (kfogel) wrote :

I think I encountered this bug too, trying to run 'bzr log --long -v' on a local clone of

   bzr://bzr.notengoamigos.org/emacs-merges-ce/master/

Here's what happened:

   $ cd emacs-merges-ce-master
   $ time bzr log --long -v > log-long-verbose.out
   bzr: ERROR: not well-formed (invalid token): line 16, column 68

   real 265m57.966s
   user 257m54.579s
   sys 0m16.309s
   $

Note that 'bzr log --long' had previously succeeded on that repository, so it was the addition of the -v that did it... which may indicate that a filename was the culprit?

On the chance that another reproduction case could help, I've tarred up the whole directory...

   $ tar zcf emacs-merges-ce-master_with-log.tar.gz emacs-merges-ce-master/
   $ ls -lh emacs-merges-ce-master_with-log.tar.gz
   -rw-r--r-- 1 kfogel kfogel 32M 2009-01-30 17:24 \
                                                 emacs-merges-ce-master_with-log.tar.gz

...and put it here for download (I assume 32MB is too large to attach to this issue):

   http://www.red-bean.com/kfogel/267670/emacs-merges-ce-master_with-log.tar.gz

That repository is in 1.9 format, by the way.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Can this be tested with the latest conversion and Bazaar 2.0.2 please? If it's now addressed, please close the issue.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Suceeds fine against lp:emacs with recent bzr

Cannot test tarball, because it doesn't have repository (ie. tarball is of a branch from a shared repo)

Please provide a new testcase?

$ time bzr log --long -v > log-long-verbose.out

real 30m8.934s
user 23m49.781s
sys 5m57.194s
$ echo $?
0
$ bzr --version
Bazaar (bzr) 2.4b4

Changed in bzr:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

Changed in bzr:
status: Incomplete → Expired
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.