threads / patch / 12301

patchRefresh history when "Refresh" is clicked in the history viewer.

Subject: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.

## tl;dr

4 messages between Feb 24, 2008 and Feb 25, 2008. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Roger C. Soares· Feb 24, 2008, 23:18 UTC · lore
---
 .../src/org/spearce/egit/ui/GitHistoryPage.java    |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
Show changes to org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java +6 −2
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java
index 2fc7afa..268a6ba 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java
@@ -1207,8 +1207,12 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,
 	}
 
 	public void refresh() {
-		// TODO Auto-generated method stub
-
+		if (historyRefreshJob.cancel()) {
+			System.out.println("rescheduling");
+			historyRefreshJob.schedule();
+		} else {
+			System.out.println("failed to cancel?");
+		}
 	}
 
 	public Object getAdapter(Class adapter) {
-- 
1.5.4.1
Robin Rosenberg· Feb 24, 2008, 22:40 UTC · re: Roger C. Soares · lore

Re: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.

måndagen den 25 februari 2008 skrev Roger C. Soares:
> ---
>  .../src/org/spearce/egit/ui/GitHistoryPage.java    |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)

Looks ok, but what is the effect of refresh, besides possibly working around other bugs? I would expect to to refresh with the selected resource as "filter", but it doesn't.

-- robin
Roger C. Soares· Feb 25, 2008, 00:07 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.

Robin Rosenberg escreveu:
> Looks ok, but what is the effect of refresh, besides possibly working around
> other bugs? I would expect to to refresh with the selected resource as "filter",
> but it doesn't.
>   

If you checkout a branch in gitk or commit something using git-gui or git command line, egit will be out of sync. Refresh updates the history view to the current status.

I'm not sure I understand what you were expecting, what do you mean by "filter"?

[]s, Roger.

Robin Rosenberg· Feb 25, 2008, 00:11 UTC · re: Roger C. Soares · lore

Re: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.

måndagen den 25 februari 2008 skrev Roger C. Soares:
Show 9 quoted lines
> 
> Robin Rosenberg escreveu:
> > Looks ok, but what is the effect of refresh, besides possibly working around
> > other bugs? I would expect to to refresh with the selected resource as "filter",
> > but it doesn't.
> >   
> If you checkout a branch in gitk or commit something using git-gui or 
> git command line, egit will be out of sync. Refresh updates the history 
> view to the current status.
Ok, thanks. I'll publish this.  
> I'm not sure I understand what you were expecting, what do you mean by 
> "filter"?

History is filtered using the selected item in the project explorer and options from the buttons in the history brower.

← back to recent threads