Error when cancelling commit for git branch

Bug #1030343 reported by Jared Silva
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QBzr
Status tracked in Trunk
0.21
Fix Released
Medium
Unassigned
0.22
Fix Released
Medium
Unassigned
Trunk
Fix Released
Medium
Jared Silva

Bug Description

Open Bazaar Explorer, open a git branch, click commit, and click cancel.

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

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/commit.py", line 733, in closeEvent
    self._save_or_wipe_commit_data()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/commit.py", line 730, in _save_or_wipe_commit_data
    self.save_commit_data()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/commit.py", line 600, in save_commit_data
    if (self.tree.branch.control_files.get_physical_lock_status()
AttributeError: 'LocalGitBranch' object has no attribute 'control_files'

bzr 2.5.1 on python 2.7.3 (linux2)
arguments: ['/usr/bin/bzr', 'qcommit', '--ui-mode']
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bash_completion /usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion [2.5.1]
  changelog_merge /usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge [2.5.1]
  explorer /usr/lib/python2.7/dist-packages/bzrlib/plugins/explorer [1.2.2]
  fastimport /usr/lib/python2.7/dist-packages/bzrlib/plugins/fastimport [0.13.0]
  git /usr/lib/python2.7/dist-packages/bzrlib/plugins/git [0.6.8]
  launchpad /usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad [2.5.1]
  netrc_credential_store /usr/lib/python2.7/dist-packages/bzrlib/plugins/netrc_credential_store [2.5.1]
  news_merge /usr/lib/python2.7/dist-packages/bzrlib/plugins/news_merge [2.5.1]
  po_merge /usr/lib/python2.7/dist-packages/bzrlib/plugins/po_merge [2.5.1]
  qbzr /usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr [0.22.2]
  rewrite /usr/lib/python2.7/dist-packages/bzrlib/plugins/rewrite [0.6.3]
  svn /usr/lib/python2.7/dist-packages/bzrlib/plugins/svn [1.2.1]
  weave_fmt /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt [2.5.1]

Tags: qcommit easy git

Related branches

affects: bzr-explorer → qbzr
Changed in qbzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: easy git qcommit
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 1030343] [NEW] Error when cancelling commit for git branch

On Wed, Aug 01, 2012 at 09:02:52PM -0000, Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug:

> Open Bazaar Explorer, open a git branch, click commit, and click cancel.

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

> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/commit.py", line 733, in closeEvent
> self._save_or_wipe_commit_data()
> File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/commit.py", line 730, in _save_or_wipe_commit_data
> self.save_commit_data()
> File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/commit.py", line 600, in save_commit_data
> if (self.tree.branch.control_files.get_physical_lock_status()
> AttributeError: 'LocalGitBranch' object has no attribute 'control_files'
qbzr should be using self.tree.branch.get_physical_lock_status()
rather than the method on control files.

Cheers,

Jelmer

Jared Silva (jayrod)
Changed in qbzr:
assignee: nobody → Jared Silva (jayrod)
Revision history for this message
Jared Silva (jayrod) wrote :

Jelmer's suggestion fixed and verified in lp:~jayrod/qbzr/bug1030343

Tested bug description for both bzr and git branches and no problems.

Related: bug 540363

Changed in qbzr:
status: Confirmed → Fix Committed
Changed in qbzr:
milestone: none → 0.23.1
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.