Can't checkout SVN: left hand side parent doesn't match?

Bug #368515 reported by Thomas Krause
6
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

I can't find any information somewhere else about this error message and things worked fine for a long time, so this might be a bug.

We have a central SVN server. I use Bazaar for some month to deal with it. The very first checkout still works fine, but when I try to checkout in a new folder, I get

thomas@TK-mobil:~/projekte/privat/nao/TEST$ bzr co svn+https://svn.informatik.hu-berlin.de/KI/NaoTH-2009
The svn+ syntax is deprecated, use https://svn.informatik.hu-berlin.de/KI/NaoTH-2009 instead.
bzr: ERROR: Recorded left hand side parent svn-v4:a2c67971-c138-4d98-c043-9dc41482c8e4::485 for revision <CachingRevisionMetadata for revision 486, path in repository 'a2c67971-c138-4d98-c043-9dc41482c8e4'> does not match actual left hand side parent svn-v3-none:a2c67971-c138-4d98-c043-9dc41482c8e4::485.

I noticed that the revision ID he claims to need is equal to that he finds, only "svn-v4" != "svn-v3"

My system is Ubuntu 9.04, Bazaar version is 1.13.1

Did I forget anything or is this just a very rare bug?

affects: bzr → bzr-svn
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Any chance you can try reproducing this with 1.14? A bug that looks very similar to this one was fixed for 1.14.

Changed in bzr-svn:
status: New → Incomplete
Revision history for this message
Thomas Krause (krause) wrote :

I installed bzr 1.14 using the Ubuntu PPA (which also came with an updated bzr-svn) but the error still occurs.

Revision history for this message
Thomas Krause (krause) wrote :

Just got an update to version 1.14.1

Error is still present

Revision history for this message
Thomas Krause (krause) wrote :

I just ran bzr check on the remote SVN, the output is

checked repository <bzrlib.plugins.svn.transport.SvnRaTransport url=https://<email address hidden>/KI/NaoTH-2009/> format <SvnRepositoryFormat>
   970 revisions
    75 revisions originating in bzr
   542 files were not changed but had their revision/fileid changed
     1 revisions with newer mappings than their children
     1 ghost revisions

What is the ghost revision?

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 368515] Re: Can't checkout SVN: left hand side parent doesn't match?

2009/5/8 Thomas Krause <email address hidden>:
> I just ran bzr check on the remote SVN, the output is
>
> checked repository <bzrlib.plugins.svn.transport.SvnRaTransport url=https://<email address hidden>/KI/NaoTH-2009/> format <SvnRepositoryFormat>
>   970 revisions
>    75 revisions originating in bzr
>   542 files were not changed but had their revision/fileid changed
>     1 revisions with newer mappings than their children
>     1 ghost revisions
>
> What is the ghost revision?

One where we know of the existence of the revision (or we saw a
revision-id for it) but we don't have the actual contents. It's not
necessarily a problem. I don't know how they arise in bzr-svn.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 368515] Re: Can't checkout SVN: left hand side parent doesn't match?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> 2009/5/8 Thomas Krause <email address hidden>:
>> I just ran bzr check on the remote SVN, the output is
>>
>> checked repository <bzrlib.plugins.svn.transport.SvnRaTransport
>> url=https://<email address hidden>/KI/NaoTH-2009/>
>> format <SvnRepositoryFormat> 970 revisions 75 revisions
>> originating in bzr 542 files were not changed but had their
>> revision/fileid changed 1 revisions with newer mappings than
>> their children 1 ghost revisions
>>
>> What is the ghost revision?
>
> One where we know of the existence of the revision (or we saw a
> revision-id for it) but we don't have the actual contents. It's
> not necessarily a problem. I don't know how they arise in bzr-svn.
>
They can occur when you push (roundtrip push, not dpush) a merge
revision into bzr-svn and then later get it out again independently.
bzr-svn by default only pushes the mainline, not any of the right hand
side revisions.

Cheers,

Jelmer

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iJwEAQECAAYFAkoHgSAACgkQDLQl4QYPZuUfjQP/b5HidoHTb0ij9g/cXZVQaaCS
Po6HN6tRIyx2KIx1blmm+yp513iWXHEoAafxEwt5ujvB3uz98qzkkCh4bI+PetAb
Oz67cGTpyk8aMoAsb+b2BhTaV3jLoQhhe+TsDzsQCs89iEWZiNmOwIhHv+2jpmP8
fS9cmasxMOOJSCuymUo=
=8kjR
-----END PGP SIGNATURE-----

Revision history for this message
Thomas Krause (krause) wrote :

Is there any other check- or cleanup-routine I should try to run? Unfortunately I do not have administration rights on this SVN-server so I'm not able to do any dumps.

If you want to, I also can try some debugging. But I need to be pointed to the right "spot" in the code. Currently I don't have any idea where the problem could be. I know that I did some branching once, and I also tried to uncommit a change. There is also one team-member using git-svn, not having any problems.

