bzr unable to branch underneath checkout inside shared repo

Bug #376931 reported by Alexander Belchenko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

This is very complex issue to describe by words. bzr fails to create branch nested into checkout in the case when checkout does not use shared repository, but in fact there is shared repository. IIUC bzr at the beginning of branch operation opened shared repo but then it tries to open it again and see non-shared repo inside checkout and fails at this step with error.

I'd better to show you sequence of commands:

C:\Temp\3>bzr init a
Created a standalone tree (format: pack-0.92)

C:\Temp\3>bzr ci a -m1 --unchanged
Committing to: C:/Temp/3/a/
Committed revision 1.

C:\Temp\3>mkdir repo

C:\Temp\3>bzr co a repo/a-co

C:\Temp\3>bzr init-repo repo
Shared repository with trees (format: pack-0.92)
Location:
  shared repository: repo

C:\Temp\3>bzr branch a repo/a-co/a-branch
bzr: ERROR: No repository present: "file:///C:/Temp/3/repo/a-co/a-branch/"

Here is relevant part of .bzr.log:

0.172 bzr arguments: [u'branch', u'a', u'repo/a-co/a-branch']
0.203 looking for plugins in C:\work\Bazaar\plugins
0.422 looking for plugins in C:/Program Files/Bazaar/plugins
0.469 encoding stdout as sys.stdout encoding 'cp866'
0.547 opening working tree 'C:/Temp/3/a'
0.610 opening working tree 'C:/Temp/3/a'
0.641 Using fetch logic to copy between KnitPackRepository('file:///C:/Temp/3/a/.bzr/repository/')(<RepositoryFormatKnitPack1>) and KnitPackRepository('file:///C:/Temp/3/repo/.bzr/repository/')(<RepositoryFormatKnitPack1>)
0.688 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x00D99450> in file:///C:/Temp/3/repo/a-co/a-branch/.bzr/
0.703 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 716, in exception_to_return_code
  File "bzrlib\commands.pyo", line 911, in run_bzr
  File "bzrlib\commands.pyo", line 547, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1100, in run
  File "bzrlib\bzrdir.pyo", line 1143, in sprout
  File "bzrlib\decorators.pyo", line 138, in read_locked
  File "bzrlib\branch.pyo", line 948, in sprout
  File "bzrlib\bzrdir.pyo", line 1462, in create_branch
  File "bzrlib\branch.pyo", line 1642, in initialize
  File "bzrlib\branch.pyo", line 1286, in _initialize_helper
  File "bzrlib\branch.pyo", line 1566, in open
  File "bzrlib\bzrdir.pyo", line 643, in find_repository
NoRepositoryPresent: No repository present: "file:///C:/Temp/3/repo/a-co/a-branch/"

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

I can't reproduce this.

Changed in bzr:
status: New → Incomplete
Revision history for this message
Alexander Belchenko (bialix) wrote :

C:\Temp\3>bzr version
Bazaar (bzr) 1.14rc2
  Python interpreter: C:\Program Files\Bazaar\python25.dll 2.5.4
  Python standard library: C:\Program Files\Bazaar\lib\library.zip
  bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Documents and Settings\modul98\Application Data\bazaar\2.0
  Bazaar log file: C:\work\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Also seen on Linux with bzr 1.11.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 376931] [NEW] bzr unable to branch underneath checkout inside shared repo

2009/5/15 Alexander Belchenko <email address hidden>:
> Public bug reported:
>
> This is very complex issue to describe by words. bzr fails to create
> branch nested into checkout in the case when checkout does not use
> shared repository, but in fact there is shared repository. IIUC bzr at
> the beginning of branch operation opened shared repo but then it tries
> to open it again and see non-shared repo inside checkout and fails at
> this step with error.

Right, you've created a situation where there's a shared repo at
repo/, a standalone checkout at repo/a-co, and then you're trying to
make a new branch, presumably using repo/ at repo/a-co/a-branch.

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

Revision history for this message
Martin Pool (mbp) wrote :

This script copy&pasted from your example works for me on Linux with 1.16dev. Can you change it to make it fail?

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 376931] Re: bzr unable to branch underneath checkout inside shared repo

Martin Pool пишет:
> This script copy&pasted from your example works for me on Linux with
> 1.16dev. Can you change it to make it fail?

It works for me with official 1.15 sources. Perhaps it fixed between
1.14 and 1.15.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Alexander Belchenko пишет:
> Martin Pool пишет:
>> This script copy&pasted from your example works for me on Linux with
>> 1.16dev. Can you change it to make it fail?
>
> It works for me with official 1.15 sources. Perhaps it fixed between
> 1.14 and 1.15.
>

Hmm, on my current system bug could reproduced with official 1.13, but
not with official 1.14rc2.

Martin Pool (mbp)
Changed in bzr:
milestone: none → 1.15final
status: Incomplete → Fix Released
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.