branching fails saying path is already versioned

Bug #153347 reported by Sabin Iacob
4
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

initially posted as a comment to #53837:

I get an "/some/path is already versioned" error when branching; the revision that fails contains a directory move and some changes to a file beneath it; lightweight checkouts (which, AFAICS, are regular svn checkouts) with bzr and svn work, branching fails.

I wasn't able to reproduce with a local repo (the one I use uses svn+ssh); relevant data from svn diff follows:

Index: project/app/fixtures/initial_data.json
===================================================================
--- project/app/fixtures/initial_data.json (revision 0)
+++ project/app/fixtures/initial_data.json (revision 1642)
[diff content]

Property changes on: .
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-10-09 15:25:15.859999895 +0300
committer: Sabin Iacob (m0n5t3r) <email address hidden>
properties:
        branch-nick: livigent-web

   + timestamp: 2007-10-09 17:39:11.884000063 +0300
committer: Sabin Iacob (m0n5t3r) <email address hidden>
properties:
        branch-nick: livigent-web

Name: bzr:file-ids
   -
   + project/app/fixtures 1292@2167f8d4-df02-0410-9cfe-a89d12025c1d:project-web%2Ftrunk:project%2Fcore%2Ffixtures
project/app/fixtures/initial_data.json 1292@2167f8d4-df02-0410-9cfe-a89d12025c1d:project-web%2Ftrunk:project%2Fcore%2Ffixtures%2Finitial_data.json

Name: bzr:revision-id:v3-trunk1
   - 15 <email address hidden>
16 <email address hidden>
17 <email address hidden>
18 <email address hidden>
19 <email address hidden>
20 <email address hidden>
21 <email address hidden>
22 <email address hidden>
23 <email address hidden>
24 <email address hidden>
25 <email address hidden>
26 <email address hidden>
27 <email address hidden>
28 <email address hidden>
29 <email address hidden>
30 <email address hidden>
31 <email address hidden>

   + 15 <email address hidden>
16 <email address hidden>
17 <email address hidden>
18 <email address hidden>
19 <email address hidden>
20 <email address hidden>
21 <email address hidden>
22 <email address hidden>
23 <email address hidden>
24 <email address hidden>
25 <email address hidden>
26 <email address hidden>
27 <email address hidden>
28 <email address hidden>
29 <email address hidden>
30 <email address hidden>
31 <email address hidden>
32 <email address hidden>

branching, commit and push made with 0.4 branch, r701; branching r31 works, however I can't merge afterwards, so it doesn't really help; tested with the tip of 0.4 (r725), still getting the error

Related branches

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

Can you paste the backtrace of the failing "bzr branch" ?

Revision history for this message
Sabin Iacob (iacobs) wrote : Re: [Bug 153347] Re: branching fails saying path is already versioned

Jelmer Vernooij wrote:
> Can you paste the backtrace of the failing "bzr branch" ?
>

sorry I didn't think of -Derror before, here it is:

bzr: ERROR: bzrlib.errors.BzrError:
project/app/fixtures/initial_data.json is already versioned

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 781,
in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 743,
in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 475,
in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 886,
in run
    possible_transports=[to_transport])
  File "/home/iacobs/.bazaar/plugins/svn/remote.py", line 77, in sprout
    result_repo = repo.clone(result, revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line
127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line
490, in clone
    self.copy_content_into(dest_repo, revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line
413, in copy_content_into
    return InterRepository.get(self, destination).copy_content(revision_id)
  File "/home/iacobs/.bazaar/plugins/svn/fetch.py", line 499, in
copy_content
    reporter.finish_report(pool)
  File "/home/iacobs/.bazaar/plugins/svn/errors.py", line 75, in convert
    return unbound(*args, **kwargs)
  File "/home/iacobs/.bazaar/plugins/svn/transport.py", line 254, in
finish_report
    self._baton, pool)
  File "/usr/lib/svn-python/libsvn/ra.py", line 783, in
svn_ra_reporter2_invoke_finish_report

  File "/home/iacobs/.bazaar/plugins/svn/fetch.py", line 318, in close_file
    ie = self.inventory.add_path(path, 'file', self.file_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/inventory.py", line
1189, in add_path
    return self.add(ie)
  File "/usr/lib/python2.5/site-packages/bzrlib/inventory.py", line
1162, in add
    entry.name).encode('utf-8'))
