[EGIT PATCHES] Assorted minor fixes

11 messages, 2 authors, 2016-06-15 · open the first message on its own page

[EGIT PATCHES] Assorted minor fixes

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

-- robin

 .../egit/core/op/ConnectProviderOperation.java     |   15 ++++++-
 org.spearce.egit.ui/icons/toolbar/trackd.png       |  Bin 0 -> 387 bytes
 org.spearce.egit.ui/icons/toolbar/tracke.png       |  Bin 0 -> 411 bytes
 org.spearce.egit.ui/plugin.properties              |    2 +-
 org.spearce.egit.ui/plugin.xml                     |   19 +++++----
 .../src/org/spearce/egit/ui/UIText.java            |    3 +
 .../egit/ui/internal/actions/ResetAction.java      |    2 +-
 .../spearce/egit/ui/internal/actions/Track.java    |   40 +++++++++++++++++---
 .../internal/decorators/GitResourceDecorator.java  |    2 +-
 .../egit/ui/internal/history/GitHistoryPage.java   |   24 +++++++++---
 .../ui/internal/sharing/ExistingOrNewPage.java     |   17 ++++++++
 .../egit/ui/internal/sharing/SharingWizard.java    |   16 +++++++-
 .../src/org/spearce/egit/ui/uitext.properties      |    1 +
 13 files changed, 115 insertions(+), 26 deletions(-)

[PATCH] Drop an unused empty menu contribution.

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

Signed-off-by: Robin Rosenberg <redacted>
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index c71c763..e47d75a 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -97,14 +97,6 @@
                menubarPath="team.main/group1"
                tooltip="%CommitAction_tooltip"/>
 	  </objectContribution>
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            adaptable="true"
-            id="org.spearce.egit.ui.IFileContributions">
-         <filter name="projectPersistentProperty"
-               value="org.eclipse.team.core.repository=org.spearce.egit.core.GitProvider">
-         </filter>
-      </objectContribution>
    </extension>
 
    <extension
-- 
1.5.5.1.178.g1f811

[PATCH] Add a Track toolbar icon for adding resources

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

We already had a track action, but it was only available in the team menu. I had to choose a different
handler baseclass for this to work.

