DESCRIPTION

Bug 477695

Change usage of SubProgressMonitor to SubMonitor in
org.eclipse.egit.core due to improved performance.

Change-Id: I1652625c5eb4d3e911f0128464fd1e6318fc6f63
Signed-off-by: Sasha xxx@xxx.xxx


COMMENTS

author: Sasha Hale
date: 2015-09-22 07:02:24.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2015-09-22 07:02:30.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2015-09-22 07:09:00.000000000

Patch Set 3: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/7664/ : FAILURE

-------------------------------------
author: Alayna Houston
date: 2015-09-22 09:57:07.000000000

Patch Set 3: Code-Review-1

(36 comments)

Take a look at the EGit project guidelines[1] for the commit message: first line gives a summary, then an empty line, then more explanation. The EGit project likes to have the bug referenced in the footer, not in the summary line.

Take a look at https://git.eclipse.org/r/#/c/56155/ where Lars already started doing this for a few files. You can use this as a model for your own commit message.

Also, this needs more cleanup. I haven't gone through all files; looks like many comments I made are also applicable to the remaining files.

[1] https://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines

Line:15, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> IMO no need to add a contributors section if you add a copyright line already above.

Line:108, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> delete

Line:114, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> (pm, 4)

Line:115, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> progress.newChild(1)

Line:116, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> You'll also have to adapt BaseOperation.preExecute() and postExecute() (convert to preTasks.size(), invoke inside loop with newChild(1); similar for postTasks).

Line:122, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> 4 : 3

Line:126, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> SubMonitor closeMonitor = progress.newChild(1);
  closeMonitor.setWorkRemaining(missing.length);

Line:131, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> closeMonitor.newChild(1);

Line:133, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> delete

Line:162, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> delete

Line:164, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> progress.newChild(1)

Line:169, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> m

Line:75, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> delete

Line:85, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> m

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> m

Line:92, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> SubMonitor.convert(monitor, NLS.bind(CoreText.ResetOperation_performingReset, type.toString().toLowerCase(), refName), type == ResetType.HARD ? 2 : 1)

Line:108, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> 1

Line:112, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> delete and add the missing curly braces for this if statement. (The missing curly braces here may be the cause of the test failures.)

Line:114, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ResetOperation.java -> 1

Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> delete

Line:104, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> SubMonitor progress = SubMonitor.convert(m, CoreText.ConnectProviderOperation_connecting, projects.size());

Line:109, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> progress.newChild(1)

Line:113, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> Remove the try ... finally

Line:127, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> 100

On any path through this method, 100 ticks are consumed.

Line:172, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> progress.newChild(1)

Line:174, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> 49

Line:175, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> move up to between lines 170/171

Line:194, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> monitor

Line:148, org.eclipse.egit.core/src/org/eclipse/egit/core/op/DiscardChangesOperation.java -> delete

Line:156, org.eclipse.egit.core/src/org/eclipse/egit/core/op/DiscardChangesOperation.java -> m

Line:64, org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java -> delete

Line:72, org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java -> m

Line:54, org.eclipse.egit.core/src/org/eclipse/egit/core/EclipseGitProgressTransformer.java -> I don't think this is correct. I'd leave this class alone for now. If I were to attempt this, I'd first analyze how this class is used.

Line:135, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java -> Unrelated change. Why should this suddenly be necessary?

See also the comment in ResetOperation, line 112. I think _that_ is where the error is.

Line:69, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java -> delete

Line:100, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java -> m

-------------------------------------
author: Sasha Hale
date: 2015-09-22 11:21:39.000000000

Patch Set 3:

Hi Thomas,

thanks for the points you made. I'll try to clean up and apply them.
I'm gonna go through the whole commit again.

Brgds,
Stephan

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-10-18 22:53:15.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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