BzrError: project/app/fixtures/initial_data.json is already versioned

bzr 0.91.0dev0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', '-Derror',
'svn+ssh://svn/svnroot/project/project-web/trunk', 'crashme']

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

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

Thanks! can you perhaps also post the diffstat for the revision you're trying to push?

Changed in bzr-svn:
importance: Undecided → Medium
Revision history for this message
Sabin Iacob (iacobs) wrote :

Jelmer Vernooij wrote:
> Thanks! can you perhaps also post the diffstat for the revision you're
> trying to push?
>
um, rather to pull :)
as I said, the revision is only affecting a few files (some typos
corrected, fixtures moved around, sql regenerated):

 app/fixtures/initial_data.json | 1
 app/models.py | 4
 schema.sql | 167
+++++++++++++++++------------------
 3 files changed, 88 insertions(+), 84 deletions(-)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 153347] Re: branching fails saying path is already versioned

Am Mittwoch, den 17.10.2007, 13:34 +0000 schrieb Sabin Iacob:
> Jelmer Vernooij wrote:
> > Thanks! can you perhaps also post the diffstat for the revision you're
> > trying to push?
> >
> um, rather to pull :)
> as I said, the revision is only affecting a few files (some typos
> corrected, fixtures moved around, sql regenerated):
>
> app/fixtures/initial_data.json | 1
> app/models.py | 4
> schema.sql | 167
> +++++++++++++++++------------------
> 3 files changed, 88 insertions(+), 84 deletions(-)
Hmm, that doesn't look wrong at all. app/fixtures/initial_data.json was added in this revision, is that correct?

Were there any files with that particular name in the branch earlier? I
wonder with which file it is colliding.

Cheers,

Jelmer

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

Revision history for this message
Sabin Iacob (iacobs) wrote :

Jelmer Vernooij wrote:
> Were there any files with that particular name in the branch earlier? I
> wonder with which file it is colliding.
>

well, as I said, I moved old_app/fixtures to app/fixtures; replaying the
change with svn works and shows a delete and an addition, like a regular
svn mv:

iacobs@moria ~/work/rnd/lwww $ svn up -r1642
A project/app/fixtures
A project/app/fixtures/initial_data.json
U project/app/models.py
D project/old_app/fixtures
U project/schema.sql
 U .
Updated to revision 1642.

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

Just reproduced this here locally. Appears to only be an issue when directories have been renamed in commits that have been pushed to Subversion by Bazaar.

Changed in bzr-svn:
assignee: nobody → jelmer
importance: Medium → High
status: New → Triaged
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: none → 0.4.4
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
Revision history for this message
wolever (wolever) wrote :

I'm running into this problem too:

$ bzr co https://code.basieproject.org/ basie_bzr
bzr: ERROR: trunk is already versioned
$

I'm using bzr 1.6, bzr-svn-0.4.12-subversion-1.5.0-OSX10.4-universal.dmg and Subversion 1.5.1-2 Universal.dmg.

I'd be happy to get more debug info, I'm just not sure how.

Revision history for this message
wolever (wolever) wrote :

It turns out that the selftests are also failing with the same error... I've attached the output.

Revision history for this message
wolever (wolever) wrote :

I'm still getting this error with the current 0.4 HEAD (1722).

Changed in bzr-svn:
status: Fix Released → New
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

wolever, if you still hit this it's a different issue (perhaps specific to Mac OS X?) - please open a different report

Changed in bzr-svn:
status: New → 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.