qcommit crashes on cancel

Bug #381833 reported by Craig Hewetson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Medium
Gary van der Merwe

Bug Description

Did a light weight checkout of lp:bzr.
Made changes and ran qcommit.
Pressed cancel and the following error message shows:

bzr: ERROR: exceptions.AttributeError: 'RemoteRepository' object has no attribute 'control_files'

Traceback (most recent call last):
  File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 605, in closeEvent
    self.save_message()
  File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 477, in save_message
    self.tree.branch.repository.control_files.get_physical_lock_status() or\
AttributeError: 'RemoteRepository' object has no attribute 'control_files'

=========================
Output of bzr info to give more info of the checkout:
Lightweight checkout (format: 1.6 or 1.6.1-rich-root or 1.9 or 1.9-rich-root or dirstate or dirstate-tags or pack-0.92 or rich-root or rich-root-pack)
Location:
   checkout of branch: bzr+ssh://bazaar.launchpad.net/%7Ebzr/bzr/trunk/
    shared repository: bzr+ssh://bazaar.launchpad.net/%7Ebzr/bzr/trunk/

Related branches:
  parent branch: http://bazaar-ng.org/bzr/bzr.dev/

Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
importance: Undecided → Medium
milestone: none → 0.11.0
status: New → Fix Committed
Revision history for this message
Alexander Belchenko (bialix) wrote :

Craig, I guess you don't have write permissions to commit directly into lp:bzr.

Revision history for this message
Gary van der Merwe (garyvdm) wrote : Re: [Bug 381833] Re: qcommit crashes on cancel

On Thu, Jun 11, 2009 at 4:32 PM, Alexander Belchenko<email address hidden> wrote:
> Craig, I guess you don't have write permissions to commit directly into
> lp:bzr.

Alex - The old code was trying to access the attribute 'control_files'
which exists only for a local Repository objects, and not for
RemoteRepository.

I did some testing, and we only need to check that the branch is not
locked, and not the repository. I'm not sure why I was checking if the
Repository was locked before, but I'm sure this was incorrect.

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

Gary van der Merwe пишет:
> On Thu, Jun 11, 2009 at 4:32 PM, Alexander Belchenko<email address hidden> wrote:
>> Craig, I guess you don't have write permissions to commit directly into
>> lp:bzr.
>
> Alex - The old code was trying to access the attribute 'control_files'
> which exists only for a local Repository objects, and not for
> RemoteRepository.
>
> I did some testing, and we only need to check that the branch is not
> locked, and not the repository. I'm not sure why I was checking if the
> Repository was locked before, but I'm sure this was incorrect.

I agree. Anyway this bug plunging the thoughts about another error
masked by the Traceback in this bug report. I.e. I'm sure Craig unable
to commit directly to lp:bzr. So his commit never succeed. Therefore on
exit qcommit will try to save commit message in branch.conf of lp:bzr.
But this operation should fail as well, because Craig has no permissions
to modify lp:bzr, and... we should get another error here actually,
I'm just can't predict which one. Real test needed!

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

On Thu, Jun 11, 2009 at 5:07 PM, Alexander Belchenko<email address hidden> wrote:
> I agree. Anyway this bug plunging the thoughts about another error
> masked by the Traceback in this bug report. I.e. I'm sure Craig unable
> to commit directly to lp:bzr. So his commit never succeed. Therefore on
> exit qcommit will try to save commit message in branch.conf of lp:bzr.
> But this operation should fail as well, because Craig has no permissions
> to modify lp:bzr, and... we should get another error here actually,
> I'm just can't predict which one. Real test needed!

No - It will save to the branch.conf of the lightweight checkout.

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

Gary van der Merwe пишет:
> On Thu, Jun 11, 2009 at 5:07 PM, Alexander Belchenko<email address hidden> wrote:
>> I agree. Anyway this bug plunging the thoughts about another error
>> masked by the Traceback in this bug report. I.e. I'm sure Craig unable
>> to commit directly to lp:bzr. So his commit never succeed. Therefore on
>> exit qcommit will try to save commit message in branch.conf of lp:bzr.
>> But this operation should fail as well, because Craig has no permissions
>> to modify lp:bzr, and... we should get another error here actually,
>> I'm just can't predict which one. Real test needed!
>
> No - It will save to the branch.conf of the lightweight checkout.

Gary, lightweight checkout does not have local branch.conf.

I think lightweight checkouts should have local tree.conf though.
But there is not tree.conf at all in bzr today.

Changed in qbzr:
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.