bzr fast-export outputs bad "reset" commands

Bug #598060 reported by Gisle Aas
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Fix Released
Medium
Jelmer Vernooij

Bug Description

Running 'bzr fast-export repo' outputs reset commands like these:

reset refs/tags/0.5\nfrom :12\n
reset refs/tags/0.5.1\nfrom :21\n
reset refs/tags/0.5.2\nfrom :27\n
reset refs/tags/0.5.3\nfrom :31\n

There should be actually newlines in this output instead of "\n" sequences.

I'm using bzr-fastimport-r276 with bzr-2.1.1 (on top of python 2.4.3)

Related branches

Revision history for this message
Gisle Aas (gisle) wrote :

I tracked down the problem to ResetCommand.__repr__ returning an unicode string because the tagname it was passed was a unicode string. I fixed locally with the attached patch.

Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class X:
... def __repr__(self): return u"foo\nbar\n"
...
>>> x=X()
>>> repr(x)
'foo\\nbar\\n'
>>>

Revision history for this message
Stijn Hoop (fritti) wrote :

Heh, wish I'd seen this before I made my patch. Ah well, attached for posterity, I think yours is better.

Jelmer Vernooij (jelmer)
affects: bzr-fastimport → python-fastimport
affects: python-fastimport → bzr-fastimport
Jelmer Vernooij (jelmer)
Changed in bzr-fastimport:
status: New → Triaged
status: Triaged → Fix Committed
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr-fastimport:
status: Fix Committed → Fix Released
milestone: none → 0.10.0
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.