branching fails with "Parent didn't exist yet, but child wasn't added !?"

Bug #131180 reported by Tim Hatch
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Low
Jelmer Vernooij

Bug Description

tim@dalek ~/code $ svn co http://trac.pocoo.org/repos/pygments/trunk pygments
...
tim@dalek ~/code $ time bzr branch pygments pygments-bzr
version of bzr-svn is experimental; output may change between revisions
bzr: ERROR: exceptions.AssertionError: Parent didn't exist yet, but child wasn't added !?

Traceback (most recent call last):
  File "/home/tim/code/bzr.dev/bzrlib/commands.py", line 729, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/tim/code/bzr.dev/bzrlib/commands.py", line 691, in run_bzr
    ret = run(*run_argv)
  File "/home/tim/code/bzr.dev/bzrlib/commands.py", line 389, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/tim/code/bzr.dev/bzrlib/builtins.py", line 884, in run
    possible_transports=[to_transport])
  File "/home/tim/.bazaar/plugins/svn/workingtree.py", line 736, in sprout
    repo.clone(result, revision_id)
  File "/home/tim/code/bzr.dev/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/home/tim/code/bzr.dev/bzrlib/repository.py", line 410, in clone
    self.copy_content_into(dest_repo, revision_id)
  File "/home/tim/code/bzr.dev/bzrlib/repository.py", line 360, in copy_content_into
    return InterRepository.get(self, destination).copy_content(revision_id)
  File "/home/tim/.bazaar/plugins/svn/fetch.py", line 376, in copy_content
    (needed, parents) = self._find_until(revision_id)
  File "/home/tim/.bazaar/plugins/svn/fetch.py", line 349, in _find_until
    until_revnum, scheme):
  File "/home/tim/.bazaar/plugins/svn/repository.py", line 767, in follow_branch
    assert paths[p][1] is not None and paths[p][0] in ('A', 'R'), "Parent didn't exist yet, but child wasn't added !?"
AssertionError: Parent didn't exist yet, but child wasn't added !?

bzr 0.19.0dev0 on python 2.5.1.final.0 (linux2)
arguments: ['/home/tim/code/bzr/bzr', 'branch', 'pygments', 'pygments-bzr']

** please send this report to <email address hidden>

real 0m42.443s
user 0m4.596s
sys 0m0.436s

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 131180] branching fails with "Parent didn't exist yet, but child wasn't added !?"

Hi Tim,

Thanks for the bug report.

What version of bzr-svn and bzr were you using?

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

Revision history for this message
Tim Hatch (timhatch) wrote : Re: [Bug 131180] branching fails with "Parent didn't exist yet, but child wasn't added !?"

I went ahead and upgraded bzr-svn and bzr itself, and the problem
still persists. The original report was against r603 of bzr-svn and
about a week old bzr.dev.

tim@dalek ~/.bazaar/plugins/svn $ bzr version-info
revision-id: <email address hidden>
date: 2007-08-04 21:24:55 +0200
build-date: 2007-08-08 16:54:28 -0500
revno: 628
branch-nick: svn
tim@dalek ~/.bazaar/plugins/svn $ bzr info
Checkout (format: dirstate-with-subtree)
Location:
        checkout root: .
   checkout of branch: http://people.samba.org/bzr/jelmer/bzr-svn/trunk/

Related branches:
   parent branch: http://people.samba.org/bzr/jelmer/bzr-svn/trunk/

Bazaar (bzr) 0.19.0dev0
   from bzr checkout /home/tim/code/bzr.dev
     revision: 2686
     revid: <email address hidden>
     branch nick: bzr.dev
   Python interpreter: /usr/bin/python 2.5.1.final.0

Relevant subversion.conf

[61b12c5d-1607-0410-9915-ad3ff3e075d5]
locations = http://trac.pocoo.org/repos
branching-scheme = trunk1

And an updated traceback with the new versions:

Traceback (most recent call last):
   File "/home/tim/code/bzr.dev/bzrlib/commands.py", line 817, in
run_bzr_catch_errors
     return run_bzr(argv)
   File "/home/tim/code/bzr.dev/bzrlib/commands.py", line 779, in
