This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245324

Summary: Sort order in "Show Changes" window screwed up after update
Product: versioncontrol Reporter: klr8
Component: SubversionAssignee: Ondrej Vrabec <ovrabec>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P4    
Version: 8.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description klr8 2014-06-30 13:52:27 UTC
Faulty scenario:
- Open the "Show Changes" view for a project with multiple incoming changes
- Sort the list of changes on "Repository Location"
- Right-click one of the incoming changes and select "Update to HEAD"

=> The entry is removed from the table (correct!). However, the table is resorted on "File" (the first column) instead of "Repository Location".

This bug makes reviewing incoming changes quite confusing since the files keep jumping around in the table.

I experienced this issue with Subversion. I'm not sure if it also happens with other version control systems.
Comment 1 Ondrej Vrabec 2014-07-07 11:05:28 UTC
seems to happen only if updating changes the number of the visible columns - i.e. you're updating a different branch. That's not such a big deal as you describe it.
Comment 2 Ondrej Vrabec 2014-07-07 11:26:40 UTC
fix: http://hg.netbeans.org/core-main/rev/3312f602e251
Comment 3 klr8 2014-07-07 15:56:54 UTC
> seems to happen only if updating changes the number of the visible columns - i.e. you're updating a different branch

I'm not 100% sure I understand what you mean with this. Can I update the number of visible columns? Or do you mean rows?

I'm certainly not updating from a different branch. I'm selecting all modules of a multi-module Maven project and then do "Show Changes". I then get a list like this (unsorted):

PaymentReminderServiceActivator.java | Remotely Modified | /trunk/mci/mci-back-end/mci-integration/src/main/java/net/awl/ecs/edoc/ap/integration/payment/PaymentReminderServiceActivator.java	
DocumentHandle.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/DocumentHandle.java	
PaymentReminderErrorServiceActivator.java | Remotely Deleted | /trunk/mci/mci-back-end/mci-integration/src/main/java/net/awl/ecs/edoc/ap/integration/payment/PaymentReminderErrorServiceActivator.java	
DocumentNotificationService.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/service/DocumentNotificationService.java

I then sort this by repository location. The first lines become:

DocumentHandle.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/DocumentHandle.java	
DocumentPaymentReminder.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/DocumentPaymentReminder.java	
FailedMessage.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/FailedMessage.java	
DocumentNotificationService.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/service/DocumentNotificationService.java	

I now select the first line (DocumentHandle.java) and click "Update to HEAD". The first 4 lines of the table now become:

DocumentHandleRepositoryTest.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/test/java/net/awl/ecs/edoc/ap/repository/DocumentHandleRepositoryTest.java	
DocumentNotificationService.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/service/DocumentNotificationService.java	
DocumentPaymentReminder.java | Remotely Modified | /trunk/mci/mci-back-end/mci-ap-core/src/main/java/net/awl/ecs/edoc/ap/domain/DocumentPaymentReminder.java	
ErrorServiceActivator.java | Remotely New | /trunk/mci/mci-back-end/mci-integration/src/main/java/net/awl/ecs/edoc/ap/integration/ErrorServiceActivator.java	

That's is clearly different from what I expected: DocumentPaymentReminder.java should be the first line, FailedMessage.java the second, and so on.
Comment 4 Quality Engineering 2014-07-08 02:27:59 UTC
Integrated into 'main-silver', will be available in build *201407080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3312f602e251
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #245324 - Sort order in "Show Changes" window screwed up after update
remember sorting column if possible when changing the number of columns
Comment 5 klr8 2014-10-22 12:49:27 UTC
I've reopened this ticket.
Testing with NetBeans 8.0.1, I still see sort order shifts in the 'Show Changes' view when changing the contents of this screen by updating, reverting, editing files and so on.

Stating the requirement differently: I want the user-selected sort order to be maintained in the 'Show Changes' view when the content of this view is updated.
Comment 6 Ondrej Vrabec 2014-10-22 13:37:30 UTC
i see. In the end i was able to reproduce with the Repository Location column. It's because at first the column contains just "Asking repository..." dummy value which is recalculated in background and then exchanged. However ETable does not resort its rows when a value is changed.

*** This bug has been marked as a duplicate of bug 206486 ***