Qcommit: Give option to show changes in tree view.

Bug #456198 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

Feature Request:
Show tree view instead of a flat view of changes in QCommit.

The reason for change can be listed in the second column (i.e: modified, rename, moved, deleted etc)

Could this be made as an option in qcommit, and the use of the option is persisted so that on the 2nd commit it remembers the user's preference.

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

I don't understand. Current qcommit behavior is to show tree view. What's wrong with it?

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

I was thinking that we could maybe have some fuzzy logic to decide when to do this. e.g. if there are more than 5 changes in a dir, then group that dir.

Changed in qbzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Alexander Belchenko wrote:
> I don't understand. Current qcommit behavior is to show tree view. What's wrong with it?

Directories are only grouped together if the directory it's self has changed (typically added), or the directory is not versioning.

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

ah. ok, I understand now.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote : Re: [Bug 456198] Re: Qcommit: Give option to show changes in tree view.

Can/Should qadd's tree view be reused in qcommit?

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

On Wed, Oct 21, 2009 at 3:53 PM, Craig Hewetson <email address hidden> wrote:
> Can/Should qadd's tree view be reused in qcommit?

It is allready.

tags: added: qcommit treeview
Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
status: Confirmed → Fix Committed
tags: added: treewidget
removed: treeview
Changed in qbzr:
status: Fix Committed → Fix Released
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

Built the lastest (revno: ) and got this error when running qcommit:

   File "/home/craig/.bazaar/plugins/qbzr/lib/trace.py", line 286, in
reports_exception_decorate
     return f(*args, **kargs)
   File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 472, in load
     change_load_filter=lambda c:not c.is_ignored())
   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 1219, in
set_tree
     initial_checked_paths=initial_checked_paths)
   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 413, in
set_tree
     frozenset(self.inventory_data_by_path.iterkeys()))
   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 118, in
group_large_dirs
     set_dir_as_container('')
   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 89, in
set_dir_as_container
     decendents = all_paths_expanded[path][2]
 KeyError: ''

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

On Tue, Oct 27, 2009 at 10:08 AM, Craig Hewetson
<email address hidden> wrote:
> Built the lastest (revno: ) and got this error when running qcommit:
>
>   File "/home/craig/.bazaar/plugins/qbzr/lib/trace.py", line 286, in
> reports_exception_decorate
>     return f(*args, **kargs)
>   File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 472, in load
>     change_load_filter=lambda c:not c.is_ignored())
>   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 1219, in
> set_tree
>     initial_checked_paths=initial_checked_paths)
>   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 413, in
> set_tree
>     frozenset(self.inventory_data_by_path.iterkeys()))
>   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 118, in
> group_large_dirs
>     set_dir_as_container('')
>   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 89, in
> set_dir_as_container
>     decendents = all_paths_expanded[path][2]
>  KeyError: ''

That happens when there are no changes. I did not test that.

Fixed now.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

Almost, I get a different error now:

 Traceback (most recent call last):
   File "/home/craig/.bazaar/plugins/qbzr/lib/trace.py", line 286, in
reports_exception_decorate
     return f(*args, **kargs)
   File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 460, in load
     initial_checked_paths=self.initial_selected_list)
   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 1223, in
set_tree
     initial_checked_paths=initial_checked_paths)
   File "/home/craig/.bazaar/plugins/qbzr/lib/treewidget.py", line 427, in
set_tree
     self.inventory_data_by_id[fileid] = item_data
 UnboundLocalError: local variable 'fileid' referenced before assignment

Maybe I get this because I'm working on a checkout?

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

On Tue, Oct 27, 2009 at 1:58 PM, Craig Hewetson <email address hidden> wrote:
> Maybe I get this because I'm working on a checkout?

Nope - was caused by a typo that my testing did not pick up :-(.

Fixed now.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

:-)

The following error occured when I selected/checked the parent directory:

 bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute
'is_renamed'

Traceback (most recent call last):

File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 476, in
on_filelist_data_changed

self.update_compleater_words()

File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 494, in
update_compleater_words

if change.is_renamed():

AttributeError: 'NoneType' object has no attribute 'is_renamed'

NOTE:

The startup "checked" state is inversed if there is a folder structure.
Expected everything to be checked or nothing.

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

On Tue, Oct 27, 2009 at 4:03 PM, Craig Hewetson <email address hidden> wrote:
> The following error occured when I selected/checked the parent
> directory:
>
>  bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute
> 'is_renamed'
>
> Traceback (most recent call last):
>
> File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 476, in
> on_filelist_data_changed
>
> self.update_compleater_words()
>
> File "/home/craig/.bazaar/plugins/qbzr/lib/commit.py", line 494, in
> update_compleater_words
>
> if change.is_renamed():
>
> AttributeError: 'NoneType' object has no attribute 'is_renamed'

Based on that traceback, I think you have an old version.

line 494 now reads: num_files_loaded = 0
http://bazaar.launchpad.net/~qbzr-dev/qbzr/trunk/annotate/head%3A/lib/commit.py#L494

> NOTE:
>
> The startup "checked" state is inversed if there is a folder structure.
> Expected everything to be checked or nothing.
> ** Attachment added: "Screenshot.png"
> http://launchpadlibrarian.net/34455984/Screenshot.png

I was not able to reproduce that.

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

Hi Craig. How is this working out. Does my solution of automaticly deciding when to group directories solve your problem?

Changed in qbzr:
milestone: none → 0.16
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

The solution works really well.
There is a problem though, if you have a branch with no changes and you run qcommit, it shows 2 directories with no names. Then if you expand both of them you get a segmentation fault. This happens on qadd too.

NOTE: my test branch doesn't contain my ignored files.

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.