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

4 messages from 2008-02-24 to 2008-02-25. Participants: Roger C. Soares, Robin Rosenberg.
Thread: https://gitlist.dev/t/12301

## Robin Rosenberg, 2008-02-24 22:40

Subject: Re: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.
Message-ID: <200802242340.09606.robin.rosenberg@dewire.com>
URL: https://gitlist.dev/e/200802242340.09606.robin.rosenberg%40dewire.com
In-Reply-To: <1203895097-3742-1-git-send-email-rogersoares@intelinet.com.br>

```
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, 2008-02-24 23:18

Subject: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.
Message-ID: <1203895097-3742-1-git-send-email-rogersoares@intelinet.com.br>
URL: https://gitlist.dev/e/1203895097-3742-1-git-send-email-rogersoares%40intelinet.com.br

```
---
 .../src/org/spearce/egit/ui/GitHistoryPage.java    |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

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

```

## Roger C. Soares, 2008-02-25 00:07

Subject: Re: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.
Message-ID: <47C206AF.8050904@intelinet.com.br>
URL: https://gitlist.dev/e/47C206AF.8050904%40intelinet.com.br
In-Reply-To: <200802242340.09606.robin.rosenberg@dewire.com>

```

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, 2008-02-25 00:11

Subject: Re: [EGIT PATCH] Refresh history when "Refresh" is clicked in the history viewer.
Message-ID: <200802250111.15172.robin.rosenberg@dewire.com>
URL: https://gitlist.dev/e/200802250111.15172.robin.rosenberg%40dewire.com
In-Reply-To: <47C206AF.8050904@intelinet.com.br>

```
måndagen den 25 februari 2008 skrev Roger C. Soares:
> 
> 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.

```
