confused by bzr-svn properties being merged by "svn merge"

Bug #183821 reported by nicholas a. evans
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Triaged
Low
Unassigned

Bug Description

Sorry, it isn't a public svn repository. Is there anything I can do to help you debug this?

$ bzr branch svn+https://svn.foo.com/foobar/branches/branch_name_foo
bzr: ERROR: exceptions.AssertionError:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 905, in run
    possible_transports=[to_transport])
  File "/home/nevans/.bazaar/plugins/svn/remote.py", line 75, in sprout
    result_repo.fetch(repo, revision_id=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 873, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
  File "/home/nevans/.bazaar/plugins/svn/fetch.py", line 685, in fetch
    find_ghosts)
  File "/home/nevans/.bazaar/plugins/svn/fetch.py", line 554, in _find_until
    revid = self.source.generate_revision_id(revnum, branch, str(scheme))
  File "/home/nevans/.bazaar/plugins/svn/repository.py", line 713, in generate_revision_id
    (bzr_revno, revid) = parse_revid_property(line)
  File "/home/nevans/.bazaar/plugins/svn/repository.py", line 152, in parse_revid_property
    assert not '\n' in line
AssertionError

bzr 1.0.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'svn+https://svn.foo.com/foobar/branches/branch_name_foo']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /home/nevans/.bazaar/plugins/bzrtools [1.0.0]
  gtk /home/nevans/.bazaar/plugins/gtk [0.94.0dev0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  rebase /home/nevans/.bazaar/plugins/rebase [0.3.0dev0]
  svn /home/nevans/.bazaar/plugins/svn [0.4.7dev0]
  vimdiff /home/nevans/.bazaar/plugins/vimdiff [unknown]
*** 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.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 183821] bzr branch fails with AssertionError in parse_revid_property

Am Donnerstag, den 17.01.2008, 17:59 +0000 schrieb nicholas a. evans:
> Public bug reported:
>
> Sorry, it isn't a public svn repository. Is there anything I can do to
> help you debug this?
>
> $ bzr branch svn+https://svn.foo.com/foobar/branches/branch_name_foo
> bzr: ERROR: exceptions.AssertionError:
>
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
> ret = run(*run_argv)
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 905, in run
> possible_transports=[to_transport])
> File "/home/nevans/.bazaar/plugins/svn/remote.py", line 75, in sprout
> result_repo.fetch(repo, revision_id=revision_id)
> File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 873, in fetch
> return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
> File "/home/nevans/.bazaar/plugins/svn/fetch.py", line 685, in fetch
> find_ghosts)
> File "/home/nevans/.bazaar/plugins/svn/fetch.py", line 554, in _find_until
> revid = self.source.generate_revision_id(revnum, branch, str(scheme))
> File "/home/nevans/.bazaar/plugins/svn/repository.py", line 713, in generate_revision_id
> (bzr_revno, revid) = parse_revid_property(line)
> File "/home/nevans/.bazaar/plugins/svn/repository.py", line 152, in parse_revid_property
> assert not '\n' in line
> AssertionError
If you can post the contents of "line", that would help. Try running bzr
with the environment variable BZR_PDB set to 1, that should put you into
a debugger. In the debugger, run "print line"

Cheers,

Jelmer
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
nicholas a. evans (nevans) wrote : Re: bzr branch fails with AssertionError in parse_revid_property

**** entering debugger
> /home/nevans/.bazaar/plugins/svn/repository.py(152)parse_revid_property()
-> assert not '\n' in line
(Pdb) print line
2354 <email address hidden>
2355 <email address hidden>
(Pdb)

(I munged the revid slightly to use my personal email address, rather than work email address which was what was in there. I assume that is not relevant to this issue.)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 183821] Re: bzr branch fails with AssertionError in parse_revid_property

Am Donnerstag, den 17.01.2008, 22:05 +0000 schrieb nicholas a. evans:
> **** entering debugger
> > /home/nevans/.bazaar/plugins/svn/repository.py(152)parse_revid_property()
> -> assert not '\n' in line
> (Pdb) print line
> 2354 <email address hidden>
> 2355 <email address hidden>
> (Pdb)
>
> (I munged the revid slightly to use my personal email address, rather
> than work email address which was what was in there. I assume that is
> not relevant to this issue.)
What versions of bzr-svn have you used on this repository ? More
specifically, what version of bzr-svn did you use to push those two
revisions?

The output of "svn log -v" (in particular the path changes) would also
be useful.

Cheers,

