DESCRIPTION

Compare/Replace With > Commit: Show commits filtered by resources

Instead of showing all commits in the commit selection dialog, they are
now filtered by the selected resources.

Following is done for files to get a more complete listing. But when
comparing, the right side will be empty. See bug 374722 for a solution
which could be reused here.

Bug: 382476
Change-Id: I90a6b2f86ed21caad10a4f29a8313d8efe6f5027


COMMENTS

author: Brenden Conley
date: 2012-09-30 21:54:45.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3432/ 

-------------------------------------
author: Brenden Conley
date: 2012-09-30 22:10:20.000000000

Patch Set 1: I would prefer that you didn't submit this

Build Unstable 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3432/ : UNSTABLE

-------------------------------------
author: Carlie Harper
date: 2012-10-01 07:11:38.000000000

Patch Set 1:

With that we lose the use-case that the user knows a commit-id from somewhere and wants to replace the file content with that contained in that commit. Comparing would still work in that case with the menu entry Compare With > History..., (but I'm not sure how many users understand the history view well enough to achieve that).

Maybe we could take this change and just add a Replace With > History... instead of adding filter buttons to the selection dialog.

-------------------------------------
author: Danika Greer
date: 2012-10-01 11:18:51.000000000

Patch Set 1:

Hm..

Well, currently you'd have to scan the whole list to find the commit in that case, right? That is already pretty awkward. 

Can you give an example for that use case? I don't get why a user would have an ID of a commit that is not in the filtered history of the file and then wants to replace the file contents with that.

It would probably make more sense to use the History view for this:

* Show history (of whole repository) for the file
* Find the commit using the Find toolbar
* Right Click -> Compare with Working Tree
* Replace left side with contents from right side

How would a Replace With -> History... work?

-------------------------------------
author: Carlie Harper
date: 2012-10-02 07:18:46.000000000

Patch Set 1: Looks good to me, approved; IP review completed

> Can you give an example for that use case? I don't get why
> a user would have an ID of a commit that is not in the
> filtered history of the file and then wants to replace the 
> file contents with that.

I have to admit that I never had this use case myself. It was more a theoretical thought. I agree that in 99% of the use-cases the filtering of the commits makes more sense, and in the other 1% users can use the history view. Therefore I think we should submit your change.

Thanks!

> How would a Replace With -> History... work?

We could add a new menu entry... On the other hand, the history view is complicated enough and I doubt that many users understand the mixture of menu entries, some operating on the commit and some on the resource that is the entry of the history view.

-------------------------------------
author: Carlie Harper
date: 2012-10-02 07:19:23.000000000

Patch Set 1: Verified

> Can you give an example for that use case? I don't get why
> a user would have an ID of a commit that is not in the
> filtered history of the file and then wants to replace the 
> file contents with that.

I have to admit that I never had this use case myself. It was more a theoretical thought. I agree that in 99% of the use-cases the filtering of the commits makes more sense, and in the other 1% users can use the history view. Therefore I think we should submit your change.

Thanks!

> How would a Replace With -> History... work?

We could add a new menu entry... On the other hand, the history view is complicated enough and I doubt that many users understand the mixture of menu entries, some operating on the commit and some on the resource that is the entry of the history view.

-------------------------------------
author: Carlie Harper
date: 2012-10-02 07:19:25.000000000

Change has been successfully merged into the git repository.

-------------------------------------
author: Danika Greer
date: 2012-10-02 21:19:34.000000000

Patch Set 1:

> I have to admit that I never had this use case myself. It was more a theoretical thought. I agree that in 99% of the use-cases the filtering of the commits makes more sense, and in the other 1% users can use the history view. Therefore I think we should submit your change.

Ok. That's a good example for which the CLI is better suited because it's easy to "build the command out of parts".

>> How would a Replace With -> History... work?
>
> We could add a new menu entry... On the other hand, the history view is complicated enough and I doubt that many users understand the mixture of menu entries, some operating on the commit and some on the resource that is the entry of the history view.

How does using Compare With -> History... work by the way?

-------------------------------------