run_bzr
     ret = run(*run_argv)
   File "/home/tim/code/bzr.dev/bzrlib/commands.py", line 477, in
run_argv_aliases
     return self.run(**all_cmd_args)
   File "/home/tim/code/bzr.dev/bzrlib/builtins.py", line 885, in run
     possible_transports=[to_transport])
   File "/home/tim/.bazaar/plugins/svn/workingtree.py", line 735, in
sprout
     repo.clone(result, revision_id)
   File "/home/tim/code/bzr.dev/bzrlib/decorators.py", line 127, in
read_locked
     return unbound(self, *args, **kwargs)
   File "/home/tim/code/bzr.dev/bzrlib/repository.py", line 489, in
clone
     self.copy_content_into(dest_repo, revision_id)
   File "/home/tim/code/bzr.dev/bzrlib/repository.py", line 412, in
copy_content_into
     return InterRepository.get(self, destination).copy_content
(revision_id)
   File "/home/tim/.bazaar/plugins/svn/fetch.py", line 380, in
copy_content
     (needed, parents) = self._find_until(revision_id)
   File "/home/tim/.bazaar/plugins/svn/fetch.py", line 353, in
_find_until
     until_revnum, scheme):
   File "/home/tim/.bazaar/plugins/svn/repository.py", line 784, in
follow_branch
     assert paths[p][1] is not None and paths[p][0] in ('A', 'R'),
"Parent didn't exist yet, but child wasn't added !?"
AssertionError: Parent didn't exist yet, but child wasn't added !?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 131180] branching fails with "Parent didn't exist yet, but child wasn't added !?"

  status triaged
  importance low

Thanks, confirmed.

Simplest way to reproduce this:

$ bzr branch http://trac.pocoo.org/repos/pygments/trunk

The fact that the parent directory of the branch was modified here seems
to be the problem.

(Marking as importance low because it doesn't appear to be a common
problem.)

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

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

Changes in the revision that is problematic:

r2214 | gbrandl | 2006-10-19 20:26:31 +0200 (Do, 19 Okt 2006) | 3 lines
Changed paths:
   A /pykleur/trunk/pygments (from /pykleur/trunk/pykleur:2211)
   R /pykleur/trunk/pygments/__init__.py
(from /pykleur/trunk/pykleur/__init__.py:2213)
   R /pykleur/trunk/pygments/console.py
(from /pykleur/trunk/pykleur/console.py:2213)
   R /pykleur/trunk/pygments/formatter.py
(from /pykleur/trunk/pykleur/formatter.py:2213)
   R /pykleur/trunk/pygments/formatters
(from /pykleur/trunk/pykleur/formatters:2213)
   R /pykleur/trunk/pygments/lexer.py
(from /pykleur/trunk/pykleur/lexer.py:2213)
   R /pykleur/trunk/pygments/lexers
(from /pykleur/trunk/pykleur/lexers:2213)
   R /pykleur/trunk/pygments/style.py
(from /pykleur/trunk/pykleur/style.py:2213)
   R /pykleur/trunk/pygments/styles
(from /pykleur/trunk/pykleur/styles:2213)
   R /pykleur/trunk/pygments/token.py
(from /pykleur/trunk/pykleur/token.py:2213)
   R /pykleur/trunk/pygments/util.py
(from /pykleur/trunk/pykleur/util.py:2213)
   D /pykleur/trunk/pykleur

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

Changed in bzr-svn:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
David Cournapeau (david-ar) wrote :

I have the same problem on another svn repository:

bzr svn-import http://ipython.scipy.org/svn/ipython ipython.bzr/

(with bzr-svn 0.4.0 and recent bzr from dev branch). Is there any kind of workaround ?

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → jelmer
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 131180] Re: branching fails with "Parent didn't exist yet, but child wasn't added !?"

Not yet, but I have some clue as to what is going on. I hope to fix it
in 0.4.1.

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

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 131180] Re: branching fails with "Parent didn't exist yet, but child wasn't added !?"

Am Samstag, den 25.08.2007, 14:46 +0000 schrieb Jelmer Vernooij:
> Not yet, but I have some clue as to what is going on. I hope to fix it
> in 0.4.1.
Fix is in bzr, will be in 0.4.1.

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

Changed in bzr-svn:
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
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.