Jelmer
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
nicholas a. evans (nevans) wrote : Re: [Bug 183821] Re: bzr branch fails with AssertionError in parse_revid_property
Download full text (11.6 KiB)

On Jan 17, 2008 6:10 PM, Jelmer Vernooij <email address hidden> wrote:
> What versions of bzr-svn have you used on this repository ? More
> specifically, what version of bzr-svn did you use to push those two
> revisions?

Many versions. I occasionally look to see if I'm missing any
interesting changes, or if I hit a error then I update to see if it
goes away. My guess is that I was on one of the following revisions
of http://people.samba.org/bzr/jelmer/bzr-svn/stable/

826: Jelmer Vernooij 2007-12-23 Fix authentication prompts.
833: Jelmer Vernooij 2008-01-09 Fix typo.
834: Jelmer Vernooij 2008-01-13 Fix typo.

Most likely, I was using 833. But it could also be some other
revision. Sorry. :-(

> The output of "svn log -v" (in particular the path changes) would also
> be useful.

$ svn log -vr 33967:33968
------------------------------------------------------------------------
r33967 | nevans | 2008-01-14 13:55:09 -0500 (Mon, 14 Jan 2008) | 6 lines
Changed paths:
   M /imrs/trunk
   M /imrs/trunk/lib/tasks/reset_password.rake
   M /imrs/trunk/lib/tasks/rspec.rake
   M /imrs/trunk/lib/tasks/tag_release.rake

Changes to the IMRS rake tasks:

 * added a convenience method for resetting the password
 * removed all of the annoying engine spec tasks... we weren't using
them anyway!
 * updated the tag release task for ian-beta

------------------------------------------------------------------------
r33968 | nevans | 2008-01-14 14:03:32 -0500 (Mon, 14 Jan 2008) | 1 line
Changed paths:
   M /imrs/trunk
   M /imrs/trunk/test/selenium/register/_selenium_helper.rsel

the selenium test mother should not have the name 'Father'...
------------------------------------------------------------------------

$ svn diff -Nc 33967

Property changes on: .
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-12-21 10:45:13.105999947 -0500
committer: nicholas a. evans <email address hidden>
properties:
        branch-nick: trunk

   + timestamp: 2008-01-14 13:49:36.236000061 -0500
committer: nicholas a. evans <email address hidden>
properties:
        branch-nick: trunk

Name: bzr:revision-id:v3-trunk1
   - 1887 <email address hidden>
1894 <email address hidden>
1895 <email address hidden>
1897 <email address hidden>
1898 <email address hidden>
1899 <email address hidden>
1912 <email address hidden>
1914 <email address hidden>
1921 <email address hidden>
1926 <email address hidden>
1933 <email address hidden>
1936 <email address hidden>
1937 <email address hidden>
1954 <email address hidden>
1957 <email address hidden>
1958 <email address hidden>
1973 <email address hidden>
1974 <email address hidden>
1978 <email address hidden>...

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: bzr branch fails with AssertionError in parse_revid_property

hmm, this is odd. The repository appears to be fine, but I'm not sure why it returns the last two lines rather than just the last.

Revision history for this message
nicholas a. evans (nevans) wrote :

FWIW, just to test it out, I deleted my ~/.bazaar/svn-cache dir, and I still get the same error.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Please try again with the attached patch and post the relevant parts from ~/.bzr.log

Revision history for this message
nicholas a. evans (nevans) wrote : Re: [Bug 183821] Re: bzr branch fails with AssertionError in parse_revid_property
Download full text (5.4 KiB)

Also, this branch has never been committed to using bzr and bzr-svn.
All work has happened using plain svn. Merges from trunk were done in
the old-school svn way, by someone of questionable merging skills. If I
want to look and see what the differences in the properties are from the
time the branch was created until now, it looks like so:

$ svn diff -N -r 33812:HEAD
https://svn.foobar.com/imrs/branches/paging_optimization

Property changes on: .
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-12-21 10:45:13.105999947 -0500
committer: nicholas a. evans <email address hidden>
properties:
        branch-nick: trunk

   + timestamp: 2008-01-14 14:03:26.207000017 -0500
committer: nicholas a. evans <email address hidden>
properties:
        branch-nick: trunk

Name: bzr:revision-id:v3-trunk1
   - 1887 <email address hidden>
1894 <email address hidden>
1895 <email address hidden>
1897 <email address hidden>
1898 <email address hidden>
1899 <email address hidden>
1912 <email address hidden>
1914 <email address hidden>
1921 <email address hidden>
1926 <email address hidden>
1933 <email address hidden>
1936 <email address hidden>
1937 <email address hidden>
1954 <email address hidden>
1957 <email address hidden>
1958 <email address hidden>
1973 <email address hidden>
1974 <email address hidden>
1978 <email address hidden>
1985 <email address hidden>
1989 <email address hidden>
1999 <email address hidden>
2002 <email address hidden>
2005 <email address hidden>
2013 <email address hidden>
2014 <email address hidden>
2015 <email address hidden>
2017 <email address hidden>
2046 <email address hidden>
2047 <email address hidden>
2064 <email address hidden>
2086 <email address hidden>
2102 <email address hidden>
2205 <email address hidden>
2210 <email address hidden>
2242 <email address hidden>
2253 <email address hidden>
2269 <email address hidden>
2273 <email address hidden>
2278 <email address hidden>

   + 1887 <email address hidden>
1894 <email address hidden>
1895 nevans@foobar....

Read more...

Revision history for this message
nicholas a. evans (nevans) wrote :

Okay, so I just tried this from home, and everything worked just fine!

I'm using a bzr shared repository on my home computer as well as on my
work computer, in which I have bzr branches for trunk and various svn
branches. The major difference is that I just created the repository
at home within the last week, using a very recent version of bzr-svn,
and the repository at work has been in use for a very long time now,
using many versions of bzr-svn.

I will check on Monday, to see if "bzr branch" works outside of the shared repo.

--
Nick

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: bzr branch fails with AssertionError in parse_revid_property

The fact those properties are set suggests that bzr-svn was actually used to commit to this particular branch, at least 40 times. But I think I misunderstood something here :-/

Any chance you can retry with the patch as I mentioned I mentioned in my previous comment?

Revision history for this message
nicholas a. evans (nevans) wrote :

The properties are there in the branch because they were there in the trunk (I've made many commits via bzr-svn in the trunk), and the branch was created using "svn copy". The properties were later updated when someone did an svn merge from trunk.

I used the patch, but... it *works* from my home computer!

Oh, and it looks like I misreported the date of the repository on my home computer. It was created several months ago and is using the dirstate-with-subtree format, "Bazaar Knit Repository Format 3 (bzr 0.15)". I believe my work computer has been upgraded from dirstate-with-subtree to rich-roots-pack.

Revision history for this message
nicholas a. evans (nevans) wrote :

At any rate, I'll replicate the error on my work computer on Monday, using the patch. Thanks!

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Ahh, somebody using svn merge could've caused some weird things to happen I guess.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I guess we should add some checks to make sure bzr metadata merged that way is ignored.

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
nicholas a. evans (nevans) wrote :
Download full text (5.7 KiB)

I've attached my ~/.bzr.log.

Also, for further clarification, here is the svn log message and property diff
for the revision in question:

$ svn diff -N -r 34024:34025 https://svn.ekenosen.net/imrs/branches/paging_optimization

Property changes on: .
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-12-21 10:45:13.105999947 -0500
committer: nicholas a. evans <email address hidden>
properties:
        branch-nick: trunk

   + timestamp: 2008-01-14 14:03:26.207000017 -0500
committer: nicholas a. evans <email address hidden>
properties:
        branch-nick: trunk

Name: bzr:revision-id:v3-trunk1
   - 1887 <email address hidden>
1894 <email address hidden>
1895 <email address hidden>
1897 <email address hidden>
1898 <email address hidden>
1899 <email address hidden>
1912 <email address hidden>
1914 <email address hidden>
1921 <email address hidden>
1926 <email address hidden>
1933 <email address hidden>
1936 <email address hidden>
1937 <email address hidden>
1954 <email address hidden>
1957 <email address hidden>
1958 <email address hidden>
1973 <email address hidden>
1974 <email address hidden>
1978 <email address hidden>
1985 <email address hidden>
1989 <email address hidden>
1999 <email address hidden>
2002 <email address hidden>
2005 <email address hidden>
2013 <email address hidden>
2014 <email address hidden>
2015 <email address hidden>
2017 <email address hidden>
2046 <email address hidden>
2047 <email address hidden>
2064 <email address hidden>
2086 <email address hidden>
2102 <email address hidden>
2205 <email address hidden>
2210 <email address hidden>
2242 <email address hidden>
2253 <email address hidden>
2269 <email address hidden>
2273 <email address hidden>
2278 <email address hidden>

   + 1887 <email address hidden>
1894 <email address hidden>
1895 <email address hidden>
1897 <email address hidden>
1898 <email address hidden>
1899 <email address hidden>...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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