I attached a quite verbose svn XML log output (containing property changes) for the revisions 484 to 488 (the problematic revisions were 485 and 486)

Please let me know, if you need more logs or information.

Revision history for this message
Thomas Krause (krause) wrote :

May be unrelated, but I just recognized that the branch nick changed in 485->486.

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

Can you perhaps attach the .bzr.log output from when this error occurs?

Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
importance: Undecided → High
status: Incomplete → Triaged
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The following command should fix this (if you're able to change revision properties on the repo):

svn propset --revprop -r586 bzr:base-revision svn-v3-none:a2c67971-c138-4d98-c043-9dc41482c8e4::485

If you don't have write access to the repo, please let me know and I'll see if I can turn this error into a warning. If bzr-svn detects an invalid property it could ignore that property and recover (this'll take a few extra CPU cycles, but as long as there's only a few revisions it shouldn't be a problem.

It's fallout from the bug I mentioned earlier, newer versions of bzr-svn shouldn't write incorrect data like this anymore.

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

Marking this fixed released, since I think it's handled. Feel free to reopen if you disagree.

Changed in bzr-svn:
status: Triaged → Fix Released
Revision history for this message
Thomas Krause (krause) wrote :

Unfortunately I don't have the right to fix this on the central repository right now. I will test the approach on an older backup dump on my local system and if it works I will ask the administrator of the university to apply the property changes.

Thank you for your help. Instead of making the error as warning per default, you maybe could add a non-default option "ignore-errors" (which is mentioned in the error message).

Revision history for this message
Thomas Krause (krause) wrote :

Resetting the bzr:base-revision property to the value bazaar expects helps. If someone has the same problems, mind to delete the bazaar svn cache ( $HOME/.bazaar/svn-cache/ ) before you try another checkout.

Now I have to convince the adminstrator to do this, maybe I should buy some flowers for the SysAdminDay :-)

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

:-)

I've added the warning. Can you confirm this works around the problem?

Revision history for this message
Thomas Krause (krause) wrote :

For testing I put the latest bzr-svn branch (revision 2993) into $HOME/.bazaar/plugins/svn and used the nightly bzr PPA build (since the plugin claimed to need 1.15 API of bzrlib and the 1.15rc1 is not yet in the PPAs)

thomas@TK-mobil:~$ bzr --version
Bazaar (bzr) 1.15dev
  Python interpreter: /usr/bin/python 2.6.2
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/thomas/.bazaar
  Bazaar log file: /home/thomas/.bzr.log

Unfortunally the checkout stops imediatly with a

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'encode'

I noticed in the bzr.log that he failed to load pycurl. After manually installing the official Ubuntu python-pycurl package things are getting worse

1.159 got pycurl error: 65, necessary data rewind wasn't possible, (65, "necessary data rewind wasn't possible"), url: https://svn.informatik.hu-berlin.de/KI/NaoTH-2009/.bzr/smart

bzr.log is attached

Revision history for this message
Thomas Krause (krause) wrote :

P.S. I also removed the installed bzr-svn plugin (since I wanted to be sure it used the one in $HOME/.bazaar/plugins)

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

> bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no
> attribute 'encode'
This was a regression in the 0.6 branch, which should be fixed now. (also reported separately in bug 378497)

> I noticed in the bzr.log that he failed to load pycurl. After manually
> installing the official Ubuntu python-pycurl package things are getting
> worse

> 1.159 got pycurl error: 65, necessary data rewind wasn't possible, (65,
> "necessary data rewind wasn't possible"), url: https://svn.informatik
> .hu-berlin.de/KI/NaoTH-2009/.bzr/smart
python-pycurl actually breaks some of the functionality :-( It'll
hopefully be removed from bzr at some point, or at least not used by
default.

Cheers,

Jelmer

Revision history for this message
Thomas Krause (krause) wrote :

Checkout an branching our remove Repo works now (rev. 2995) but there is no warning displayed, even if --verbose option is given.

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

Hmm, that's odd. The revision property isn't fixed yet, and you're not branching into a shared repository which already has the broken revision?

Revision history for this message
Thomas Krause (krause) wrote :

It seems to be fixed in my central repository. I know that I tried to apply the fix, but got the error about the missing hook. My only explanation is, that the admin noticed it. I really don't know.

So I used my local svn repo with the dump I have.

I see the new warning, but then there is an error:

Recorded left hand side parent thomas@privat-fcbc5e73-20090313170902-3oivtee8pih0dmzp for revision svn-v4:a2c67971-c138-4d98-c043-9dc41482c8e4::485 does not match actual left hand side parent svn-v3-none:a2c67971-c138-4d98-c043-9dc41482c8e4::485.
bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file:///home/thomas/projekte/privat/nao/testNao/.bzr/repository/') has no revision ('svn-v4:a2c67971-c138-4d98-c043-9dc41482c8e4::485',)

I used the bzr-svn revision 2998

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.