Signed-off-by: Robin Rosenberg <redacted>
diff --git a/org.spearce.egit.ui/icons/toolbar/trackd.png b/org.spearce.egit.ui/icons/toolbar/trackd.png
new file mode 100644
index 0000000000000000000000000000000000000000..1ae9b5abd05c69681dd34485336f366772d530b4
GIT binary patch
literal 387
zcmV-}0et?6P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0003>Nkl<ZIE{^y
zKgz;D5XFBZifExXurY;bmkU_f*`@a`NzPzrZJ*9ku<-zr&PoJ9i7to;HjafDlDK|f
z9t`_u=DnGn-4#`(EW$AS4p!Bi0h+bXeh>s&L=Xg8wPjLODQ5P4-&$1#V6|GQh^UAt
zKz3flWHR{{7!HS0%vxM$$yt$#jbtMO%;)pm2$1$*u~_KobYeD}F`Z7e+wC$QkH3Vn
z<WwMvBJK5h3<d*gwHmkE4Py*Z6shNVwrYg;ExiREj|U>c^ZCq0#c_=1c>siAm^*E*
zg3IN?Znwj69M0!6Ns@3l9B8##0QkOd?MW)2s&qOX+U+)tMuU32PP5r0Ns?c@6qUc6
zB0m$C6DWf!fH8*6W<$T<=YGF)JRaHa_gt^nautk5BevUZ&S8wfah!hz<nx`^>$NVI
h%hchzuJs`m@dBk;vWC9IYJva&002ovPDHLkV1m>)t&RWy

literal 0
HcmV?d00001
diff --git a/org.spearce.egit.ui/icons/toolbar/tracke.png b/org.spearce.egit.ui/icons/toolbar/tracke.png
new file mode 100644
index 0000000000000000000000000000000000000000..b06c26581caef5b7bcd0e2f5f49840a0d47835e7
GIT binary patch
literal 411
zcmV;M0c8G(P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0004ENkl<ZIE|%~
zPfG$(6vcmU97-&Of<UaGO+nPEpdbrd25xHQ$C;VW(6(KlK>`<%X@v+yo2*5-C<xSa
zqeGy0TMXLFIFitT%e(K-IrqGON<^3xmSv4D77<SX;*P<%X`14PX_}%3RT2^9uWT4b
zpeqd^pU;a@N|aIp;LiO}mPgwWNTpKBU)A4tliea(5GjZZAclBak3cDxk>dHPT%9d*
zdAcB_TqbY}ZZd!lP{<}_Z*3mgIH5lkrPr>a>J<vvq#UGgg4`&aTXF<+y9-K#z70f&
zt2*UJNISV@Sso)E2c4Qu>+Olz^$5MM3g5MNwAW7}u|)t3!w5W+p@8%uva*jJ+d&IA
z(59=Xa0QCZal9ck0PmIm=3}11sK9@q1K2f<X8D1+?Hb*-js4Li^xURp$0u`ec$DD&
zWyUj6vg0H+JAVqO!FO)l9n0-SeK@hT8)7MaJ@)hm_yIyFuY%3nKQ;gW002ovPDHLk
FV1l|%vu*$Y

literal 0
HcmV?d00001
diff --git a/org.spearce.egit.ui/plugin.properties b/org.spearce.egit.ui/plugin.properties
index c0cb735..64a88c3 100644
--- a/org.spearce.egit.ui/plugin.properties
+++ b/org.spearce.egit.ui/plugin.properties
@@ -14,7 +14,7 @@ DisconnectAction_tooltip=Disconnect the Git team provider.
 AssumeUnchangedAction_label=Assume unchanged
 AssumeUnchangedAction_tooltip=Assume selected folders/files are unchanged
 
-TrackAction_label=Track (Add)
+TrackAction_label=Track (&Add)
 TrackAction_tooltip=Track selected files/folders with Git.
 
 UntrackAction_label=Untrack (Remove)
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index e47d75a..611829a 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -240,6 +240,17 @@
 		       toolbarPath="org.spearce.egit.ui"
 		       tooltip="%ResetAction_tooltip">
 		</action>
+		<action
+		       class="org.spearce.egit.ui.internal.actions.Track"
+		       disabledIcon="icons/toolbar/trackd.png"
+		       icon="icons/toolbar/tracke.png"
+		       id="org.spearce.egit.ui.trackaction"
+		       label="%TrackAction_label"
+		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
+		       style="push"
+		       toolbarPath="org.spearce.egit.ui"
+		       tooltip="Start tracking the selected resources">
+		</action>
       </actionSet>
    </extension>
 </plugin>
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/Track.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/Track.java
index 7622ee4..6588cca 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/Track.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/Track.java
@@ -8,10 +8,15 @@
  *******************************************************************************/
 package org.spearce.egit.ui.internal.actions;
 
-import java.util.List;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
 
-import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.spearce.egit.core.op.TrackOperation;
 
 /**
@@ -19,9 +24,32 @@ import org.spearce.egit.core.op.TrackOperation;
  *
  * @see TrackOperation
  */
-public class Track extends AbstractOperationAction {
-	protected IWorkspaceRunnable createOperation(final IAction act,
-			final List sel) {
-		return sel.isEmpty() ? null : new TrackOperation(sel);
+public class Track extends RepositoryAction {
+
+	@Override
+	public void run(IAction action) {
+		try {
+			final TrackOperation op = new TrackOperation(Arrays.asList(getSelectedResources()));
+			getTargetPart().getSite().getWorkbenchWindow().run(true, false, new IRunnableWithProgress() {
+
+				public void run(IProgressMonitor arg0) throws InvocationTargetException,
+						InterruptedException {
+					try {
+						op.run(arg0);
+					} catch (CoreException e) {
+						MessageDialog.openError(getShell(),"Track failed", e.getMessage());
+					}
+				}
+			});
+		} catch (InvocationTargetException e) {
+			MessageDialog.openError(getShell(),"Reset failed", e.getMessage());
+		} catch (InterruptedException e) {
+			MessageDialog.openError(getShell(),"Reset failed", e.getMessage());
+		}
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return getSelectedAdaptables(getSelection(), IResource.class).length > 0;
 	}
 }
-- 
1.5.5.1.178.g1f811

[PATCH] Reset the graph plotter internals when HEAD has changed.

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

When we reset HEAD to an old revision it becomes more visible than when
we add a new commit. This is an intermediate solution.

Signed-off-by: Robin Rosenberg <redacted>
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
index 27cda08..278e1e4 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
@@ -162,6 +162,9 @@ public class GitHistoryPage extends HistoryPage {
 	/** Revision walker that allocated our graph's commit nodes. */
 	private SWTWalk currentWalk;
 
+	/** Last HEAD */
+	private AnyObjectId currentHeadId;
+
 	/**
 	 * Highlight flag that can be applied to commits to make them stand out.
 	 * <p>
@@ -521,8 +524,18 @@ public class GitHistoryPage extends HistoryPage {
 		if (db == null)
 			return false;
 
+		final AnyObjectId headId;
+		try {
+			headId = db.resolve("HEAD");
+		} catch (IOException e) {
+			Activator.logError("Cannot parse HEAD in: "
+					+ db.getDirectory().getAbsolutePath(), e);
+			return false;
+		}
+
 		if (currentWalk == null || currentWalk.getRepository() != db
-				|| pathChange(pathFilters, paths)) {
+				|| pathChange(pathFilters, paths)
+				|| headId != null && !headId.equals(currentHeadId)) {
 			currentWalk = new SWTWalk(db);
 			currentWalk.sort(RevSort.COMMIT_TIME_DESC, true);
 			currentWalk.sort(RevSort.BOUNDARY, true);
@@ -531,13 +544,12 @@ public class GitHistoryPage extends HistoryPage {
 			currentWalk.reset();
 		}
 
+		if (headId == null)
+			return false;
 		try {
-			final AnyObjectId headId = db.resolve("HEAD");
-			if (headId == null)
-				return false;
 			currentWalk.markStart(currentWalk.parseCommit(headId));
 		} catch (IOException e) {
-			Activator.logError("Cannot parse HEAD in: "
+			Activator.logError("Cannot read HEAD commit " + headId + " in: "
 					+ db.getDirectory().getAbsolutePath(), e);
 			return false;
 		}
-- 
1.5.5.1.178.g1f811

[PATCH] Fix the context menu connection to the workbench

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

This makes the context menu find declarative menu contributions

Signed-off-by: Robin Rosenberg <redacted>
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
index 278e1e4..b84727f 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
@@ -211,7 +211,7 @@ public class GitHistoryPage extends HistoryPage {
 		layoutSashForm(graphDetailSplit, SPLIT_GRAPH);
 		layoutSashForm(revInfoSplit, SPLIT_INFO);
 
-		popupMgr = new MenuManager(POPUP_ID);
+		popupMgr = new MenuManager(null, POPUP_ID);
 		attachCommitSelectionChanged();
 		createLocalToolbarActions();
 		createStandardActions();
-- 
1.5.5.1.178.g1f811

[PATCH] Check content if necessary when decorations want to know status

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
index 10e740e..4b6394c 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
@@ -310,7 +310,7 @@ public class GitResourceDecorator extends LabelProvider implements
 
 						decoration.addOverlay(UIIcons.OVR_SHARED);
 
-						if (entry.isModified(mapped.getWorkDir())) {
+						if (entry.isModified(mapped.getWorkDir(), true)) {
 							decoration.addPrefix(">");
 							decoration.addSuffix("(not updated)");
 							orState(rsrc.getParent(), CHANGED);
-- 
1.5.5.1.178.g1f811

[PATCH] Fix a typo.

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

Signed-off-by: Robin Rosenberg <redacted>
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/ResetAction.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/ResetAction.java
index 2187278..7ca48af 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/ResetAction.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/ResetAction.java
@@ -24,7 +24,7 @@ import org.spearce.egit.ui.internal.dialogs.BranchSelectionDialog;
 import org.spearce.jgit.lib.Repository;
 
 /**
- * An acton to reset the current branch to a specific revision.
+ * An action to reset the current branch to a specific revision.
  *
  * @see ResetOperation
  */
-- 
1.5.5.1.178.g1f811

[PATCH] Make it possible to create a new Git repository in project parent directory.

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

From: Robin Rosenberg <redacted>

In order to share repository, the Git repository must be located
outside the project. This patch extends the scope to the parent
directory.

Signed-off-by: Robin Rosenberg <redacted>
diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/op/ConnectProviderOperation.java b/org.spearce.egit.core/src/org/spearce/egit/core/op/ConnectProviderOperation.java
index b029de7..3ed3569 100644
--- a/org.spearce.egit.core/src/org/spearce/egit/core/op/ConnectProviderOperation.java
+++ b/org.spearce.egit.core/src/org/spearce/egit/core/op/ConnectProviderOperation.java
@@ -15,8 +15,10 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspaceRunnable;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.team.core.RepositoryProvider;
 import org.spearce.egit.core.Activator;
@@ -57,7 +59,7 @@ public class ConnectProviderOperation implements IWorkspaceRunnable {
 
 		m.beginTask(CoreText.ConnectProviderOperation_connecting, 100);
 		try {
-			final Collection repos = new ArrayList();
+			final Collection<RepositoryMapping> repos = new ArrayList<RepositoryMapping>();
 
 			if (newGitDir != null) {
 				try {
@@ -68,8 +70,17 @@ public class ConnectProviderOperation implements IWorkspaceRunnable {
 
 					db = new Repository(newGitDir);
 					db.create();
+					IPath gitDirParent = Path.fromOSString(
+							db.getDirectory().getAbsolutePath())
+							.removeLastSegments(1);
+					IPath cPath = project.getLocation();
+					String subset = null;
+					if (gitDirParent.isPrefixOf(cPath)) {
+						int n = cPath.matchingFirstSegments(gitDirParent);
+						subset = cPath.removeFirstSegments(n).toPortableString();
+					}
 					repos.add(new RepositoryMapping(project, db.getDirectory(),
-							null));
+							subset));
 					db.close();
 
 					// If we don't refresh the project directory right
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
index 6f2c7cf..9ccf606 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
@@ -41,6 +41,9 @@ public class UIText extends NLS {
 	public static String ExistingOrNewPage_createNew;
 
 	/** */
+	public static String ExistingOrNewPage_createInParent;
+
+	/** */
 	public static String GitCloneWizard_title;
 
 	/** */
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/ExistingOrNewPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/ExistingOrNewPage.java
index 24377d4..d0ddcb7 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/ExistingOrNewPage.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/ExistingOrNewPage.java
@@ -19,6 +19,7 @@ import org.spearce.egit.ui.UIText;
 
 class ExistingOrNewPage extends WizardPage {
 	final SharingWizard myWizard;
+	private Button createInParent;
 
 	ExistingOrNewPage(final SharingWizard w) {
 		super(ExistingOrNewPage.class.getName());
@@ -45,6 +46,7 @@ class ExistingOrNewPage extends WizardPage {
 
 			public void widgetSelected(final SelectionEvent e) {
 				myWizard.setUseExisting();
+				createInParent.setEnabled(false);
 			}
 		});
 		useExisting.setSelection(true);
@@ -59,9 +61,24 @@ class ExistingOrNewPage extends WizardPage {
 
 			public void widgetSelected(final SelectionEvent e) {
 				myWizard.setCreateNew();
+				createInParent.setEnabled(true);
 			}
 		});
 
+		createInParent = new Button(g, SWT.CHECK);
+		createInParent.setEnabled(createNew.getSelection());
+		createInParent.setText(UIText.ExistingOrNewPage_createInParent);
+		createInParent.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				widgetSelected(e);
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				myWizard.setUseParent(createInParent.getSelection());
+			}
+		});
+		createInParent.setSelection(true);
+		myWizard.setUseParent(createInParent.getSelection());
 		setControl(g);
 	}
 }
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/SharingWizard.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/SharingWizard.java
index e02b038..292baf2 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/SharingWizard.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/sharing/SharingWizard.java
@@ -36,6 +36,8 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
 
 	private File newGitDir;
 
+	private boolean useParent;
+
 	/**
 	 * Construct the Git Sharing Wizard for connecting Git project to Eclipse
 	 */
@@ -46,7 +48,14 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
 
 	public void init(final IWorkbench workbench, final IProject p) {
 		project = p;
-		newGitDir = new File(project.getLocation().toFile(), ".git");
+		calculateNewGitDir();
+	}
+
+	private void calculateNewGitDir() {
+		File pdir = project.getLocation().toFile();
+		if (useParent)
+			pdir = pdir.getParentFile();
+		newGitDir = new File(pdir, ".git");
 	}
 
 	public void addPages() {
@@ -100,4 +109,9 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
 			return false;
 		}
 	}
+
+	void setUseParent(boolean selection) {
+		useParent = selection;
+		calculateNewGitDir();
+	}
 }
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties b/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties
index f4980a0..18f8c28 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties
@@ -25,6 +25,7 @@ ExistingOrNewPage_description=Select Git Repository Location
 ExistingOrNewPage_groupHeader=Repository Location
 ExistingOrNewPage_useExisting=Search for existing Git repositories
 ExistingOrNewPage_createNew=Create a new Git repository for this project
+ExistingOrNewPage_createInParent=Create repository in project's parent directory
 
 GitCloneWizard_title=Import Git Repository
 GitCloneWizard_jobName=Cloning from {0}
-- 
1.5.5.1.178.g1f811

Re: [EGIT PATCHES] Assorted minor fixes

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:43

Robin Rosenberg [off-list ref] wrote:
 .../egit/core/op/ConnectProviderOperation.java     |   15 ++++++-
 org.spearce.egit.ui/icons/toolbar/trackd.png       |  Bin 0 -> 387 bytes
 org.spearce.egit.ui/icons/toolbar/tracke.png       |  Bin 0 -> 411 bytes
 org.spearce.egit.ui/plugin.properties              |    2 +-
 org.spearce.egit.ui/plugin.xml                     |   19 +++++----
 .../src/org/spearce/egit/ui/UIText.java            |    3 +
 .../egit/ui/internal/actions/ResetAction.java      |    2 +-
 .../spearce/egit/ui/internal/actions/Track.java    |   40 +++++++++++++++++---
 .../internal/decorators/GitResourceDecorator.java  |    2 +-
 .../egit/ui/internal/history/GitHistoryPage.java   |   24 +++++++++---
 .../ui/internal/sharing/ExistingOrNewPage.java     |   17 ++++++++
 .../egit/ui/internal/sharing/SharingWizard.java    |   16 +++++++-
 .../src/org/spearce/egit/ui/uitext.properties      |    1 +
 13 files changed, 115 insertions(+), 26 deletions(-)
How did you you send this series?  Its not format-patch output.
The diff-stat is missing from each commit, and there's no ---
to split message from diff.  I didn't bother trying to run them
through git-am yet as I assume I can just fetch from you, I'm
just saying the patches look "odd".

-- 
Shawn.

Re: [PATCH] Reset the graph plotter internals when HEAD has changed.

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:43

Robin Rosenberg [off-list ref] wrote:
When we reset HEAD to an old revision it becomes more visible than when
we add a new commit. This is an intermediate solution.
Hmm.
 
quoted hunk
@@ -521,8 +524,18 @@ public class GitHistoryPage extends HistoryPage {
 		if (db == null)
 			return false;
 
+		final AnyObjectId headId;
+		try {
+			headId = db.resolve("HEAD");
+		} catch (IOException e) {
+			Activator.logError("Cannot parse HEAD in: "
+					+ db.getDirectory().getAbsolutePath(), e);
+			return false;
+		}
+
 		if (currentWalk == null || currentWalk.getRepository() != db
-				|| pathChange(pathFilters, paths)) {
+				|| pathChange(pathFilters, paths)
+				|| headId != null && !headId.equals(currentHeadId)) {
 			currentWalk = new SWTWalk(db);
Tossing the currentWalk just because HEAD changed to a different
commit shouldn't be necessary.  Its very heavy-handed.  Clearly
there is a bug in the plotter code where the reset does not clear
state right.

For now this is a reasonable work around.  I'll try to remember
to come back and debug this case in the future as tossing the
entire SWTWalk does reduce redraw performance.

Thanks for at least coming up with the work-around.

-- 
Shawn.

Re: [EGIT PATCHES] Assorted minor fixes

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:43

tisdagen den 10 juni 2008 02.31.44 skrev Shawn O. Pearce:
How did you you send this series?  Its not format-patch output.
The diff-stat is missing from each commit, and there's no ---
to split message from diff.  I didn't bother trying to run them
through git-am yet as I assume I can just fetch from you, I'm
just saying the patches look "odd".
It was git format-patch --binary. Seems that option drops the diffstat
in that case. Yes you can just pull and get the same series. I mostly
sent it as patches for review purposes. It is much easier in e-mail.
Using gtik for reviiew isn't optimal. A nice tool for reviewing and
commenting directly from a repo would be nice.

-- robin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help