Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit-updatesite/site.xml37
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java5
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java10
-rw-r--r--org.eclipse.egit.doc/build-help.xml6
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/1.3.html121
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-branch-decorations.pngbin30187 -> 0 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-clone-submodules-wizard.pngbin46952 -> 0 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-import-wizard.pngbin25909 -> 0 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-submodules-node.pngbin56686 -> 0 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/2.0.html172
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/Bugs-Closed.html (renamed from org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/GitHub-Mylyn-Connector.html)30
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/GitHub-Mylyn-Connector-Features.html (renamed from org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/Bugs-Closed.html)32
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/Updating-This-Document.html (renamed from org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/Updating-This-Document.html)16
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-history-view-columns.pngbin0 -> 17511 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-repositories-view-ref-label.pngbin0 -> 11706 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-staging-completion.pngbin0 -> 12566 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-apply.pngbin0 -> 12842 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-checkout.pngbin0 -> 7759 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-save.pngbin0 -> 9730 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository-projects.pngbin0 -> 15381 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository.pngbin0 -> 15375 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-commit.pngbin0 -> 15640 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-tag.pngbin0 -> 9617 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-simple-configure-push.pngbin0 -> 24052 bytes
-rw-r--r--org.eclipse.egit.doc/help/EGit/User_Guide/User-Guide.html94
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/1.3.html73
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Bug-Fixes.html67
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html76
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/2.0.html62
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Bug-Fixes.html (renamed from org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Other-Notable-Changes.html)27
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Other-Features.html80
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Performance-improvements.html62
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html66
-rw-r--r--org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updating-This-Document.html (renamed from org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updating-This-Document.html)16
-rw-r--r--org.eclipse.egit.doc/help/toc.xml68
-rw-r--r--org.eclipse.egit.repository/category.xml6
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/AllTeamActionTests.java1
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java52
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/ReplaceActionsTest.java165
-rw-r--r--org.eclipse.egit.ui/plugin.properties15
-rw-r--r--org.eclipse.egit.ui/plugin.xml77
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java34
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ActionCommands.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithPreviousActionHandler.java132
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/DiscardChangesActionHandler.java25
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousAction.java24
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousActionHandler.java73
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java89
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java12
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitLabelProvider.java129
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java26
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitSelectDialog.java127
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java112
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/HistoryViewCommands.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowBlameHandler.java87
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/ReflogView.java12
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/command/CopyHandler.java42
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java43
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties13
62 files changed, 1657 insertions, 779 deletions
diff --git a/org.eclipse.egit-updatesite/site.xml b/org.eclipse.egit-updatesite/site.xml
deleted file mode 100644
index bbb37c4408..0000000000
--- a/org.eclipse.egit-updatesite/site.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description url="Eclipse Git Plugin">
- This is a pure Java implementation of the Git version control system. The native Git version is also required in this version.
- </description>
- <feature url="features/org.eclipse.egit_0.0.0.qualifier.jar" id="org.eclipse.egit" version="0.0.0" patch="true">
- <category name="Eclipse Git Team Provider"/>
- </feature>
- <feature url="features/org.eclipse.egit.sources_0.0.0.qualifier.jar" id="org.eclipse.egit.source" version="0.0.0" patch="true">
- <category name="Eclipse Git Team Provider"/>
- </feature>
- <feature url="features/org.eclipse.egit.mylyn_0.0.0.qualifier.jar" id="org.eclipse.egit.mylyn" version="0.0.0" patch="false">
- <category name="Eclipse Git Team Provider"/>
- </feature>
- <feature url="features/org.eclipse.egit.psf_0.0.0.qualifier.jar" id="org.eclipse.egit.psf" version="0.0.0" patch="false">
- <category name="Eclipse Git Team Provider"/>
- </feature>
- <feature url="features/org.eclipse.egit.import_0.0.0.qualifier.jar" id="org.eclipse.egit.import" version="0.0.0" patch="false">
- <category name="Eclipse Git Team Provider"/>
- </feature>
- <feature url="features/org.eclipse.jgit_0.0.0.qualifier.jar" id="org.eclipse.jgit" version="0.0.0" patch="true">
- <category name="JGit"/>
- </feature>
- <feature url="features/org.eclipse.jgit.sources_0.0.0.qualifier.jar" id="org.eclipse.jgit.source" version="0.0.0" patch="true">
- <category name="JGit"/>
- </feature>
- <category-def name="Eclipse Git Team Provider" label="Eclipse Git Team Provider">
- <description>
- Eclipse Git Team Provider
- </description>
- </category-def>
- <category-def name="JGit" label="JGit">
- <description>
- JGit
- </description>
- </category-def>
-</site>
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java
index 601ff14a61..d9af95c862 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java
@@ -9,6 +9,7 @@
package org.eclipse.egit.core.synchronize;
import static org.eclipse.jgit.lib.ObjectId.zeroId;
+import static org.eclipse.jgit.treewalk.filter.TreeFilter.ANY_DIFF;
import java.io.IOException;
import java.util.ArrayList;
@@ -390,9 +391,9 @@ public class GitCommitsModelCache {
tw.setRecursive(true);
if (pathFilter == null)
- tw.setFilter(TreeFilter.ANY_DIFF);
+ tw.setFilter(ANY_DIFF);
else
- tw.setFilter(AndTreeFilter.create(TreeFilter.ANY_DIFF, pathFilter));
+ tw.setFilter(AndTreeFilter.create(ANY_DIFF, pathFilter));
final int localTreeId = direction == LEFT ? 1 : 0;
final int remoteTreeId = direction == LEFT ? 0 : 1;
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java
index 45135b1fe1..5bc3169987 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java
@@ -10,7 +10,6 @@ package org.eclipse.egit.core.synchronize;
import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.RIGHT;
import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.calculateAndSetChangeKind;
-import static org.eclipse.jgit.treewalk.filter.TreeFilter.ANY_DIFF;
import java.io.IOException;
import java.util.HashMap;
@@ -24,8 +23,7 @@ import org.eclipse.jgit.lib.MutableObjectId;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.treewalk.FileTreeIterator;
import org.eclipse.jgit.treewalk.TreeWalk;
-import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
-import org.eclipse.jgit.treewalk.filter.NotIgnoredFilter;
+import org.eclipse.jgit.treewalk.filter.IndexDiffFilter;
/**
* Builds list of working tree changes.
@@ -40,9 +38,9 @@ public class WorkingTreeChangeCache {
public static Map<String, Change> build(Repository repo) {
TreeWalk tw = new TreeWalk(repo);
try {
- tw.addTree(new FileTreeIterator(repo));
- tw.addTree(new DirCacheIterator(repo.readDirCache()));
- tw.setFilter(AndTreeFilter.create(new NotIgnoredFilter(0), ANY_DIFF));
+ int fileNth = tw.addTree(new FileTreeIterator(repo));
+ int cacheNth = tw.addTree(new DirCacheIterator(repo.readDirCache()));
+ tw.setFilter(new IndexDiffFilter(cacheNth, fileNth));
tw.setRecursive(true);
Map<String, Change> result = new HashMap<String, Change>();
diff --git a/org.eclipse.egit.doc/build-help.xml b/org.eclipse.egit.doc/build-help.xml
index ebc47381c9..47e41a3724 100644
--- a/org.eclipse.egit.doc/build-help.xml
+++ b/org.eclipse.egit.doc/build-help.xml
@@ -2,7 +2,7 @@
<project name="org.eclipse.egit.doc" basedir="." default="all">
<!--
Copyright (c) 2010 Chris Aniszczyk and others.
- Copyright (c) 2010 Matthias Sohn <matthias.sohn@sap.com>
+ Copyright (c) 2010-2012 Matthias Sohn <matthias.sohn@sap.com>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@@ -38,8 +38,8 @@
generateUnifiedToc="true">
<path name="EGit/User_Guide" title="EGit User Guide" />
<path name="JGit/User_Guide" title="JGit User Guide" />
- <path name="EGit/New_and_Noteworthy/1.3" title="EGit 1.3 New and Noteworthy" />
- <path name="JGit/New_and_Noteworthy/1.3" title="JGit 1.3 New and Noteworthy" />
+ <path name="EGit/New_and_Noteworthy/2.0" title="EGit 2.0 New and Noteworthy" />
+ <path name="JGit/New_and_Noteworthy/2.0" title="JGit 2.0 New and Noteworthy" />
<path name="EGit/Git_For_Eclipse_Users" title="Git for Eclipse Users" />
<stylesheet url="book.css" />
<pageAppendum>
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/1.3.html b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/1.3.html
deleted file mode 100644
index 56348e3565..0000000000
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/1.3.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>EGit 1.3 New and Noteworthy</title>
- <link type="text/css" rel="stylesheet" href="../../../book.css"/>
- </head>
- <body>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <th style="width: 100%" align="center" colspan="3">EGit 1.3 New and Noteworthy</th>
- </tr>
- <tr>
- <td style="width: 20%" align="left"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right">
- <a href="Bugs-Closed.html" title="Bugs Closed">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Bugs Closed</td>
- </tr>
- </table><hr/>
- <h1 id="Features">Features</h1>
- <h2 id="Major">Major</h2>
- <h3 id="Branch_Status_Decoration">Branch Status Decoration</h3>
- <p>The number of commits that a local branch is ahead &amp; behind a remote branch is now displayed in the project and repository decoration.</p>
- <p>
- <img border="0" src="images/Egit-13-branch-decorations.png"/>
- </p>
- <h3 id="Redesigned_Import.2FClone_Wizard">Redesigned Import/Clone Wizard</h3>
- <ul>
- <li>Supports extension point which allows third-party repository providers to integrate into the wizard.
- <ul>
- <li>The GitHub Mylyn connector contains an implementation of this extension point
- <ul>
- <li>
- <a href="https://github.com/eclipse/egit-github/blob/c1f3a09f0a9f9e59a433041bdc50def029c24fdb/org.eclipse.mylyn.github.ui/plugin.xml#L298-308" target="egit_external">plugin.xml</a>
- </li>
- <li>
- <a href="https://github.com/eclipse/egit-github/blob/c1f3a09f0a9f9e59a433041bdc50def029c24fdb/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositorySearchWizardPage.java#L65" target="egit_external">RepositorySearchWizardPage</a>
- </li>
- </ul>
- </li>
- <li>The Mylyn Reviews Gerrit connector will provide an implementation of this extension point for Git repositories hosted on Gerrit servers shortly after EGit 1.3 has been released.</li>
- </ul>
- </li>
- </ul>
- <p>
- <img border="0" src="images/Egit-13-import-wizard.png"/>
- </p>
- <h3 id="Submodule_Support">Submodule Support</h3>
- <p>Clone wizard now supports optionally cloning all submodule repositories after the parent repository has finished cloning.</p>
- <p>
- <img border="0" src="images/Egit-13-clone-submodules-wizard.png"/>
- </p>
- <p>Submodules are now displayed in
- <i>Git Repositories</i> view
- </p>
- <p>
- <img border="0" src="images/Egit-13-submodules-node.png"/>
- </p>
- <h3 id="Branch_Project_Tracking">Branch Project Tracking</h3>
- <p>Projects are now closed when checking out a branch where that project does not exist and reopened when the previous branch is checked back out. This option can be disabled from the
- <b>Team &gt; Git &gt; Projects</b> preference page.
- </p>
- <h2 id="Minor">Minor</h2>
- <ul>
- <li>
- <i>Team &gt; Create Patch...</i> now supported on resource selections and patches can now be created from file changes in the working directory
- </li>
- <li>Lightweight tags are now displayed in the history view and commit editor</li>
- <li>Previously entered messages are now available in the commit dialog content assist window</li>
- <li>Branches can now be renamed using the
- <i>F2</i> key from the
- <b>Git Repositories</b> view
- </li>
- <li>The maximum length to display for tags and branches in the
- <b>History</b> view is now configurable from the
- <i>Team &gt; Git &gt; History</i> preference page
- </li>
- <li>Different diff header formats are now supported from the
- <i>Create Patch...</i> wizard
- </li>
- <li>Stashed commits are now displayed in the
- <b>Git Repositories</b> view
- </li>
- <li>
- <i>Compare with Working Directory</i> is now a menu option on files displayed in the
- <b>History</b> view and commit viewer
- </li>
- <li>Working sets are now decorated with Git status</li>
- <li>Selecting untracked files by default in the commit dialog can now configured from the
- <i>Team &gt; Git &gt; Commit Dialog</i> preference page
- </li>
- <li>Date format used in the
- <b>History</b> view now uses the JVM date formatter
- </li>
- </ul><hr/>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <td style="width: 20%" align="left"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right">
- <a href="Bugs-Closed.html" title="Bugs Closed">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Bugs Closed</td>
- </tr>
- </table>
- </body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-branch-decorations.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-branch-decorations.png
deleted file mode 100644
index 2c0ff49ea3..0000000000
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-branch-decorations.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-clone-submodules-wizard.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-clone-submodules-wizard.png
deleted file mode 100644
index b25127bd62..0000000000
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-clone-submodules-wizard.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-import-wizard.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-import-wizard.png
deleted file mode 100644
index d51aec0f05..0000000000
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-import-wizard.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-submodules-node.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-submodules-node.png
deleted file mode 100644
index 833a4bb8bc..0000000000
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/images/Egit-13-submodules-node.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/2.0.html b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/2.0.html
new file mode 100644
index 0000000000..b2ece10195
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/2.0.html
@@ -0,0 +1,172 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>EGit 2.0 New and Noteworthy</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">EGit 2.0 New and Noteworthy</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="GitHub-Mylyn-Connector-Features.html" title="GitHub Mylyn Connector Features">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">GitHub Mylyn Connector Features</td>
+ </tr>
+ </table><hr/>
+ <h1 id="EGit_Features">EGit Features</h1>
+ <h2 id="Stash_Support">Stash Support</h2>
+ <ul>
+ <li>Support to create stashed commits</li>
+ </ul>
+ <p>
+ <img border="0" src="images/EGit-20-stash-save.png"/>
+ </p>
+ <ul>
+ <li>Support to apply stashed commits to the index and working tree</li>
+ <li>Support for dropping stashed commits</li>
+ </ul>
+ <p>
+ <img border="0" src="images/EGit-20-stash-apply.png"/>
+ </p>
+ <ul>
+ <li>New stash option in branch result dialog. This allows to quickly stash any conflicting changes that are preventing a branch from being checked out.</li>
+ </ul>
+ <p>
+ <img border="0" src="images/EGit-20-stash-checkout.png"/>
+ </p>
+ <h2 id="Allow_push_of_single_Refs.2FCommits_from_Repositories_.26_History_Views">Allow push of single Refs/Commits from Repositories &amp; History Views</h2>
+ <p>This adds a new SimplePushWizard which allows selecting a target
+ remote and ref name. It then pushes out the selected Ref/Commit to the
+ selected target ref.</p>
+ <p>
+ <img border="0" src="images/Egit-2.0-push-commit.png"/>
+ </p>
+ <p>
+ <img border="0" src="images/Egit-2.0-push-tag.png"/>
+ </p>
+ <h2 id="Support_for_.22workspace_patches.22">Support for "workspace patches"</h2>
+ <p>Workspace-aware patches include comments to tell the Apply Patch wizard
+ about the target projects for individual diffs. They contain enough
+ information to allow the wizard to decide which resources need to be
+ patched.</p>
+ <p>Also allow to save patches in the workspace.</p>
+ <h2 id="Preemptively_close_missing_projects_when_switching_branches">Preemptively close missing projects when switching branches</h2>
+ <p>When checking out another branch look for projects that differ between the current branch, target branch, and working directory and
+ close any projects not available on target branch before checkout begins.</p>
+ <p>Reopened projects are now also refreshed after being opened
+ in order to keep the Eclipse resource model in sync with the
+ working directory changes.</p>
+ <h2 id="Support_for_Eclipse-SourceReferences_manifest_headers">Support for Eclipse-SourceReferences manifest headers</h2>
+ <p>This adds extensions required to clone/import a plug-in's git repository using SCM URL from its
+ MANIFEST.MF. To give it a try, open Plug-ins view, select a plug-in and click "Import As &gt; Project from a Repository...". Then follow
+ instructions in the wizard. Importing with a tag is not supported yet, see
+ <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=367712" target="egit_external">bug 367712</a>.
+ </p>
+ <p>
+ <img border="0" src="images/Egit-2.0-import-bundle-as-repository.png"/>
+ </p>
+ <p>
+ <b>Note:</b> This feature can be installed on Eclipse 4.2 and higher since it requires at least Team API 3.6.100.
+ </p>
+ <p>
+ <img border="0" src="images/Egit-2.0-import-bundle-as-repository-projects.png"/>
+ </p>
+ <h2 id="Other_Improvements">Other Improvements</h2>
+ <h3 id="History_View_Improvements">History View Improvements</h3>
+ <ul>
+ <li>Table layout was improved</li>
+ <li>New option to allow hiding email address of committer and author</li>
+ <li>New "committed date" column</li>
+ </ul>
+ <p>
+ <img border="0" src="images/EGit-20-history-view-columns.png"/>
+ </p>
+ <ul>
+ <li>Incremental loading of history improves performance and significantly reduces memory footprint. Incremental loading is disabled if the find toolbar is enabled.</li>
+ <li>Add command to rename branches</li>
+ <li>New option to suppress displaying of additional Refs like FETCH_HEAD, ORIG_HEAD</li>
+ <li>Show commit in history view when annotation is selected. "Team &gt; Annotations" now shows/selects the commit in the history view when a revision is selected.</li>
+ <li>New command "Show Annotations" in context menu of the history view table when the input is a single file. Running the action will open the editor with the file blamed starting at the selected commit. The same command is added to the context menu of the file list in the History View's "Revision Details" pane.</li>
+ <li>When creating a new branch the first found remote referring to the selected commit is selected as the default source of the new branch.</li>
+ </ul>
+ <h3 id="Staging_View_Improvements">Staging View Improvements</h3>
+ <ul>
+ <li>Supports content assist for file names and commit messages (using Ctrl+Space):</li>
+ </ul>
+ <p>
+ <img border="0" src="images/EGit-20-staging-completion.png"/>
+ </p>
+ <ul>
+ <li>Add command "Replace with HEAD"</li>
+ <li>Support for discarding changes of non-workspace files</li>
+ <li>Staging View now uses the global IndexDiffCache, this reduces EGit's memory footprint and ensures consistency with resource decorations</li>
+ <li>Option to show whitespace characters in Staging View and Commit Dialog</li>
+ <li>Warns when amending a commit that is already pushed (when the commit is on a remote tracking branch)</li>
+ <li>New "Copy" command to copy the currently selected commit id into the clipboard</li>
+ </ul>
+ <h3 id="Repositories_View_Improvements">Repositories View Improvements</h3>
+ <ul>
+ <li>For references, branches and tags show the abbreviated SHA-1 followed by the short message of the commit that SHA-1 points to:</li>
+ </ul>
+ <p>
+ <img border="0" src="images/EGit-20-repositories-view-ref-label.png"/>
+ </p>
+ <ul>
+ <li>On branch nodes allow to show/edit branch configuration</li>
+ <li>Git command group actions now also work when selecting one or several repositories in the Repositories View</li>
+ <li>Simplified configure fetch and configure push dialogs</li>
+ </ul>
+ <p>
+ <img border="0" src="images/Egit-2.0-simple-configure-push.png"/>
+ </p>
+ <ul>
+ <li>Allow to fetch/push on remote nodes</li>
+ </ul>
+ <h3 id="Configuration">Configuration</h3>
+ <ul>
+ <li>Enable using variables to set the default clone destination in the preferences. With this, it's now possible to configure it to always clone into workspace, using <span style="font-family:monospace;">${workspace_loc</span>}</li>
+ <li>Add configuration option for <span style="font-family:monospace;">core.streamFileThreshold</span> in preferences</li>
+ <li>Configuration editor in preferences now supports editing configuration values directly in tree </li>
+ </ul>
+ <h3 id="Team_Menu_.26_Git_Actions_Toolbar">Team Menu &amp; Git Actions Toolbar</h3>
+ <ul>
+ <li>New command "Remove from Index" to enable unstaging staged changes from the team menu</li>
+ <li>New command "Replace with &gt; Previous Revision" to replace the selected resources with the version preceding HEAD</li>
+ <li>Rename support for "Compare With &gt; Previous Revision"</li>
+ <li>Add merge button to Git Actions Toolbar</li>
+ </ul>
+ <h3 id="Miscellaneous">Miscellaneous</h3>
+ <ul>
+ <li>Add Commit... and Reset... buttons to checkout conflict dialog</li>
+ <li>Add "Revert" action to Commit Editor</li>
+ </ul><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="GitHub-Mylyn-Connector-Features.html" title="GitHub Mylyn Connector Features">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">GitHub Mylyn Connector Features</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/GitHub-Mylyn-Connector.html b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/Bugs-Closed.html
index 690751ab9a..6f9ab62adb 100644
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/GitHub-Mylyn-Connector.html
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/Bugs-Closed.html
@@ -2,17 +2,17 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>EGit 1.3 New and Noteworthy - GitHub Mylyn Connector</title>
+ <title>EGit 2.0 New and Noteworthy - Bugs Closed</title>
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
</head>
<body>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
- <th style="width: 100%" align="center" colspan="3">GitHub Mylyn Connector</th>
+ <th style="width: 100%" align="center" colspan="3">Bugs Closed</th>
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="Bugs-Closed.html" title="Bugs Closed">
+ <a href="GitHub-Mylyn-Connector-Features.html" title="GitHub Mylyn Connector Features">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -24,31 +24,25 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Bugs Closed</td>
+ <td style="width: 20%" align="left" valign="top">GitHub Mylyn Connector Features</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
</table><hr/>
- <h1 id="GitHub_Mylyn_Connector">GitHub Mylyn Connector</h1>
- <ul>
- <li>GitHub Java API now supports the
- <a href="http://developer.github.com/v3/events/" target="egit_external">v3 events API</a>
- </li>
- <li>
- <a href="http://hc.apache.org/" target="egit_external">Apache HttpComponents</a> is no longer a dependency of the GitHub Java API
- </li>
- <li>GitHub is now an option in the EGit clone &amp; import wizard</li>
- </ul><hr/>
+ <h1 id="Bugs_Closed">Bugs Closed</h1>
+ <p>
+ <a href="https://bugs.eclipse.org/bugs/buglist.cgi?list_id=1764615;bug_severity=critical;bug_severity=major;bug_severity=normal;bug_severity=minor;bug_severity=trivial;bug_severity=enhancement;resolution=FIXED;resolution=DUPLICATE;classification=Technology;chfieldto=2012-06-06;query_format=advanced;chfield=bug_status;chfieldfrom=2012-02-25;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=EGit" target="egit_external">73 bugs and 17 enhancement requests</a> were closed.
+ </p><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="Bugs-Closed.html" title="Bugs Closed">
+ <a href="GitHub-Mylyn-Connector-Features.html" title="GitHub Mylyn Connector Features">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
- <a href="1.3.html" title="EGit 1.3 New and Noteworthy">
- <img alt="EGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ <a href="2.0.html" title="EGit 2.0 New and Noteworthy">
+ <img alt="EGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right">
@@ -58,7 +52,7 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Bugs Closed</td>
+ <td style="width: 20%" align="left" valign="top">GitHub Mylyn Connector Features</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/Bugs-Closed.html b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/GitHub-Mylyn-Connector-Features.html
index 646fe741f5..68aa404292 100644
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/Bugs-Closed.html
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/GitHub-Mylyn-Connector-Features.html
@@ -2,59 +2,59 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>EGit 1.3 New and Noteworthy - Bugs Closed</title>
+ <title>EGit 2.0 New and Noteworthy - GitHub Mylyn Connector Features</title>
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
</head>
<body>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
- <th style="width: 100%" align="center" colspan="3">Bugs Closed</th>
+ <th style="width: 100%" align="center" colspan="3">GitHub Mylyn Connector Features</th>
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="1.3.html" title="EGit 1.3 New and Noteworthy">
+ <a href="2.0.html" title="EGit 2.0 New and Noteworthy">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right">
- <a href="GitHub-Mylyn-Connector.html" title="GitHub Mylyn Connector">
+ <a href="Bugs-Closed.html" title="Bugs Closed">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">EGit 1.3 New and Noteworthy</td>
+ <td style="width: 20%" align="left" valign="top">EGit 2.0 New and Noteworthy</td>
<td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">GitHub Mylyn Connector</td>
+ <td style="width: 20%" align="right" valign="top">Bugs Closed</td>
</tr>
</table><hr/>
- <h1 id="Bugs_Closed">Bugs Closed</h1>
- <p>
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?chfieldto=2012-02-24;chfield=bug_status;query_format=advanced;order=Importance;chfieldfrom=2011-12-22;bug_status=RESOLVED;bug_status=CLOSED;resolution=FIXED;resolution=DUPLICATE;product=EGit;classification=Technology" target="egit_external">27 bugs and 4 enhancement requests</a> were closed.
- </p><hr/>
+ <h1 id="GitHub_Mylyn_Connector_Features">GitHub Mylyn Connector Features</h1>
+ <ul>
+ <li>Add support for paging over starred gists</li>
+ </ul><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="1.3.html" title="EGit 1.3 New and Noteworthy">
+ <a href="2.0.html" title="EGit 2.0 New and Noteworthy">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
- <a href="1.3.html" title="EGit 1.3 New and Noteworthy">
- <img alt="EGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ <a href="2.0.html" title="EGit 2.0 New and Noteworthy">
+ <img alt="EGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right">
- <a href="GitHub-Mylyn-Connector.html" title="GitHub Mylyn Connector">
+ <a href="Bugs-Closed.html" title="Bugs Closed">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">EGit 1.3 New and Noteworthy</td>
+ <td style="width: 20%" align="left" valign="top">EGit 2.0 New and Noteworthy</td>
<td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">GitHub Mylyn Connector</td>
+ <td style="width: 20%" align="right" valign="top">Bugs Closed</td>
</tr>
</table>
</body>
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/Updating-This-Document.html b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/Updating-This-Document.html
index d07394bc48..e68f3bdc9a 100644
--- a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/1.3/Updating-This-Document.html
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/Updating-This-Document.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>EGit 1.3 New and Noteworthy - Updating This Document</title>
+ <title>EGit 2.0 New and Noteworthy - Updating This Document</title>
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
</head>
<body>
@@ -12,7 +12,7 @@
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="GitHub-Mylyn-Connector.html" title="GitHub Mylyn Connector">
+ <a href="Bugs-Closed.html" title="Bugs Closed">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -20,7 +20,7 @@
<td style="width: 20%" align="right"></td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">GitHub Mylyn Connector</td>
+ <td style="width: 20%" align="left" valign="top">Bugs Closed</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top"></td>
</tr>
@@ -29,24 +29,24 @@
<p> This document is maintained in a collaborative wiki. If you wish to
update or modify this document please visit
- <a href="http://wiki.eclipse.org/EGit/New_and_Noteworthy/1.3" target="egit_external">http://wiki.eclipse.org/EGit/New_and_Noteworthy/1.3</a>
+ <a href="http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.0" target="egit_external">http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.0</a>
</p><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="GitHub-Mylyn-Connector.html" title="GitHub Mylyn Connector">
+ <a href="Bugs-Closed.html" title="Bugs Closed">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
- <a href="1.3.html" title="EGit 1.3 New and Noteworthy">
- <img alt="EGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ <a href="2.0.html" title="EGit 2.0 New and Noteworthy">
+ <img alt="EGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right"></td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">GitHub Mylyn Connector</td>
+ <td style="width: 20%" align="left" valign="top">Bugs Closed</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top"></td>
</tr>
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-history-view-columns.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-history-view-columns.png
new file mode 100644
index 0000000000..271e9cb067
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-history-view-columns.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-repositories-view-ref-label.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-repositories-view-ref-label.png
new file mode 100644
index 0000000000..2dcbb47738
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-repositories-view-ref-label.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-staging-completion.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-staging-completion.png
new file mode 100644
index 0000000000..d003773780
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-staging-completion.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-apply.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-apply.png
new file mode 100644
index 0000000000..b342f0670f
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-apply.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-checkout.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-checkout.png
new file mode 100644
index 0000000000..01ce1e6c8c
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-checkout.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-save.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-save.png
new file mode 100644
index 0000000000..646d381640
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/EGit-20-stash-save.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository-projects.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository-projects.png
new file mode 100644
index 0000000000..aa34b169bc
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository-projects.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository.png
new file mode 100644
index 0000000000..d652c4f6f5
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-import-bundle-as-repository.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-commit.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-commit.png
new file mode 100644
index 0000000000..5ea7fe863b
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-commit.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-tag.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-tag.png
new file mode 100644
index 0000000000..bd0b890630
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-push-tag.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-simple-configure-push.png b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-simple-configure-push.png
new file mode 100644
index 0000000000..ce555603c0
--- /dev/null
+++ b/org.eclipse.egit.doc/help/EGit/New_and_Noteworthy/2.0/images/Egit-2.0-simple-configure-push.png
Binary files differ
diff --git a/org.eclipse.egit.doc/help/EGit/User_Guide/User-Guide.html b/org.eclipse.egit.doc/help/EGit/User_Guide/User-Guide.html
index d8f9dd0659..a5ab3bb6f1 100644
--- a/org.eclipse.egit.doc/help/EGit/User_Guide/User-Guide.html
+++ b/org.eclipse.egit.doc/help/EGit/User_Guide/User-Guide.html
@@ -32,6 +32,9 @@
<a href="http://book.git-scm.com" target="egit_external">Git Community Book</a> or
<a href="http://progit.org/book/" target="egit_external">Git Pro</a>.
</p>
+ <p>If there you are coming from CVS, you can find common CVS workflows for Git
+ <a href="http://wiki.eclipse.org/Platform-releng/Git_Workflows" title="Platform-releng/Git Workflows" target="egit_external">Platform-releng/Git Workflows</a>.
+ </p>
<h2 id="Basic_Tutorial:_Adding_a_project_to_version_control">Basic Tutorial: Adding a project to version control</h2>
<h3 id="Configuration">Configuration</h3>
<h4 id="Identifying_yourself">Identifying yourself</h4>
@@ -84,7 +87,7 @@
</p>
<h3 id="Create_Repository">Create Repository</h3>
<ul>
- <li>Create a new Java project <code>HelloWorld</code></li>
+ <li>Create a new Java project <code>HelloWorld</code>.(In this case,the project was builded outside of your Eclipse Workspace.)</li>
</ul>
<p>
<img border="0" src="images/Egit-0.9-getstarted-project.png"/>
@@ -337,76 +340,41 @@
<p>
<br/>
</p>
- <h2 id="EGit_Tutorial_.28EclipseCon_March_2011.29">EGit Tutorial (EclipseCon March 2011)</h2>
- <p>You may want to learn how to work with EGit and Gerrit Code Review by going through the
- <a href="http://www.eclipsecon.org/2011/sessions/?page=sessions&amp;id=2035" target="egit_external">EGit tutorial we held at EclipseCon America 2011</a>.
- </p>
- <h3 id="Installation_and_Configuration">Installation and Configuration</h3>
- <p>This tutorial was developed using EGit 0.11 so you should use at least this version. Newer versions may provide an easier way to do certain steps, look at the
- <a href="http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F" target="egit_external">EGit "New and Noteworthy" documentation</a>.
+ <h2 id="EclipseCon_2012_Git_Tutorial">EclipseCon 2012 Git Tutorial</h2>
+ <p>Find all exercises and the slides
+ <a href="https://docs.google.com/open?id=0B4F_gjXVrHZVRXkydE0xVFBRRkc1WUpEcXdwQ2I1dw" target="egit_external">here</a>.
</p>
- <p>Best you go through the exercises using the Gerrit-in-a-zip you may download from TODO.
- See exercise 9 to learn how to use that.</p>
- <p>The egit-training repository is also available on
- <a href="http://egit.eclipse.org/" target="egit_external">http://egit.eclipse.org/</a>.
- You may clone it from there using
+ <p>Follow the
+ <a href="https://docs.google.com/document/d/1UCbNCvljiInc6-vwBsHHzOQ1ItC10f1bFAOi8T30DJ8/edit" target="egit_external">exercise #1</a> to prepare for the Git Tutorial.
+ Find download links to the training packages below.
</p>
- <pre>git://egit.eclipse.org/egit-training.git
-</pre>
- <p>More details are given in</p>
+ <h3 id="EGit_Training_Packages">EGit Training Packages</h3>
+ <p>Pre-installed EGit training packages including</p>
<ul>
- <li>Exercise 1:
- <a href="https://docs.google.com/document/d/1Uxq59vCcWqK-hPb5CHQcR97AmJehj6Rn0ScTnih2tyU/edit?hl=en_US" target="egit_external">Installation and configuration</a>
- </li>
- <li>Exercise 9:
- <a href="https://docs.google.com/document/d/1JDdge66iEN5BvBMSETtO3u5eUHmsuXLCoEc25HQqOcE/edit?hl=en_US" target="egit_external">Starting demo Gerrit server</a>
- </li>
- </ul>
- <h3 id="Exercises">Exercises</h3>
- <ul>
- <li>Exercise 2:
- <a href="https://docs.google.com/document/d/1v65gQ2FdzZrqEfOCoCa6iUOLr9cxu2BRYo5EoKDARr0/edit?hl=en_US" target="egit_external">Develop a feature</a>
- </li>
- <li>Exercise 3:
- <a href="https://docs.google.com/document/d/1B6AD3SPMj6OTjibAQut07BlkYs4aVdPkREQBSYhL1Go/edit?hl=en_US" target="egit_external">Review a change from another developer</a>
- </li>
- <li>Exercise 4:
- <a href="https://docs.google.com/document/d/1FrsMGskez96vYFJaYyqKBYjklxj5dpBvqtpEpqKfsTo/edit?hl=en_US" target="egit_external">Rework your change</a>
- </li>
- <li>Exercise 5:
- <a href="https://docs.google.com/document/d/1us6K8cEvtiPsEqqEZoN3MqLJV2dNrHCwURzTeR413T0/edit?hl=en_US" target="egit_external">Review re-worked change</a>
- </li>
- <li>Exercise 6:
- <a href="https://docs.google.com/document/d/1ESvTMzNy4b6-5doARKt-vEaBOE8oUAQGSDccKyH1eZo/edit?hl=en_US" target="egit_external">Register projects to watch</a>
- </li>
- <li>Exercise 7:
- <a href="https://docs.google.com/document/d/1hJrlX_S3Z2qYZudNg8CFnuUnZMhFIsS2RI-_uib2gzk/edit?hl=en_US" target="egit_external">Rebase change to resolve conflicts</a>
- </li>
- <li>Exercise 8:
- <a href="https://docs.google.com/document/d/18f_IRY_ztLCsipZKqjdwaofjbQC-_wP-WqTD5dqNvlE/edit?hl=en_US" target="egit_external">Working with patch series</a>
- </li>
+ <li>Eclipse SDK 3.7.2</li>
+ <li>JGit, EGit 2.0-SNAPSHOT (nightly build)</li>
+ <li>Github connector 2.0-SNAPSHOT (nightly build 2012-03-22)</li>
+ <li>Mylyn Reviews Gerrit Connector 0.9-SNAPSHOT (weekly build 2012-03-22)</li>
+ <li>Mylyn Builds 0.9-SNAPSHOT (weekly build)</li>
</ul>
<p>
- <br/>
- </p>
- <h2 id="EGit_Tutorial_.28EclipseCon_Europe_Nov_2011.29">EGit Tutorial (EclipseCon Europe Nov 2011)</h2>
- <p>We held this tutorial
- <a href="http://www.eclipsecon.org/europe2011/sessions/eclipse-hackers-guide-git-universe" target="egit_external">"Eclipse Hacker's Guide to the Git Universe"</a> at EclipseCon Europe on Nov 2, 2011.
+ <b>Linux</b>
</p>
- <p>This tutorial was developed using EGit 1.2-SNAPSHOT so you should use at least this version.
- Newer versions may provide an easier way to do certain steps, look at the
- <a href="http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F" target="egit_external">EGit "New and Noteworthy" documentation</a>.
- </p>
- <p>The egit-training repository is also available on
- <a href="http://egit.eclipse.org/" target="egit_external">http://egit.eclipse.org/</a>.
- You may clone it from there using
+ <pre>[http://download.eclipse.org/egit/training/eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz]
+[http://download.eclipse.org/egit/training/eclipse-SDK-3.7.2-linux-gtk.tar.gz eclipse-SDK-3.7.2-linux-gtk.tar.gz]
+</pre>
+ <p>
+ <b>Mac</b>
</p>
- <pre>git://egit.eclipse.org/egit-training.git
+ <pre>[http://download.eclipse.org/egit/training/eclipse-SDK-3.7.2-macosx-cocoa-x86_64.tar.gz eclipse-SDK-3.7.2-macosx-cocoa-x86_64.tar.gz ]
+[http://download.eclipse.org/egit/training/eclipse-SDK-3.7.2-macosx-cocoa.tar.gz eclipse-SDK-3.7.2-macosx-cocoa.tar.gz]
</pre>
- <h3 id="Exercises_2">Exercises</h3>
- <p>Find slides and exercises
- <a href="https://docs.google.com/#folders/0B4F_gjXVrHZVYmYzN2EwMmQtMmQyNC00NmI4LWFmODQtYjk4ZGVlMTI0NGJl" target="egit_external">here</a>
- </p><hr/>
+ <p>
+ <b>Windows</b>
+ </p>
+ <pre>[http://download.eclipse.org/egit/training/eclipse-SDK-3.7.2-win32-x86_64.zip eclipse-SDK-3.7.2-win32-x86_64.zip]
+[http://download.eclipse.org/egit/training/eclipse-SDK-3.7.2-win32.zip eclipse-SDK-3.7.2-win32.zip]
+</pre><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left"></td>
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/1.3.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/1.3.html
deleted file mode 100644
index 4b85216a74..0000000000
--- a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/1.3.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>JGit 1.3 New and Noteworthy</title>
- <link type="text/css" rel="stylesheet" href="../../../book.css"/>
- </head>
- <body>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <th style="width: 100%" align="center" colspan="3">JGit 1.3 New and Noteworthy</th>
- </tr>
- <tr>
- <td style="width: 20%" align="left"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right">
- <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Updated Porcelain Commands</td>
- </tr>
- </table><hr/>
- <h1 id="New_Porcelain_Commands">New Porcelain Commands</h1>
- <h2 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3EStashListCommand.3C.2Fspan.3E"><span style="font-family:monospace;">StashListCommand</span></h2>
- <ul>
- <li>Provides a collection of all the currently stashed commits in a repository</li>
- </ul>
- <h2 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmodule_Commands.3C.2Fspan.3E"><span style="font-family:monospace;">Submodule Commands</span></h2>
- <h3 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleAddCommand.3C.2Fspan.3E"><span style="font-family:monospace;">SubmoduleAddCommand</span></h3>
- <ul>
- <li>Registers a new submodule repository at a path in a parent repository</li>
- </ul>
- <h3 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleInitCommand.3C.2Fspan.3E"><span style="font-family:monospace;">SubmoduleInitCommand</span></h3>
- <ul>
- <li>Initializes the repository's config with entries from the
- <i>.gitmodules</i> file
- </li>
- </ul>
- <h3 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleStatusCommand.3C.2Fspan.3E"><span style="font-family:monospace;">SubmoduleStatusCommand</span></h3>
- <ul>
- <li>Provides the status of all the registered submodules in a repository</li>
- </ul>
- <h3 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleSyncCommand.3C.2Fspan.3E"><span style="font-family:monospace;">SubmoduleSyncCommand</span></h3>
- <ul>
- <li>Updates the remote URL used by a submodule with the value currently in the ''.gitmodules' file</li>
- </ul>
- <h3 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleUpdateCommand.3C.2Fspan.3E"><span style="font-family:monospace;">SubmoduleUpdateCommand</span></h3>
- <ul>
- <li>Clones missing submodules and merge, rebases, or checks out the commit SHA-1 of the submodule in the index</li>
- </ul><hr/>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <td style="width: 20%" align="left"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right">
- <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top"></td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Updated Porcelain Commands</td>
- </tr>
- </table>
- </body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Bug-Fixes.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Bug-Fixes.html
deleted file mode 100644
index ea1563f64b..0000000000
--- a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Bug-Fixes.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>JGit 1.3 New and Noteworthy - Bug Fixes</title>
- <link type="text/css" rel="stylesheet" href="../../../book.css"/>
- </head>
- <body>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <th style="width: 100%" align="center" colspan="3">Bug Fixes</th>
- </tr>
- <tr>
- <td style="width: 20%" align="left">
- <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
- <img alt="Previous" border="0" src="../../../images/prev.gif"/>
- </a>
- </td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right">
- <a href="Other-Notable-Changes.html" title="Other Notable Changes">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top">Updated Porcelain Commands</td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Other Notable Changes</td>
- </tr>
- </table><hr/>
- <h1 id="Bug_Fixes">Bug Fixes</h1>
- <p>
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?chfieldto=2012-02-24;chfield=bug_status;query_format=advanced;order=Importance;chfieldfrom=2011-12-22;bug_status=RESOLVED;bug_status=CLOSED;resolution=FIXED;resolution=DUPLICATE;product=JGit;classification=Technology;list_id=385119" target="egit_external">7 Bugs and 4 enhancement requests</a> were closed
- </p>
- <h2 id="Windows">Windows</h2>
- <ul>
- <li>
- <i>core.filemode</i> config option is now checked when determining file mode to use for checked in files. This fixes a bug where files committed on Windows would lose the executable bit if it was previously set.
- </li>
- </ul><hr/>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <td style="width: 20%" align="left">
- <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
- <img alt="Previous" border="0" src="../../../images/prev.gif"/>
- </a>
- </td>
- <td style="width: 60%" align="center">
- <a href="1.3.html" title="JGit 1.3 New and Noteworthy">
- <img alt="JGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
- </a>
- </td>
- <td style="width: 20%" align="right">
- <a href="Other-Notable-Changes.html" title="Other Notable Changes">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top">Updated Porcelain Commands</td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Other Notable Changes</td>
- </tr>
- </table>
- </body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html
deleted file mode 100644
index 09ba102524..0000000000
--- a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>JGit 1.3 New and Noteworthy - Updated Porcelain Commands</title>
- <link type="text/css" rel="stylesheet" href="../../../book.css"/>
- </head>
- <body>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <th style="width: 100%" align="center" colspan="3">Updated Porcelain Commands</th>
- </tr>
- <tr>
- <td style="width: 20%" align="left">
- <a href="1.3.html" title="JGit 1.3 New and Noteworthy">
- <img alt="Previous" border="0" src="../../../images/prev.gif"/>
- </a>
- </td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right">
- <a href="Bug-Fixes.html" title="Bug Fixes">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top">JGit 1.3 New and Noteworthy</td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Bug Fixes</td>
- </tr>
- </table><hr/>
- <h1 id="Updated_Porcelain_Commands">Updated Porcelain Commands</h1>
- <h2 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ECloneCommand.3C.2Fspan.3E"><span style="font-family:monospace;">CloneCommand</span></h2>
- <ul>
- <li>Supports cloning submodules after the parent repository clone finishes</li>
- </ul>
- <h2 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3EDiffCommand.3C.2Fspan.3E"><span style="font-family:monospace;">DiffCommand</span></h2>
- <ul>
- <li>Supports setting a custom source and destination prefix (defaults to
- <i>a/</i> and
- <i>b/</i>)
- </li>
- <li>Supports setting the number of context lines to display (defaults to 3)</li>
- <li>Supports setting a <span style="font-family:monospace;">ProgressMonitor</span> that will be provided updates on the diff formatting progress</li>
- </ul>
- <h2 id=".3Cspan_style.3D.22font-family:monospace.3B.22.3ELogCommand.3C.2Fspan.3E"><span style="font-family:monospace;">LogCommand</span></h2>
- <ul>
- <li>Supports setting the maximum number of commits to display</li>
- <li>Supports setting the number of commits to skip over before returning any</li>
- </ul><hr/>
- <table class="navigation" style="width: 100%;" border="0" summary="navigation">
- <tr>
- <td style="width: 20%" align="left">
- <a href="1.3.html" title="JGit 1.3 New and Noteworthy">
- <img alt="Previous" border="0" src="../../../images/prev.gif"/>
- </a>
- </td>
- <td style="width: 60%" align="center">
- <a href="1.3.html" title="JGit 1.3 New and Noteworthy">
- <img alt="JGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
- </a>
- </td>
- <td style="width: 20%" align="right">
- <a href="Bug-Fixes.html" title="Bug Fixes">
- <img alt="Next" border="0" src="../../../images/next.gif"/>
- </a>
- </td>
- </tr>
- <tr>
- <td style="width: 20%" align="left" valign="top">JGit 1.3 New and Noteworthy</td>
- <td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Bug Fixes</td>
- </tr>
- </table>
- </body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/2.0.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/2.0.html
new file mode 100644
index 0000000000..2204924cdc
--- /dev/null
+++ b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/2.0.html
@@ -0,0 +1,62 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>JGit 2.0 New and Noteworthy</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">JGit 2.0 New and Noteworthy</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Updated Porcelain Commands</td>
+ </tr>
+ </table><hr/>
+ <h1 id="New_Porcelain_Commands">New Porcelain Commands</h1>
+ <h2 id="StashApplyCommand"><span style="font-family:monospace;">StashApplyCommand</span></h2>
+ <ul>
+ <li>Provides applying the changes in a stashed commit to the local working directory and index</li>
+ </ul>
+ <h2 id="StashCreateCommand"><span style="font-family:monospace;">StashCreateCommand</span></h2>
+ <ul>
+ <li>Provides support to stash the index and working directory changes in a commit stored in refs/stash</li>
+ </ul>
+ <h2 id="StashDropCommand"><span style="font-family:monospace;">StashDropCommand</span></h2>
+ <ul>
+ <li>Provides support for dropping a stashed commit</li>
+ </ul>
+ <h2 id="ApplyCommand"><span style="font-family:monospace;">ApplyCommand</span></h2>
+ <ul>
+ <li>Provides applying patches on a git index file and a working tree.</li>
+ </ul><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Updated Porcelain Commands</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Other-Notable-Changes.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Bug-Fixes.html
index 5c558485da..1e058d076f 100644
--- a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Other-Notable-Changes.html
+++ b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Bug-Fixes.html
@@ -2,17 +2,17 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>JGit 1.3 New and Noteworthy - Other Notable Changes</title>
+ <title>JGit 2.0 New and Noteworthy - Bug Fixes</title>
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
</head>
<body>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
- <th style="width: 100%" align="center" colspan="3">Other Notable Changes</th>
+ <th style="width: 100%" align="center" colspan="3">Bug Fixes</th>
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="Bug-Fixes.html" title="Bug Fixes">
+ <a href="Performance-improvements.html" title="Performance improvements">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -24,28 +24,25 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Bug Fixes</td>
+ <td style="width: 20%" align="left" valign="top">Performance improvements</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
</table><hr/>
- <h1 id="Other_Notable_Changes">Other Notable Changes</h1>
- <ul>
- <li>Revision strings that are refs following by an
- <i>@</i> followed by an ordinal specification such as
- <i>stash@{0}</i> can now be resolved to commits when calling <span style="font-family:monospace;">Repository.resolve</span>
- </li>
- </ul><hr/>
+ <h1 id="Bug_Fixes">Bug Fixes</h1>
+ <p>
+ <a href="https://bugs.eclipse.org/bugs/buglist.cgi?list_id=1764539;resolution=FIXED;resolution=DUPLICATE;classification=Technology;chfieldto=2012-06-06;query_format=advanced;chfield=bug_status;chfieldfrom=2012-02-25;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;component=JGit;product=JGit" target="egit_external">20 Bugs and 8 enhancement requests</a> were closed
+ </p><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="Bug-Fixes.html" title="Bug Fixes">
+ <a href="Performance-improvements.html" title="Performance improvements">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
- <a href="1.3.html" title="JGit 1.3 New and Noteworthy">
- <img alt="JGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="JGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right">
@@ -55,7 +52,7 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Bug Fixes</td>
+ <td style="width: 20%" align="left" valign="top">Performance improvements</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Other-Features.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Other-Features.html
new file mode 100644
index 0000000000..6795fa5f5d
--- /dev/null
+++ b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Other-Features.html
@@ -0,0 +1,80 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>JGit 2.0 New and Noteworthy - Other Features</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Other Features</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Performance-improvements.html" title="Performance improvements">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Updated Porcelain Commands</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Performance improvements</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Other_Features">Other Features</h1>
+ <ul>
+ <li>Support for git configuration parameters <span style="font-family:monospace;">url.insteadOf</span> and <span style="font-family:monospace;">url.pushInsteadOf</span> supporting URL rewriting, e.g.</li>
+ </ul>
+ <pre style="width: 40em;">
+ [url "mirror1.example.org:/pub/git/"]
+ insteadOf = mirror1.example.org:/pub/git/core/
+</pre>
+ <ul>
+ <li>Support to write tests with git command line syntax</li>
+ <li>Enable large file support to add files with size over 2 GB.</li>
+ <li><span style="font-family:monospace;">DirCheckout</span> now validates paths to detect malformed, potentially malicious tree entries</li>
+ <li>Add <span style="font-family:monospace;">--all</span> switch to jgit command line interface</li>
+ <li>Add <span style="font-family:monospace;">config --list</span> command to jgit command line interface</li>
+ <li><span style="font-family:monospace;">core.autocrlf</span> support fixed, it defaults to false but is no longer set explicitly when a new repository is created</li>
+ <li>Cleaned up exceptions in <span style="font-family:monospace;">org.eclipse.jgit.api</span>, see
+ <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=366914" target="egit_external">bug 366914</a>
+ </li>
+ <li>Clirr API change report listing API changes between 1.3 and 2.0 will be published on the
+ <a href="http://www.eclipse.org/jgit/download/" target="egit_external">JGit download page</a>
+ </li>
+ <li>New features <span style="font-family:monospace;">org.eclipse.jgit.pgm</span> and <span style="font-family:monospace;">org.eclipse.jgit.pgm.source</span> to provision the JGit command line interface bundle via the EGit p2 repository.</li>
+ </ul><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Updated-Porcelain-Commands.html" title="Updated Porcelain Commands">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="JGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Performance-improvements.html" title="Performance improvements">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Updated Porcelain Commands</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Performance improvements</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Performance-improvements.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Performance-improvements.html
new file mode 100644
index 0000000000..ccc931535c
--- /dev/null
+++ b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Performance-improvements.html
@@ -0,0 +1,62 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>JGit 2.0 New and Noteworthy - Performance improvements</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Performance improvements</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Other-Features.html" title="Other Features">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Bug-Fixes.html" title="Bug Fixes">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Other Features</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Bug Fixes</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Performance_improvements">Performance improvements</h1>
+ <ul>
+ <li>Performance of reading git configuration files was improved</li>
+ <li>Handling of smudged index entries was improved in order to improve git index performance</li>
+ </ul><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Other-Features.html" title="Other Features">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="JGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Bug-Fixes.html" title="Bug Fixes">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Other Features</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Bug Fixes</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html
new file mode 100644
index 0000000000..c7b5b78dac
--- /dev/null
+++ b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html
@@ -0,0 +1,66 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>JGit 2.0 New and Noteworthy - Updated Porcelain Commands</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Updated Porcelain Commands</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Other-Features.html" title="Other Features">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">JGit 2.0 New and Noteworthy</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Other Features</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Updated_Porcelain_Commands">Updated Porcelain Commands</h1>
+ <h2 id="CloneCommand"><span style="font-family:monospace;">CloneCommand</span></h2>
+ <ul>
+ <li>Supports <span style="font-family:monospace;">autosetuprebase</span></li>
+ </ul>
+ <h2 id="CheckoutCommand"><span style="font-family:monospace;">CheckoutCommand</span></h2>
+ <ul>
+ <li>Supports "all paths" option. This will perform the equivalent of running a <span style="font-family:monospace;">git checkout -- .</span> at the root of a repository</li>
+ </ul><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="JGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Other-Features.html" title="Other Features">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">JGit 2.0 New and Noteworthy</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Other Features</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updating-This-Document.html b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updating-This-Document.html
index 8b41ae01c8..3e6ba430dd 100644
--- a/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/1.3/Updating-This-Document.html
+++ b/org.eclipse.egit.doc/help/JGit/New_and_Noteworthy/2.0/Updating-This-Document.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>JGit 1.3 New and Noteworthy - Updating This Document</title>
+ <title>JGit 2.0 New and Noteworthy - Updating This Document</title>
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
</head>
<body>
@@ -12,7 +12,7 @@
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="Other-Notable-Changes.html" title="Other Notable Changes">
+ <a href="Bug-Fixes.html" title="Bug Fixes">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -20,7 +20,7 @@
<td style="width: 20%" align="right"></td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Other Notable Changes</td>
+ <td style="width: 20%" align="left" valign="top">Bug Fixes</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top"></td>
</tr>
@@ -29,24 +29,24 @@
<p> This document is maintained in a collaborative wiki. If you wish to
update or modify this document please visit
- <a href="http://wiki.eclipse.org/JGit/New_and_Noteworthy/1.3" target="egit_external">http://wiki.eclipse.org/JGit/New_and_Noteworthy/1.3</a>
+ <a href="http://wiki.eclipse.org/JGit/New_and_Noteworthy/2.0" target="egit_external">http://wiki.eclipse.org/JGit/New_and_Noteworthy/2.0</a>
</p><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="Other-Notable-Changes.html" title="Other Notable Changes">
+ <a href="Bug-Fixes.html" title="Bug Fixes">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
- <a href="1.3.html" title="JGit 1.3 New and Noteworthy">
- <img alt="JGit 1.3 New and Noteworthy" border="0" src="../../../images/home.gif"/>
+ <a href="2.0.html" title="JGit 2.0 New and Noteworthy">
+ <img alt="JGit 2.0 New and Noteworthy" border="0" src="../../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right"></td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Other Notable Changes</td>
+ <td style="width: 20%" align="left" valign="top">Bug Fixes</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top"></td>
</tr>
diff --git a/org.eclipse.egit.doc/help/toc.xml b/org.eclipse.egit.doc/help/toc.xml
index ee8b6fd489..3086c3cd4f 100644
--- a/org.eclipse.egit.doc/help/toc.xml
+++ b/org.eclipse.egit.doc/help/toc.xml
@@ -18,12 +18,8 @@
<topic href="help/EGit/User_Guide/User-Guide.html#Eclipse_SSH_Configuration" label="Eclipse SSH Configuration"></topic>
<topic href="help/EGit/User_Guide/User-Guide.html#Push_Upstream" label="Push Upstream"></topic>
</topic>
- <topic href="help/EGit/User_Guide/User-Guide.html#EGit_Tutorial_.28EclipseCon_March_2011.29" label="EGit Tutorial (EclipseCon March 2011)">
- <topic href="help/EGit/User_Guide/User-Guide.html#Installation_and_Configuration" label="Installation and Configuration"></topic>
- <topic href="help/EGit/User_Guide/User-Guide.html#Exercises" label="Exercises"></topic>
- </topic>
- <topic href="help/EGit/User_Guide/User-Guide.html#EGit_Tutorial_.28EclipseCon_Europe_Nov_2011.29" label="EGit Tutorial (EclipseCon Europe Nov 2011)">
- <topic href="help/EGit/User_Guide/User-Guide.html#Exercises_2" label="Exercises"></topic>
+ <topic href="help/EGit/User_Guide/User-Guide.html#EclipseCon_2012_Git_Tutorial" label="EclipseCon 2012 Git Tutorial">
+ <topic href="help/EGit/User_Guide/User-Guide.html#EGit_Training_Packages" label="EGit Training Packages"></topic>
</topic>
</topic>
<topic href="help/EGit/User_Guide/Concepts.html" label="Concepts">
@@ -398,41 +394,41 @@
</topic>
<topic href="help/JGit/User_Guide/Updating-This-Document.html" label="Updating This Document"></topic>
</topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html" label="EGit 1.3 New and Noteworthy">
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html" label="Features">
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html#Major" label="Major">
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html#Branch_Status_Decoration" label="Branch Status Decoration"></topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html#Redesigned_Import.2FClone_Wizard" label="Redesigned Import/Clone Wizard"></topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html#Submodule_Support" label="Submodule Support"></topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html#Branch_Project_Tracking" label="Branch Project Tracking"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html" label="EGit 2.0 New and Noteworthy">
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html" label="EGit Features">
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Stash_Support" label="Stash Support"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Allow_push_of_single_Refs.2FCommits_from_Repositories_.26_History_Views" label="Allow push of single Refs/Commits from Repositories &amp; History Views"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Support_for_.22workspace_patches.22" label="Support for &quot;workspace patches&quot;"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Preemptively_close_missing_projects_when_switching_branches" label="Preemptively close missing projects when switching branches"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Support_for_Eclipse-SourceReferences_manifest_headers" label="Support for Eclipse-SourceReferences manifest headers"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Other_Improvements" label="Other Improvements">
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#History_View_Improvements" label="History View Improvements"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Staging_View_Improvements" label="Staging View Improvements"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Repositories_View_Improvements" label="Repositories View Improvements"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Configuration" label="Configuration"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Team_Menu_.26_Git_Actions_Toolbar" label="Team Menu &amp; Git Actions Toolbar"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/2.0.html#Miscellaneous" label="Miscellaneous"></topic>
</topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/1.3.html#Minor" label="Minor"></topic>
</topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/Bugs-Closed.html" label="Bugs Closed"></topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/GitHub-Mylyn-Connector.html" label="GitHub Mylyn Connector"></topic>
- <topic href="help/EGit/New_and_Noteworthy/1.3/Updating-This-Document.html" label="Updating This Document"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/GitHub-Mylyn-Connector-Features.html" label="GitHub Mylyn Connector Features"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/Bugs-Closed.html" label="Bugs Closed"></topic>
+ <topic href="help/EGit/New_and_Noteworthy/2.0/Updating-This-Document.html" label="Updating This Document"></topic>
</topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html" label="JGit 1.3 New and Noteworthy">
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html" label="New Porcelain Commands">
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3EStashListCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;StashListCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmodule_Commands.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;Submodule Commands&lt;/span&quot;">
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleAddCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;SubmoduleAddCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleInitCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;SubmoduleInitCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleStatusCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;SubmoduleStatusCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleSyncCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;SubmoduleSyncCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/1.3.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ESubmoduleUpdateCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;SubmoduleUpdateCommand&lt;/span&quot;"></topic>
- </topic>
- </topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html" label="Updated Porcelain Commands">
- <topic href="help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ECloneCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;CloneCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3EDiffCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;DiffCommand&lt;/span&quot;"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/Updated-Porcelain-Commands.html#.3Cspan_style.3D.22font-family:monospace.3B.22.3ELogCommand.3C.2Fspan.3E" label="&lt;span style=&quot;font-family:monospace;&quot;&quot;LogCommand&lt;/span&quot;"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/2.0.html" label="JGit 2.0 New and Noteworthy">
+ <topic href="help/JGit/New_and_Noteworthy/2.0/2.0.html" label="New Porcelain Commands">
+ <topic href="help/JGit/New_and_Noteworthy/2.0/2.0.html#StashApplyCommand" label="StashApplyCommand"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/2.0.html#StashCreateCommand" label="StashCreateCommand"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/2.0.html#StashDropCommand" label="StashDropCommand"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/2.0.html#ApplyCommand" label="ApplyCommand"></topic>
</topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/Bug-Fixes.html" label="Bug Fixes">
- <topic href="help/JGit/New_and_Noteworthy/1.3/Bug-Fixes.html#Windows" label="Windows"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html" label="Updated Porcelain Commands">
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html#CloneCommand" label="CloneCommand"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Updated-Porcelain-Commands.html#CheckoutCommand" label="CheckoutCommand"></topic>
</topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/Other-Notable-Changes.html" label="Other Notable Changes"></topic>
- <topic href="help/JGit/New_and_Noteworthy/1.3/Updating-This-Document.html" label="Updating This Document"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Other-Features.html" label="Other Features"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Performance-improvements.html" label="Performance improvements"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Bug-Fixes.html" label="Bug Fixes"></topic>
+ <topic href="help/JGit/New_and_Noteworthy/2.0/Updating-This-Document.html" label="Updating This Document"></topic>
</topic>
<topic href="help/EGit/Git_For_Eclipse_Users/Git-For-Eclipse-Users.html" label="Git for Eclipse Users">
<topic href="help/EGit/Git_For_Eclipse_Users/Git-For-Eclipse-Users.html" label="Centralised version control systems"></topic>
diff --git a/org.eclipse.egit.repository/category.xml b/org.eclipse.egit.repository/category.xml
index 326e313ff6..ac0b8306ee 100644
--- a/org.eclipse.egit.repository/category.xml
+++ b/org.eclipse.egit.repository/category.xml
@@ -24,6 +24,12 @@
<feature url="features/org.eclipse.jgit.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.source" version="0.0.0" patch="true">
<category name="JGit"/>
</feature>
+ <feature url="features/org.eclipse.jgit.pgm_0.0.0.qualifier.jar" id="org.eclipse.jgit.pgm" version="0.0.0" patch="true">
+ <category name="JGit"/>
+ </feature>
+ <feature url="features/org.eclipse.jgit.pgm.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.pgm.source" version="0.0.0" patch="true">
+ <category name="JGit"/>
+ </feature>
<category-def name="Eclipse Git Team Provider" label="Eclipse Git Team Provider">
<description>
Eclipse Git Team Provider
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/AllTeamActionTests.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/AllTeamActionTests.java
index 8f711e8224..88ae31f1a4 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/AllTeamActionTests.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/AllTeamActionTests.java
@@ -23,6 +23,7 @@ import org.junit.runners.Suite.SuiteClasses;
DisconnectConnectTest.class, //
ShowInTest.class, //
CompareActionsTest.class, //
+ ReplaceActionsTest.class, //
CreatePatchActionTest.class })
public class AllTeamActionTests {
// nothing
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
index 18c9b6932a..114d1df917 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 SAP AG.
+ * Copyright (c) 2012 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,13 +8,16 @@
* Contributors:
* Mathias Kinzler (SAP AG) - initial implementation
* Chris Aniszczyk <caniszczyk@gmail.com> - tag API changes
+ * Mathias Kinzler (SAP AG) - compare with previous actions
*******************************************************************************/
package org.eclipse.egit.ui.test.team.actions;
import static org.junit.Assert.assertEquals;
+import java.io.ByteArrayInputStream;
import java.io.File;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.egit.core.op.BranchOperation;
import org.eclipse.egit.core.op.ResetOperation;
@@ -32,6 +35,8 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.ResetCommand.ResetType;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.util.RawParseUtils;
@@ -47,7 +52,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
/**
- * Tests for the Team->Branch action
+ * Tests for the Compare With actions
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class CompareActionsTest extends LocalRepositoryTestCase {
@@ -58,6 +63,7 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
// private static String LOCAL_BRANCHES;
//
private static String TAGS;
+ private static ObjectId commitOfTag;
@BeforeClass
public static void setup() throws Exception {
@@ -72,6 +78,7 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
tag.setMessage("I'm just a little tag");
tag.setObjectId(repo.resolve(repo.getFullBranch()),
Constants.OBJ_COMMIT);
+ commitOfTag = tag.getObjectId();
TagOperation top = new TagOperation(repo, tag, false);
top.execute(null);
touchAndSubmit(null);
@@ -143,6 +150,41 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
}
@Test
+ public void testCompareWithPrevious() throws Exception {
+ String menuLabel = util
+ .getPluginLocalizedValue("CompareWithPreviousAction.label");
+ clickCompareWith(menuLabel);
+ waitUntilCompareTreeViewTreeHasNodeCount(1);
+ }
+
+ @Test
+ public void testCompareWithPreviousWithMerge() throws Exception {
+ Repository repo = lookupRepository(repositoryFile);
+
+ Git git = new Git(repo);
+ ObjectId masterId = repo.resolve("refs/heads/master");
+ Ref newBranch = git.checkout().setCreateBranch(true)
+ .setStartPoint(commitOfTag.name()).setName("toMerge").call();
+ ByteArrayInputStream bis = new ByteArrayInputStream(
+ "Modified".getBytes());
+ ResourcesPlugin.getWorkspace().getRoot().getProject(PROJ1)
+ .getFolder(FOLDER).getFile(FILE2)
+ .setContents(bis, false, false, null);
+ bis.close();
+ git.commit().setAll(true).setMessage("To be merged").call();
+ git.merge().include(masterId).call();
+ String menuLabel = util
+ .getPluginLocalizedValue("CompareWithPreviousAction.label");
+ clickCompareWith(menuLabel);
+ SWTBotShell selectDialog = bot.shell(UIText.CommitSelectDialog_WindowTitle);
+ assertEquals(2, selectDialog.bot().table().rowCount());
+ selectDialog.close();
+ // cleanup: checkout again master and delete merged branch
+ git.checkout().setName("refs/heads/master").call();
+ git.branchDelete().setBranchNames(newBranch.getName()).setForce(true).call();
+ }
+
+ @Test
public void testCompareWithIndex() throws Exception {
String compareWithIndexActionLabel = util
.getPluginLocalizedValue("CompareWithIndexAction_label");
@@ -220,11 +262,7 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
private SWTBotShell openCompareWithDialog(String menuString,
String dialogTitle) {
- SWTBotTree projectExplorerTree = bot.viewById(
- "org.eclipse.jdt.ui.PackageExplorer").bot().tree();
- getProjectItem(projectExplorerTree, PROJ1).select();
- ContextMenuHelper.clickContextMenu(projectExplorerTree, "Compare With",
- menuString);
+ clickCompareWith(menuString);
SWTBotShell dialog = bot.shell(dialogTitle);
return dialog;
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/ReplaceActionsTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/ReplaceActionsTest.java
new file mode 100644
index 0000000000..a5b6b267ac
--- /dev/null
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/ReplaceActionsTest.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2012 SAP AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mathias Kinzler (SAP AG) - initial implementation
+ *******************************************************************************/
+package org.eclipse.egit.ui.test.team.actions;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.util.Date;
+import java.util.TimeZone;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.egit.core.op.BranchOperation;
+import org.eclipse.egit.core.op.TagOperation;
+import org.eclipse.egit.ui.JobFamilies;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.egit.ui.common.LocalRepositoryTestCase;
+import org.eclipse.egit.ui.test.ContextMenuHelper;
+import org.eclipse.egit.ui.test.TestUtil;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.TagBuilder;
+import org.eclipse.jgit.util.RawParseUtils;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotPerspective;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Tests for the Replace With actions
+ */
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class ReplaceActionsTest extends LocalRepositoryTestCase {
+ private static File repositoryFile;
+
+ private static SWTBotPerspective perspective;
+
+ private static ObjectId commitOfTag;
+
+ @BeforeClass
+ public static void setup() throws Exception {
+ repositoryFile = createProjectAndCommitToRepository();
+ Repository repo = lookupRepository(repositoryFile);
+ perspective = bot.activePerspective();
+ bot.perspectiveById("org.eclipse.pde.ui.PDEPerspective").activate();
+
+ TagBuilder tag = new TagBuilder();
+ tag.setTag("SomeTag");
+ tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
+ tag.setMessage("I'm just a little tag");
+ tag.setObjectId(repo.resolve(repo.getFullBranch()),
+ Constants.OBJ_COMMIT);
+ commitOfTag = tag.getObjectId();
+ TagOperation top = new TagOperation(repo, tag, false);
+ top.execute(null);
+ touchAndSubmit(null);
+ waitInUI();
+ }
+
+ @AfterClass
+ public static void shutdown() {
+ perspective.activate();
+ }
+
+ @Before
+ public void prepare() throws Exception {
+ Repository repo = lookupRepository(repositoryFile);
+ if (!repo.getBranch().equals("master")) {
+ BranchOperation bop = new BranchOperation(repo, "refs/heads/master");
+ bop.execute(null);
+ }
+ }
+
+ @Test
+ public void testReplaceWithPrevious() throws Exception {
+ String newContent = getTestFileContent();
+ String menuLabel = util
+ .getPluginLocalizedValue("replaceWithPreviousVersionAction.label");
+ clickReplaceWith(menuLabel);
+ bot.shell(UIText.DiscardChangesAction_confirmActionTitle).bot()
+ .button(IDialogConstants.OK_LABEL).click();
+ TestUtil.joinJobs(JobFamilies.DISCARD_CHANGES);
+ ResourcesPlugin.getWorkspace().getRoot()
+ .refreshLocal(IResource.DEPTH_INFINITE, null);
+ waitInUI();
+ String oldContent = getTestFileContent();
+ assertFalse(newContent.equals(oldContent));
+ }
+
+ @Test
+ public void testReplaceWithPreviousWithMerge() throws Exception {
+ Repository repo = lookupRepository(repositoryFile);
+ Git git = new Git(repo);
+ ObjectId masterId = repo.resolve("refs/heads/master");
+ Ref newBranch = git.checkout().setCreateBranch(true)
+ .setStartPoint(commitOfTag.name()).setName("toMerge").call();
+ ByteArrayInputStream bis = new ByteArrayInputStream(
+ "Modified".getBytes());
+ ResourcesPlugin.getWorkspace().getRoot().getProject(PROJ1)
+ .getFolder(FOLDER).getFile(FILE2)
+ .setContents(bis, false, false, null);
+ bis.close();
+ PersonIdent committer = new PersonIdent("COMMITTER", "a.c@d",
+ new Date(), TimeZone.getTimeZone("GMT-03:30"));
+ git.commit().setAll(true).setCommitter(committer)
+ .setMessage("To be merged").call();
+ git.merge().include(masterId).call();
+ String newContent = getTestFileContent();
+ String menuLabel = util
+ .getPluginLocalizedValue("replaceWithPreviousVersionAction.label");
+ clickReplaceWith(menuLabel);
+ bot.shell(UIText.DiscardChangesAction_confirmActionTitle).bot()
+ .button(IDialogConstants.OK_LABEL).click();
+ SWTBotShell selectDialog = bot
+ .shell(UIText.CommitSelectDialog_WindowTitle);
+ assertEquals(2, selectDialog.bot().table().rowCount());
+ selectDialog.close();
+ // we have closed, so nothing should have changed
+ String oldContent = getTestFileContent();
+ assertTrue(newContent.equals(oldContent));
+
+ clickReplaceWith(menuLabel);
+ bot.shell(UIText.DiscardChangesAction_confirmActionTitle).bot()
+ .button(IDialogConstants.OK_LABEL).click();
+ selectDialog = bot.shell(UIText.CommitSelectDialog_WindowTitle);
+ selectDialog.bot().table().select(1);
+ selectDialog.bot().button(IDialogConstants.OK_LABEL).click();
+ TestUtil.joinJobs(org.eclipse.egit.ui.JobFamilies.DISCARD_CHANGES);
+ oldContent = getTestFileContent();
+ assertFalse(newContent.equals(oldContent));
+ // cleanup: checkout again master and delete merged branch
+ git.checkout().setName("refs/heads/master").call();
+ git.branchDelete().setBranchNames(newBranch.getName()).setForce(true)
+ .call();
+ }
+
+ private void clickReplaceWith(String menuLabel) {
+ SWTBotTree projectExplorerTree = bot
+ .viewById("org.eclipse.jdt.ui.PackageExplorer").bot().tree();
+ getProjectItem(projectExplorerTree, PROJ1).select();
+ ContextMenuHelper.clickContextMenu(projectExplorerTree, "Replace With",
+ menuLabel);
+ }
+}
diff --git a/org.eclipse.egit.ui/plugin.properties b/org.eclipse.egit.ui/plugin.properties
index 7282027428..c8142e1ca6 100644
--- a/org.eclipse.egit.ui/plugin.properties
+++ b/org.eclipse.egit.ui/plugin.properties
@@ -35,7 +35,8 @@ BranchAction_label=&Switch to ...
BranchAction_tooltip=Checkout branch, tag, or reference
DiscardChangesAction_label=&File in Git Index
ReplaceWithHeadAction_label=&HEAD Revision
-ReplaceWithCommitAction_label=Commit...
+ReplaceWithCommitAction_label=&Commit...
+replaceWithPreviousVersionAction.label = &Previous Revision
ReplaceWithRefAction_label=&Branch, Tag, or Reference...
FetchAction_label=&Fetch From...
FetchAction_tooltip=Fetch changes from upstream
@@ -327,7 +328,7 @@ DeleteBranchCommand.name = Delete Branch
RenameBranchCommand.name = Rename Branch
CompareInTreeCommand.name = Compare in Tree
CompareWithPreviousCommand.name = Compare with Previous Revision
-CompareWithPreviousAction.label = Previous Revision
+CompareWithPreviousAction.label = &Previous Revision
CommitEditor.name = Git Commit Editor
CommitSearchPage.label = Git Search
CommitSearchResults.label = Git Search Results
@@ -347,8 +348,8 @@ ShowInReflog = Reflog
ReflogView = Git Reflog
ShowIn = Show In
ReflogCommand = Reflog
-RefLogViewCheckout.label = Checkout
-RefLogViewOpenInCommitViewer.label = Open in Commit Viewer
+RefLogViewCheckout.label = C&heckout
+RefLogViewOpenInCommitViewer.label = &Open in Commit Viewer
RepositoryConfigPropertyPage = Configuration
CloneUri.label = URI
@@ -357,3 +358,9 @@ AssumeUnchangedCommand = Assume Unchanged
NoAssumeUnchangedCommand = No Assume Unchanged
ConfigurBranchCommand.label = C&onfigure Branch...
+
+ReflogCopyCommand.label = &Copy
+RepoViewConfigurBranchCommand.name = Configure Branch
+ReflogViewContext = In Git Reflog View
+ReflogViewCommands = Reflog View Commands
+ReflogCopyCommandName = Copy
diff --git a/org.eclipse.egit.ui/plugin.xml b/org.eclipse.egit.ui/plugin.xml
index bb3b5f5320..262c54f245 100644
--- a/org.eclipse.egit.ui/plugin.xml
+++ b/org.eclipse.egit.ui/plugin.xml
@@ -173,6 +173,13 @@
label="%ReplaceWithRefAction_label"
menubarPath="replaceWithMenu/gitReplaceWithGroup"/>
<action
+ class="org.eclipse.egit.ui.internal.actions.ReplaceWithPreviousAction"
+ enablesFor="1"
+ id="org.eclipse.egit.ui.internal.actions.ReplaceWithPreviousAction"
+ label="%replaceWithPreviousVersionAction.label"
+ menubarPath="replaceWithMenu/gitReplaceWithGroup">
+ </action>
+ <action
class="org.eclipse.egit.ui.internal.actions.ReplaceWithHeadAction"
id="org.eclipse.egit.ui.internal.actions.ReplaceWithHeadAction"
label="%ReplaceWithHeadAction_label"
@@ -1679,6 +1686,24 @@
</and>
</activeWhen>
</handler>
+ <handler
+ commandId="org.eclipse.egit.ui.internal.reflog.CopyCommand">
+ <class
+ class="org.eclipse.egit.ui.internal.reflog.command.CopyHandler">
+ </class>
+ <activeWhen>
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <adapt
+ type="org.eclipse.jgit.storage.file.ReflogEntry">
+ </adapt>
+ </iterate>
+ </and>
+ </activeWhen>
+ </handler>
</extension>
<extension
point="org.eclipse.ui.views">
@@ -1837,6 +1862,11 @@
label="%RefLogViewOpenInCommitViewer.label"
style="push">
</command>
+ <command
+ commandId="org.eclipse.egit.ui.internal.reflog.CopyCommand"
+ label="%ReflogCopyCommand.label"
+ style="push">
+ </command>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.egit.ui.RepositoriesView">
@@ -3990,7 +4020,7 @@
categoryId="org.eclipse.egit.ui.commandCategory"
defaultHandler="org.eclipse.egit.ui.internal.repository.tree.command.ConfigureBranchCommand"
id="org.eclipse.egit.ui.RepositoriesViewConfigureBranch"
- name="Configure Branch">
+ name="%RepoViewConfigurBranchCommand.name">
</command>
</extension>
<extension
@@ -4235,6 +4265,10 @@
commandId="org.eclipse.egit.ui.history.RenameBranch"
icon="icons/obj16/editconfig.gif">
</image>
+ <image
+ commandId="org.eclipse.egit.ui.history.ShowBlame"
+ icon="icons/etool16/annotate.gif">
+ </image>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
@@ -4523,6 +4557,12 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+C">
</key>
+ <key
+ commandId="org.eclipse.egit.ui.internal.reflog.CopyCommand"
+ contextId="org.eclipse.egit.ui.ReflogView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+C">
+ </key>
</extension>
<extension
name="%HistoryViewCommands.extension.name"
@@ -4613,14 +4653,6 @@
name="%CheckoutCommand.name">
</command>
<command
- id="org.eclipse.egit.ui.internal.reflog.CheckoutCommand"
- name="%CheckoutCommand.name">
- </command>
- <command
- id="org.eclipse.egit.ui.internal.reflog.OpenInCommitViewerCommand"
- name="%OpenInCommitViewerCommand.name">
- </command>
- <command
defaultHandler="org.eclipse.egit.ui.internal.history.command.OpenInTextEditorHandler"
id="org.eclipse.egit.ui.history.OpenInTextEditorCommand"
name="%OpenInTextEditorCommand.name">
@@ -4679,6 +4711,11 @@
id="org.eclipse.egit.ui.commit.Checkout"
name="%CheckoutCommand">
</command>
+ <command
+ defaultHandler="org.eclipse.egit.ui.internal.history.command.ShowBlameHandler"
+ id="org.eclipse.egit.ui.history.ShowBlame"
+ name="%ShowBlameCommand.name">
+ </command>
</extension>
<extension
point="org.eclipse.ui.newWizards">
@@ -4702,6 +4739,12 @@
name="%RepositoriesViewContext.name"
parentId="org.eclipse.ui.contexts.window">
</context>
+ <context
+ id="org.eclipse.egit.ui.ReflogView"
+ name="%ReflogViewContext"
+ parentId="org.eclipse.ui.contexts.window">
+ parentId="org.eclipse.ui.contexts.window">
+ </context>
</extension>
<extension
point="org.eclipse.ui.editors">
@@ -4845,4 +4888,20 @@
<repositorySearchPage
class="org.eclipse.egit.ui.internal.components.RepositorySelectionPage"></repositorySearchPage>
</extension>
+ <extension
+ name="%ReflogViewCommands"
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.egit.ui.internal.reflog.OpenInCommitViewerCommand"
+ name="%OpenInCommitViewerCommand.name">
+ </command>
+ <command
+ id="org.eclipse.egit.ui.internal.reflog.CheckoutCommand"
+ name="%CheckoutCommand.name">
+ </command>
+ <command
+ id="org.eclipse.egit.ui.internal.reflog.CopyCommand"
+ name="%ReflogCopyCommandName">
+ </command>
+ </extension>
</plugin>
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java
index 3207d44807..917c156656 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java
@@ -89,6 +89,12 @@ public class JobFamilies {
public final static Object DISCONNECT = new Object();
/**
+ * Discard Changes
+ */
+ public final static Object DISCARD_CHANGES = new Object();
+
+
+ /**
* Add to index job
*/
public static final Object ADD_TO_INDEX = new Object();
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
index af90b20483..e822680b4a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
@@ -3,6 +3,7 @@
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* Copyright (C) 2010, Matthias Sohn <matthias.sohn@sap.com>
* Copyright (C) 2011, Daniel Megert <daniel_megert@ch.ibm.com>
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -178,6 +179,9 @@ public class UIText extends NLS {
public static String SharingWizard_MoveProjectActionLabel;
/** */
+ public static String ShowBlameHandler_errorMessage;
+
+ /** */
public static String ShowBlameHandler_JobName;
/** */
@@ -781,6 +785,12 @@ public class UIText extends NLS {
public static String ReplaceTargetSelectionDialog_ReplaceWindowTitle;
/** */
+ public static String ReplaceWithPreviousActionHandler_NoParentCommitDialogMessage;
+
+ /** */
+ public static String ReplaceWithPreviousActionHandler_NoParentCommitDialogTitle;
+
+ /** */
public static String RepositoryPropertySource_EditConfigButton;
/** */
@@ -1186,6 +1196,9 @@ public class UIText extends NLS {
public static String SourceBranchPage_CompositeTransportErrorMessage;
/** */
+ public static String SourceBranchPage_AuthFailMessage;
+
+ /** */
public static String CloneDestinationPage_title;
/** */
@@ -4232,6 +4245,27 @@ public class UIText extends NLS {
public static String CommitSearchResult_LabelSingle;
/** */
+ public static String CommitSelectDialog_AuthoColumn;
+
+ /** */
+ public static String CommitSelectDialog_DateColumn;
+
+ /** */
+ public static String CommitSelectDialog_IdColumn;
+
+ /** */
+ public static String CommitSelectDialog_Message;
+
+ /** */
+ public static String CommitSelectDialog_MessageColumn;
+
+ /** */
+ public static String CommitSelectDialog_Title;
+
+ /** */
+ public static String CommitSelectDialog_WindowTitle;
+
+ /** */
public static String CommitSelectionDialog_BuildingCommitListMessage;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ActionCommands.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ActionCommands.java
index 1a8e4d11a5..c4f1866668 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ActionCommands.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ActionCommands.java
@@ -74,6 +74,9 @@ public class ActionCommands {
/** "Replace with Ref" action command id */
public static final String REPLACE_WITH_REF_ACTION = "org.eclipse.egit.ui.team.ReplaceWithRef"; //$NON-NLS-1$
+ /** "Replace with previous version id */
+ public static final String REPLACE_WITH_PREVIOUS_ACTION = "org.eclipse.egit.ui.team.ReplaceWithPrevious"; //$NON-NLS-1$
+
/** "Disconnect" action command id */
public static final String DISCONNECT_ACTION = "org.eclipse.egit.ui.internal.actions.Disconnect"; //$NON-NLS-1$
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithPreviousActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithPreviousActionHandler.java
index 02b70203a1..a6565ab73b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithPreviousActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithPreviousActionHandler.java
@@ -12,6 +12,8 @@ package org.eclipse.egit.ui.internal.actions;
import java.io.IOException;
import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.compare.CompareEditorInput;
@@ -26,20 +28,16 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.egit.core.internal.job.JobUtil;
import org.eclipse.egit.core.op.IEGitOperation;
-import org.eclipse.egit.core.project.RepositoryMapping;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIText;
import org.eclipse.egit.ui.internal.CompareUtils;
import org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput;
+import org.eclipse.egit.ui.internal.dialogs.CommitSelectDialog;
import org.eclipse.egit.ui.internal.dialogs.CompareTreeView;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jgit.diff.DiffEntry;
-import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jface.window.Window;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.revwalk.FollowFilter;
-import org.eclipse.jgit.revwalk.RenameCallback;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
import org.eclipse.ui.PartInitException;
@@ -51,19 +49,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
*/
public class CompareWithPreviousActionHandler extends RepositoryActionHandler {
- private static class CompareWithPreviousOperation implements IEGitOperation {
-
- private static class PreviousCommit {
-
- final RevCommit commit;
-
- final String path;
-
- PreviousCommit(final RevCommit commit, final String path) {
- this.commit = commit;
- this.path = path;
- }
- }
+ private class CompareWithPreviousOperation implements IEGitOperation {
private ExecutionEvent event;
@@ -78,27 +64,53 @@ public class CompareWithPreviousActionHandler extends RepositoryActionHandler {
this.resource = resource;
}
- private String getRepositoryPath() {
- return RepositoryMapping.getMapping(resource.getProject())
- .getRepoRelativePath(resource);
- }
-
public void execute(IProgressMonitor monitor) throws CoreException {
- PreviousCommit previous = findPreviousCommit();
- if (previous != null)
- if (resource instanceof IFile) {
- final ITypedElement base = SaveableCompareEditorInput
- .createFileElement((IFile) resource);
- ITypedElement next = CompareUtils
- .getFileRevisionTypedElement(previous.path,
- previous.commit, repository);
- CompareEditorInput input = new GitCompareFileRevisionEditorInput(
- base, next, null);
- CompareUI.openCompareEditor(input);
- } else
- openCompareTreeView(previous.commit);
- else
+ final List<PreviousCommit> previousList;
+ try {
+ previousList = findPreviousCommits();
+ } catch (IOException e) {
+ Activator.handleError(e.getMessage(), e, true);
+ return;
+ }
+ final AtomicReference<PreviousCommit> previous = new AtomicReference<PreviousCommit>();
+ if (previousList.size() == 0) {
showNotFoundDialog();
+ return;
+ } else if (previousList.size() > 1){
+ final List<RevCommit> commits = new ArrayList<RevCommit>();
+ for (PreviousCommit pc: previousList)
+ commits.add(pc.commit);
+ HandlerUtil.getActiveShell(event).getDisplay()
+ .syncExec(new Runnable() {
+ public void run() {
+ CommitSelectDialog dlg = new CommitSelectDialog(
+ HandlerUtil.getActiveShell(event),
+ commits);
+ if (dlg.open() == Window.OK)
+ for (PreviousCommit pc: previousList)
+ if (pc.commit.equals(dlg.getSelectedCommit())){
+ previous.set(pc);
+ break;
+ }
+ }
+ });
+ }
+ else
+ previous.set(previousList.get(0));
+
+ if (previous.get() == null)
+ return;
+ if (resource instanceof IFile) {
+ final ITypedElement base = SaveableCompareEditorInput
+ .createFileElement((IFile) resource);
+ PreviousCommit pc = previous.get();
+ ITypedElement next = CompareUtils.getFileRevisionTypedElement(
+ pc.path, pc.commit, repository);
+ CompareEditorInput input = new GitCompareFileRevisionEditorInput(
+ base, next, null);
+ CompareUI.openCompareEditor(input);
+ } else
+ openCompareTreeView(previous.get().commit);
}
private void openCompareTreeView(final RevCommit previous) {
@@ -119,45 +131,6 @@ public class CompareWithPreviousActionHandler extends RepositoryActionHandler {
});
}
- private PreviousCommit findPreviousCommit() {
- final AtomicReference<String> previousPath = new AtomicReference<String>();
- RevWalk rw = new RevWalk(repository);
- try {
- String path = getRepositoryPath();
- if (path.length() > 0) {
- FollowFilter filter = FollowFilter.create(path);
- filter.setRenameCallback(new RenameCallback() {
-
- public void renamed(DiffEntry entry) {
- if (previousPath.get() == null)
- previousPath.set(entry.getOldPath());
- }
- });
- rw.setTreeFilter(filter);
- }
-
- RevCommit headCommit = rw.parseCommit(repository.getRef(
- Constants.HEAD).getObjectId());
- rw.markStart(headCommit);
- headCommit = rw.next();
-
- if (headCommit == null)
- return null;
- RevCommit previousCommit = rw.next();
- if (previousCommit == null)
- return null;
-
- if (previousPath.get() == null)
- previousPath.set(getRepositoryPath());
- return new PreviousCommit(previousCommit, previousPath.get());
- } catch (IOException e) {
- Activator.handleError(e.getMessage(), e, true);
- } finally {
- rw.dispose();
- }
- return null;
- }
-
private void showNotFoundDialog() {
final Shell shell = HandlerUtil.getActiveShell(event);
final String message = MessageFormat
@@ -197,4 +170,9 @@ public class CompareWithPreviousActionHandler extends RepositoryActionHandler {
null);
return null;
}
+
+ @Override
+ public boolean isEnabled() {
+ return super.isEnabled() && getSelectedResources().length == 1;
+ }
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/DiscardChangesActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/DiscardChangesActionHandler.java
index 9ddc5df36e..ce0c15fc6d 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/DiscardChangesActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/DiscardChangesActionHandler.java
@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.egit.core.op.DiscardChangesOperation;
import org.eclipse.egit.ui.Activator;
+import org.eclipse.egit.ui.JobFamilies;
import org.eclipse.egit.ui.UIText;
import org.eclipse.egit.ui.internal.operations.GitScopeUtil;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -58,6 +59,13 @@ public class DiscardChangesActionHandler extends RepositoryActionHandler {
}
return Status.OK_STATUS;
}
+
+ @Override
+ public boolean belongsTo(Object family) {
+ if (family.equals(JobFamilies.DISCARD_CHANGES))
+ return true;
+ return super.belongsTo(family);
+ }
};
job.setUser(true);
job.setRule(operation.getSchedulingRule());
@@ -73,16 +81,14 @@ public class DiscardChangesActionHandler extends RepositoryActionHandler {
if (repositories.length == 0)
return false;
Repository repository = repositories[0];
- if (!repository.getRepositoryState().equals(RepositoryState.SAFE)) {
+ if (!repository.getRepositoryState().equals(RepositoryState.SAFE))
return false;
- }
}
return true;
}
-
- private DiscardChangesOperation createOperation(IWorkbenchPart part, ExecutionEvent event)
- throws ExecutionException {
+ private DiscardChangesOperation createOperation(IWorkbenchPart part,
+ ExecutionEvent event) throws ExecutionException {
IResource[] selectedResources = gatherResourceToOperateOn(event);
String revision;
@@ -94,7 +100,8 @@ public class DiscardChangesActionHandler extends RepositoryActionHandler {
IResource[] resourcesInScope;
try {
- resourcesInScope = GitScopeUtil.getRelatedChanges(part, selectedResources);
+ resourcesInScope = GitScopeUtil.getRelatedChanges(part,
+ selectedResources);
} catch (InterruptedException e) {
// ignore, we will not discard the files in case the user
// cancels the scope operation
@@ -110,7 +117,8 @@ public class DiscardChangesActionHandler extends RepositoryActionHandler {
* @return set of resources to operate on
* @throws ExecutionException
*/
- protected IResource[] gatherResourceToOperateOn(ExecutionEvent event) throws ExecutionException {
+ protected IResource[] gatherResourceToOperateOn(ExecutionEvent event)
+ throws ExecutionException {
return getSelectedResources(event);
}
@@ -119,7 +127,8 @@ public class DiscardChangesActionHandler extends RepositoryActionHandler {
* @return the revision to use
* @throws ExecutionException
*/
- protected String gatherRevision(ExecutionEvent event) throws ExecutionException {
+ protected String gatherRevision(ExecutionEvent event)
+ throws ExecutionException {
return null;
}
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousAction.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousAction.java
new file mode 100644
index 0000000000..41fd7f5f25
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousAction.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ **/
+package org.eclipse.egit.ui.internal.actions;
+
+/**
+ * Replace with previous revision action.
+ */
+public class ReplaceWithPreviousAction extends RepositoryAction {
+
+ /**
+ * Create replace with previous revision action
+ */
+ public ReplaceWithPreviousAction() {
+ super(ActionCommands.REPLACE_WITH_PREVIOUS_ACTION,
+ new ReplaceWithPreviousActionHandler());
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousActionHandler.java
new file mode 100644
index 0000000000..31ee66a896
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousActionHandler.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ **/
+package org.eclipse.egit.ui.internal.actions;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.egit.ui.internal.dialogs.CommitSelectDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jgit.revwalk.RevCommit;
+
+/**
+ * Replace with previous revision action handler.
+ */
+public class ReplaceWithPreviousActionHandler extends
+ DiscardChangesActionHandler {
+
+ @Override
+ protected String gatherRevision(ExecutionEvent event)
+ throws ExecutionException {
+ IResource[] resources = getSelectedResources(event);
+ if (resources.length != 1)
+ throw new ExecutionException(
+ "Unexpected number of selected Resources"); //$NON-NLS-1$
+ try {
+ List<PreviousCommit> pcs = findPreviousCommits();
+ List<RevCommit> previousCommits = new ArrayList<RevCommit>();
+ for (PreviousCommit pc: pcs)
+ previousCommits.add(pc.commit);
+ int parentCount = previousCommits.size();
+ if (parentCount == 0) {
+ MessageDialog
+ .openError(
+ getShell(event),
+ UIText.ReplaceWithPreviousActionHandler_NoParentCommitDialogTitle,
+ MessageFormat
+ .format(UIText.ReplaceWithPreviousActionHandler_NoParentCommitDialogMessage,
+ resources[0].getName()));
+ throw new OperationCanceledException();
+ } else if (parentCount > 1) {
+ CommitSelectDialog dlg = new CommitSelectDialog(
+ getShell(event), previousCommits);
+ if (dlg.open() == Window.OK)
+ return dlg.getSelectedCommit().getName();
+ else
+ throw new OperationCanceledException();
+ } else
+ return previousCommits.get(0).getName();
+ } catch (IOException e) {
+ throw new ExecutionException(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return super.isEnabled() && getSelectedResources().length == 1;
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java
index 09e85fd248..6f27237b15 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java
@@ -18,6 +18,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Set;
import org.eclipse.core.commands.AbstractHandler;
@@ -40,10 +41,19 @@ import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.diff.DiffEntry.ChangeType;
+import org.eclipse.jgit.diff.RenameDetector;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.NullProgressMonitor;
+import org.eclipse.jgit.lib.ObjectReader;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryState;
+import org.eclipse.jgit.revwalk.FollowFilter;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.treewalk.TreeWalk;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -605,4 +615,83 @@ abstract class RepositoryActionHandler extends AbstractHandler {
return false;
}
+
+ protected String getPreviousPath(Repository repository,
+ ObjectReader reader, RevCommit headCommit,
+ RevCommit previousCommit, String path) throws IOException {
+ TreeWalk walk = new TreeWalk(reader);
+ walk.setRecursive(true);
+ walk.addTree(previousCommit.getTree());
+ walk.addTree(headCommit.getTree());
+
+ List<DiffEntry> entries = DiffEntry.scan(walk);
+ if (entries.size() < 2)
+ return path;
+
+ for (DiffEntry diff : entries)
+ if (diff.getChangeType() == ChangeType.MODIFY
+ && path.equals(diff.getNewPath()))
+ return path;
+
+ RenameDetector detector = new RenameDetector(repository);
+ detector.addAll(entries);
+ List<DiffEntry> renames = detector.compute(walk.getObjectReader(),
+ NullProgressMonitor.INSTANCE);
+ for (DiffEntry diff : renames)
+ if (diff.getChangeType() == ChangeType.RENAME
+ && path.equals(diff.getNewPath()))
+ return diff.getOldPath();
+
+ return path;
+ }
+
+ protected List<PreviousCommit> findPreviousCommits() throws IOException {
+ List<PreviousCommit> result = new ArrayList<PreviousCommit>();
+ Repository repository = getRepository();
+ IResource resource = getSelectedResources()[0];
+ String path = RepositoryMapping.getMapping(resource.getProject())
+ .getRepoRelativePath(resource);
+ RevWalk rw = new RevWalk(repository);
+ try {
+ if (path.length() > 0) {
+ FollowFilter filter = FollowFilter.create(path);
+ rw.setTreeFilter(filter);
+ }
+
+ RevCommit headCommit = rw.parseCommit(repository.getRef(
+ Constants.HEAD).getObjectId());
+ rw.markStart(headCommit);
+ headCommit = rw.next();
+
+ if (headCommit == null)
+ return result;
+ List<RevCommit> directParents = Arrays.asList(headCommit
+ .getParents());
+
+ RevCommit previousCommit = rw.next();
+ while (previousCommit != null && result.size() < directParents.size()) {
+ if (directParents.contains(previousCommit)) {
+ String previousPath = getPreviousPath(repository,
+ rw.getObjectReader(), headCommit, previousCommit,
+ path);
+ result.add(new PreviousCommit(previousCommit, previousPath));
+ }
+ previousCommit = rw.next();
+ }
+ } finally {
+ rw.dispose();
+ }
+ return result;
+ }
+
+ // keep track of the path of an ancestor (for following renames)
+ protected static final class PreviousCommit {
+ final RevCommit commit;
+ final String path;
+ PreviousCommit(final RevCommit commit, final String path) {
+ this.commit = commit;
+ this.path = path;
+ }
+ }
+
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
index 80e45916d2..106371e54c 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
@@ -374,13 +374,19 @@ class SourceBranchPage extends WizardPage {
private void transportError(final Throwable why) {
Throwable cause = why.getCause();
if (why instanceof TransportException && cause != null)
- transportError(NLS.bind(
- UIText.SourceBranchPage_CompositeTransportErrorMessage,
- why.getMessage(), cause.getMessage()));
+ transportError(NLS.bind(getMessage(why), why.getMessage(),
+ cause.getMessage()));
else
transportError(why.getMessage());
}
+ private String getMessage(final Throwable why) {
+ if (why.getMessage().endsWith("Auth fail")) //$NON-NLS-1$
+ return UIText.SourceBranchPage_AuthFailMessage;
+ else
+ return UIText.SourceBranchPage_CompositeTransportErrorMessage;
+ }
+
private void transportError(final String msg) {
transportError = msg;
checkPage();
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitLabelProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitLabelProvider.java
new file mode 100644
index 0000000000..b0a600b22b
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitLabelProvider.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (C) 2006, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2011, Matthias Sohn <matthias.sohn@sap.com>
+ * Copyright (C) 2011, IBM Corporation
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.egit.ui.internal.dialogs;
+
+import org.eclipse.jface.viewers.BaseLabelProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.util.GitDateFormatter;
+import org.eclipse.jgit.util.GitDateFormatter.Format;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * A Label Provider for Commits
+ */
+public class CommitLabelProvider extends BaseLabelProvider implements
+ ITableLabelProvider {
+ private GitDateFormatter dateFormatter;
+
+ private boolean showEmail;
+
+ private RevCommit lastCommit;
+
+ private PersonIdent lastAuthor;
+
+ private PersonIdent lastCommitter;
+
+ private Format format = Format.LOCALE;
+
+ /**
+ * Default constructor
+ */
+ public CommitLabelProvider() {
+ }
+
+ public String getColumnText(final Object element, final int columnIndex) {
+ final RevCommit c = (RevCommit) element;
+ if (columnIndex == 0)
+ return c.getId().abbreviate(7).name();
+ if (columnIndex == 1)
+ return c.getShortMessage();
+ if (columnIndex == 2 || columnIndex == 3) {
+ final PersonIdent author = authorOf(c);
+ if (author != null)
+ switch (columnIndex) {
+ case 2:
+ if (showEmail)
+ return author.getName()
+ + " <" + author.getEmailAddress() + '>'; //$NON-NLS-1$
+ else
+ return author.getName();
+ case 3:
+ return getDateFormatter().formatDate(author);
+ }
+ }
+ if (columnIndex == 4 || columnIndex == 5) {
+ final PersonIdent committer = committerOf(c);
+ if (committer != null)
+ switch (columnIndex) {
+ case 4:
+ if (showEmail)
+ return committer.getName()
+ + " <" + committer.getEmailAddress() + '>'; //$NON-NLS-1$
+ else
+ return committer.getName();
+ case 5:
+ return getDateFormatter().formatDate(committer);
+ }
+ }
+
+ return ""; //$NON-NLS-1$
+ }
+
+ private GitDateFormatter getDateFormatter() {
+ if (dateFormatter == null)
+ dateFormatter = new GitDateFormatter(format);
+ return dateFormatter;
+ }
+
+ private PersonIdent authorOf(final RevCommit c) {
+ if (lastCommit != c) {
+ lastCommit = c;
+ lastAuthor = c.getAuthorIdent();
+ lastCommitter = c.getCommitterIdent();
+ }
+ return lastAuthor;
+ }
+
+ private PersonIdent committerOf(final RevCommit c) {
+ if (lastCommit != c) {
+ lastCommit = c;
+ lastAuthor = c.getAuthorIdent();
+ lastCommitter = c.getCommitterIdent();
+ }
+ return lastCommitter;
+ }
+
+ public Image getColumnImage(final Object element, final int columnIndex) {
+ return null;
+ }
+
+ /**
+ * @param relative {@code true} if the date column should show relative dates
+ */
+ public void setRelativeDate(boolean relative) {
+ dateFormatter = null;
+ if (relative)
+ format = Format.RELATIVE;
+ else
+ format = Format.LOCALE;
+ }
+
+ /**
+ * @param showEmail true to show e-mail addresses, false otherwise
+ */
+ public void setShowEmailAddresses(boolean showEmail) {
+ this.showEmail = showEmail;
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java
index 84892130fd..eb68a76c81 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java
@@ -136,6 +136,10 @@ public class CommitMessageComponent {
private boolean amending = false;
+ private boolean commitAllowed = true;
+
+ private String cannotCommitMessage = null;
+
private boolean amendAllowed = false;
private boolean amendingCommitInRemoteBranch = false;
@@ -286,6 +290,25 @@ public class CommitMessageComponent {
this.amending = amending;
}
+
+ /**
+ * Set whether commit is allowed at the moment.
+ *
+ * @param commitAllowed
+ */
+ public void setCommitAllowed(boolean commitAllowed) {
+ this.commitAllowed = commitAllowed;
+ }
+
+ /**
+ * Set the message to be shown about why the commit is not allowed.
+ *
+ * @param cannotCommitMessage
+ */
+ public void setCannotCommitMessage(String cannotCommitMessage) {
+ this.cannotCommitMessage = cannotCommitMessage;
+ }
+
/**
* Set whether the previous commit may be amended
*
@@ -375,6 +398,9 @@ public class CommitMessageComponent {
* @return non-null commit status
*/
public CommitStatus getStatus() {
+ if (!commitAllowed)
+ return new CommitStatus(cannotCommitMessage, IMessageProvider.ERROR);
+
String authorValue = authorText.getText();
if (authorValue.length() == 0
|| RawParseUtils.parsePersonIdent(authorValue) == null)
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitSelectDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitSelectDialog.java
new file mode 100644
index 0000000000..f83075afa6
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitSelectDialog.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ **/
+package org.eclipse.egit.ui.internal.dialogs;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * Allows to select a single commit from a list of {@link RevCommit}s
+ */
+public class CommitSelectDialog extends TitleAreaDialog {
+ private final List<RevCommit> commits = new ArrayList<RevCommit>();
+
+ private RevCommit selected;
+
+ /**
+ * @param parent
+ * @param commits
+ **/
+ public CommitSelectDialog(Shell parent, List<RevCommit> commits) {
+ super(parent);
+ setShellStyle(getShellStyle() | SWT.SHELL_TRIM);
+ // sort by date ascending
+ this.commits.addAll(commits);
+ Collections.sort(this.commits, new Comparator<RevCommit>() {
+ public int compare(RevCommit o1, RevCommit o2) {
+ return o1.getAuthorIdent().getWhen()
+ .compareTo(o2.getAuthorIdent().getWhen());
+ }
+ });
+ setHelpAvailable(false);
+ }
+
+ /**
+ * @return the selected commit
+ */
+ public RevCommit getSelectedCommit() {
+ return selected;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite main = new Composite(parent, SWT.NONE);
+ GridLayoutFactory.fillDefaults().applyTo(main);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(main);
+ TableViewer tv = new TableViewer(main, SWT.SINGLE | SWT.BORDER
+ | SWT.FULL_SELECTION);
+ GridDataFactory.fillDefaults().grab(true, true)
+ .applyTo(tv.getControl());
+ tv.setContentProvider(ArrayContentProvider.getInstance());
+ tv.setLabelProvider(new CommitLabelProvider());
+ Table table = tv.getTable();
+ TableColumn c0 = new TableColumn(table, SWT.NONE);
+ c0.setWidth(70);
+ c0.setText(UIText.CommitSelectDialog_IdColumn);
+ TableColumn c1 = new TableColumn(table, SWT.NONE);
+ c1.setWidth(200);
+ c1.setText(UIText.CommitSelectDialog_MessageColumn);
+ TableColumn c2 = new TableColumn(table, SWT.NONE);
+ c2.setWidth(200);
+ c2.setText(UIText.CommitSelectDialog_AuthoColumn);
+ TableColumn c3 = new TableColumn(table, SWT.NONE);
+ c3.setWidth(150);
+ c3.setText(UIText.CommitSelectDialog_DateColumn);
+ tv.setInput(commits);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ tv.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (!event.getSelection().isEmpty())
+ selected = (RevCommit) ((IStructuredSelection) event
+ .getSelection()).getFirstElement();
+ else
+ selected = null;
+ getButton(OK).setEnabled(selected != null);
+ }
+ });
+ tv.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ okPressed();
+ }
+ });
+ return main;
+ }
+
+ @Override
+ public void create() {
+ super.create();
+ setTitle(UIText.CommitSelectDialog_Title);
+ setMessage(UIText.CommitSelectDialog_Message);
+ getButton(OK).setEnabled(false);
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(UIText.CommitSelectDialog_WindowTitle);
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java
index 61a256f34d..48c0923ae9 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java
@@ -740,6 +740,10 @@ class CommitGraphTable {
HistoryViewCommands.OPEN_IN_TEXT_EDITOR,
UIText.GitHistoryPage_OpenInTextEditorLabel));
}
+ if (selectionSize == 1)
+ popupMgr.add(getCommandContributionItem(
+ HistoryViewCommands.SHOW_BLAME,
+ UIText.CommitFileDiffViewer_ShowAnnotationsMenuLabel));
}
if (selectionSize == 1) {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java
index 378902e4db..5611e3dbe0 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GraphLabelProvider.java
@@ -3,6 +3,7 @@
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* Copyright (C) 2011, Matthias Sohn <matthias.sohn@sap.com>
* Copyright (C) 2011, IBM Corporation
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -14,32 +15,16 @@ package org.eclipse.egit.ui.internal.history;
import java.io.IOException;
import org.eclipse.egit.ui.Activator;
-import org.eclipse.jface.viewers.BaseLabelProvider;
+import org.eclipse.egit.ui.internal.dialogs.CommitLabelProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jgit.lib.PersonIdent;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.util.GitDateFormatter;
-import org.eclipse.jgit.util.GitDateFormatter.Format;
-import org.eclipse.swt.graphics.Image;
-class GraphLabelProvider extends BaseLabelProvider implements
+/**
+ * A Label Provider for Commits
+ */
+class GraphLabelProvider extends CommitLabelProvider implements
ITableLabelProvider {
- private GitDateFormatter dateFormatter;
-
- private boolean showEmail;
-
- private RevCommit lastCommit;
-
- private PersonIdent lastAuthor;
-
- private PersonIdent lastCommitter;
-
- private Format format = Format.LOCALE;
-
- GraphLabelProvider() {
- }
-
- public String getColumnText(final Object element, final int columnIndex) {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
final SWTCommit c = (SWTCommit) element;
try {
c.parseBody();
@@ -47,85 +32,6 @@ class GraphLabelProvider extends BaseLabelProvider implements
Activator.error("Error parsing body", e); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
- if (columnIndex == 0)
- return c.getId().abbreviate(7).name();
- if (columnIndex == 1)
- return c.getShortMessage();
- if (columnIndex == 2 || columnIndex == 3) {
- final PersonIdent author = authorOf(c);
- if (author != null)
- switch (columnIndex) {
- case 2:
- if (showEmail)
- return author.getName()
- + " <" + author.getEmailAddress() + '>'; //$NON-NLS-1$
- else
- return author.getName();
- case 3:
- return getDateFormatter().formatDate(author);
- }
- }
- if (columnIndex == 4 || columnIndex == 5) {
- final PersonIdent committer = committerOf(c);
- if (committer != null)
- switch (columnIndex) {
- case 4:
- if (showEmail)
- return committer.getName()
- + " <" + committer.getEmailAddress() + '>'; //$NON-NLS-1$
- else
- return committer.getName();
- case 5:
- return getDateFormatter().formatDate(committer);
- }
- }
-
- return ""; //$NON-NLS-1$
- }
-
- private GitDateFormatter getDateFormatter() {
- if (dateFormatter == null)
- dateFormatter = new GitDateFormatter(format);
- return dateFormatter;
- }
-
- private PersonIdent authorOf(final RevCommit c) {
- if (lastCommit != c) {
- lastCommit = c;
- lastAuthor = c.getAuthorIdent();
- lastCommitter = c.getCommitterIdent();
- }
- return lastAuthor;
- }
-
- private PersonIdent committerOf(final RevCommit c) {
- if (lastCommit != c) {
- lastCommit = c;
- lastAuthor = c.getAuthorIdent();
- lastCommitter = c.getCommitterIdent();
- }
- return lastCommitter;
- }
-
- public Image getColumnImage(final Object element, final int columnIndex) {
- return null;
- }
-
- /**
- * @param relative {@code true} if the date column should show relative dates
- */
- public void setRelativeDate(boolean relative) {
- dateFormatter = null;
- if (relative)
- format = Format.RELATIVE;
- else
- format = Format.LOCALE;
- }
-
- /**
- * @param showEmail true to show e-mail addresses, false otherwise
- */
- public void setShowEmailAddresses(boolean showEmail) {
- this.showEmail = showEmail;
+ return super.getColumnText(c, columnIndex);
}
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/HistoryViewCommands.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/HistoryViewCommands.java
index 80818ee1b2..6dcb3beb8e 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/HistoryViewCommands.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/HistoryViewCommands.java
@@ -88,4 +88,7 @@ public class HistoryViewCommands {
/** Open in Commit Viewer */
public static final String OPEN_IN_COMMIT_VIEWER = "org.eclipse.egit.ui.history.OpenInCommitViewerCommand"; //$NON-NLS-1$
+
+ /** Show Blame Annotations */
+ public static final String SHOW_BLAME = "org.eclipse.egit.ui.history.ShowBlame"; //$NON-NLS-1$
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowBlameHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowBlameHandler.java
new file mode 100644
index 0000000000..2ac555e2a7
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowBlameHandler.java
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * Copyright (c) 2012 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.egit.ui.internal.history.command;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egit.core.internal.job.JobUtil;
+import org.eclipse.egit.core.project.RepositoryMapping;
+import org.eclipse.egit.ui.Activator;
+import org.eclipse.egit.ui.JobFamilies;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.egit.ui.internal.CompareUtils;
+import org.eclipse.egit.ui.internal.blame.BlameOperation;
+import org.eclipse.egit.ui.internal.history.GitHistoryPage;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.team.core.history.IFileRevision;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Handler to blame a path on a selected commit
+ */
+public class ShowBlameHandler extends AbstractHistoryCommandHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ GitHistoryPage page = getPage();
+ Object input = page.getInputInternal().getSingleItem();
+ if (input == null)
+ return null;
+ Repository repo = getRepository(event);
+ if (repo == null)
+ return null;
+ String path = getPath(repo, page);
+ if (path == null)
+ return null;
+ RevCommit commit = (RevCommit) getSelection(page).getFirstElement();
+ if (commit == null)
+ return null;
+
+ try {
+ IFileRevision revision = CompareUtils.getFileRevision(path, commit,
+ repo, null);
+ if (revision == null)
+ return null;
+
+ IStorage storage = revision.getStorage(new NullProgressMonitor());
+ BlameOperation op = new BlameOperation(repo, storage, path, commit,
+ HandlerUtil.getActiveShell(event), page.getSite().getPage());
+ JobUtil.scheduleUserJob(op, UIText.ShowBlameHandler_JobName,
+ JobFamilies.BLAME);
+ } catch (IOException e) {
+ Activator.showError(UIText.ShowBlameHandler_errorMessage, e);
+ } catch (CoreException e) {
+ Activator.showError(UIText.ShowBlameHandler_errorMessage, e);
+ }
+ return null;
+ }
+
+ private String getPath(Repository repo, GitHistoryPage page) {
+ Object input = page.getInputInternal().getSingleItem();
+ if (input == null)
+ return null;
+ if (input instanceof IFile) {
+ IFile file = (IFile) input;
+ RepositoryMapping mapping = RepositoryMapping.getMapping(file);
+ if (mapping != null)
+ return mapping.getRepoRelativePath(file);
+ } else if (input instanceof File)
+ return getRepoRelativePath(repo, (File) input);
+ return null;
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/ReflogView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/ReflogView.java
index 6ce3c26a56..c0dbfe4916 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/ReflogView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/ReflogView.java
@@ -81,6 +81,7 @@ import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.forms.IFormColors;
@@ -150,7 +151,7 @@ public class ReflogView extends ViewPart implements RefsChangedListener {
final TreeColumnLayout layout = new TreeColumnLayout();
FilteredTree filteredTree = new FilteredTree(tableComposite, SWT.NONE
- | SWT.BORDER, new PatternFilter(), true) {
+ | SWT.BORDER | SWT.FULL_SELECTION, new PatternFilter(), true) {
@Override
protected void createControl(Composite composite, int treeStyle) {
super.createControl(composite, treeStyle);
@@ -349,6 +350,15 @@ public class ReflogView extends ViewPart implements RefsChangedListener {
@Override
public void setFocus() {
refLogTableTreeViewer.getControl().setFocus();
+ activateContextService();
+ }
+
+ private void activateContextService() {
+ IContextService contextService = (IContextService) getSite()
+ .getService(IContextService.class);
+ if (contextService != null)
+ contextService.activateContext(VIEW_ID);
+
}
@Override
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/command/CopyHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/command/CopyHandler.java
new file mode 100644
index 0000000000..55d3dc4eac
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/reflog/command/CopyHandler.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.egit.ui.internal.reflog.command;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+
+/**
+ * Copy to clipboard handler
+ */
+public class CopyHandler extends AbstractReflogCommandHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Repository repo = getRepository(event);
+ RevCommit commit = getSelectedCommit(event, repo);
+ if (commit != null) {
+ Clipboard clipboard = new Clipboard(null);
+ try {
+ TextTransfer textTransfer = TextTransfer.getInstance();
+ Transfer[] transfers = new Transfer[] { textTransfer };
+ Object[] data = new Object[] { ObjectId.toString(commit) };
+ clipboard.setContents(data, transfers);
+ } finally {
+ clipboard.dispose();
+ }
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java
index 081df79074..98dfbd3856 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java
@@ -91,7 +91,7 @@ class CreateBranchPage extends WizardPage {
if (sourceName.startsWith(Constants.R_TAGS))
return sourceName.substring(Constants.R_TAGS.length());
- return null;
+ return ""; //$NON-NLS-1$
}
private final Repository myRepository;
@@ -196,6 +196,22 @@ class CreateBranchPage extends WizardPage {
GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(
this.branchCombo);
+ Label nameLabel = new Label(main, SWT.NONE);
+ nameLabel.setText(UIText.CreateBranchPage_BranchNameLabel);
+
+ // we visualize the prefix here
+ Text prefix = new Text(main, SWT.NONE);
+ prefix.setText(Constants.R_HEADS);
+ prefix.setEnabled(false);
+
+ nameText = new Text(main, SWT.BORDER);
+ // give focus to the nameText if label is activated using the mnemonic
+ nameLabel.addTraverseListener(new TraverseListener() {
+ public void keyTraversed(TraverseEvent e) {
+ nameText.setFocus();
+ }
+ });
+
if (this.myBaseCommit != null) {
this.branchCombo.add(myBaseCommit.name());
this.branchCombo.setText(myBaseCommit.name());
@@ -209,10 +225,18 @@ class CreateBranchPage extends WizardPage {
}
map = myRepository.getRefDatabase()
.getRefs(Constants.R_REMOTES);
+ String firstRemote = null;
for (Entry<String, Ref> entry : map.entrySet()) {
if (entry.getValue().getLeaf().getObjectId()
- .equals(myBaseCommit))
+ .equals(myBaseCommit)) {
this.branchCombo.add(entry.getValue().getName());
+ if (firstRemote == null)
+ firstRemote = entry.getValue().getName();
+ }
+ }
+ if (firstRemote != null) {
+ this.branchCombo.setText(firstRemote);
+ suggestBranchName(firstRemote);
}
} catch (IOException e) {
// bad luck, we can't extend the drop down; let's log an error
@@ -254,21 +278,6 @@ class CreateBranchPage extends WizardPage {
}
});
- Label nameLabel = new Label(main, SWT.NONE);
- nameLabel.setText(UIText.CreateBranchPage_BranchNameLabel);
-
- // we visualize the prefix here
- Text prefix = new Text(main, SWT.NONE);
- prefix.setText(Constants.R_HEADS);
- prefix.setEnabled(false);
-
- nameText = new Text(main, SWT.BORDER);
- // give focus to the nameText if label is activated using the mnemonic
- nameLabel.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- nameText.setFocus();
- }
- });
nameText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
nameIsSuggestion = false;
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
index 6a074079a5..7d5cb91360 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
@@ -1270,6 +1270,8 @@ public class StagingView extends ViewPart {
commitMessageComponent.setCommitter(oldState.getCommitter());
commitMessageComponent.setHeadCommit(getCommitId(helper
.getPreviousCommit()));
+ commitMessageComponent.setCommitAllowed(helper.canCommit());
+ commitMessageComponent.setCannotCommitMessage(helper.getCannotCommitMessage());
boolean amendAllowed = helper.amendAllowed();
commitMessageComponent.setAmendAllowed(amendAllowed);
if (!amendAllowed)
@@ -1297,6 +1299,8 @@ public class StagingView extends ViewPart {
commitMessageComponent.setCommitter(helper.getCommitter());
commitMessageComponent.setHeadCommit(getCommitId(helper
.getPreviousCommit()));
+ commitMessageComponent.setCommitAllowed(helper.canCommit());
+ commitMessageComponent.setCannotCommitMessage(helper.getCannotCommitMessage());
commitMessageComponent.setAmendAllowed(helper.amendAllowed());
commitMessageComponent.setAmending(false);
// set the defaults for change id and signed off buttons.
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
index c13ee0b382..2af559dbc2 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
@@ -65,6 +65,7 @@ SelectResetTypePage_tooltipResettingTo=The ref being reset to
SharingWizard_windowTitle=Configure Git Repository
SharingWizard_failed=Failed to initialize Git team provider.
SharingWizard_MoveProjectActionLabel=Move Project
+ShowBlameHandler_errorMessage=Showing annotations failed
ShowBlameHandler_JobName=Computing Blame Annotations
GenerateHistoryJob_BuildingListMessage=Building commit list for ''{0}''...
@@ -315,6 +316,8 @@ ReplaceTargetSelectionDialog_ReplaceButton=&Replace
ReplaceTargetSelectionDialog_ReplaceMessage=Select a branch, tag, or reference to replace the resource with
ReplaceTargetSelectionDialog_ReplaceTitle=Replace ''{0}'' with a Branch, Tag, or Reference"
ReplaceTargetSelectionDialog_ReplaceWindowTitle=Replace
+ReplaceWithPreviousActionHandler_NoParentCommitDialogMessage=No previous revision of {0} could be found in the repository.
+ReplaceWithPreviousActionHandler_NoParentCommitDialogTitle=Previous revision not found
RepositoryAction_errorFindingRepo=Could not find a repository associated with this project
RepositoryAction_errorFindingRepoTitle=Cannot Find Repository
RepositoryAction_multiRepoSelection=Cannot perform action on multiple repositories simultaneously.\n\nPlease select items from only one repository.
@@ -410,6 +413,7 @@ SourceBranchPage_cannotListBranches=Cannot list the available branches.
SourceBranchPage_remoteListingCancelled=Operation canceled
SourceBranchPage_cannotCreateTemp=Couldn't create temporary repository.
SourceBranchPage_CompositeTransportErrorMessage={0}:\n{1}
+SourceBranchPage_AuthFailMessage={0}:\nInvalid password or missing SSH key.
CloneDestinationPage_title=Local Destination
CloneDestinationPage_description=Configure the local storage location for {0}.
@@ -1297,6 +1301,13 @@ CommitSearchQuery_Label=Git Commit Search
CommitSearchQuery_TaskSearchCommits=Searching commits in {0}
CommitSearchResult_LabelPlural=''{0}'' - {1} commit matches
CommitSearchResult_LabelSingle=''{0}'' - 1 commit match
+CommitSelectDialog_AuthoColumn=Author
+CommitSelectDialog_DateColumn=Date
+CommitSelectDialog_IdColumn=Id
+CommitSelectDialog_Message=Please select a Commit
+CommitSelectDialog_MessageColumn=Message
+CommitSelectDialog_Title=Commit Selection
+CommitSelectDialog_WindowTitle=Commit Selection
CommitSelectionDialog_BuildingCommitListMessage=Building commit list
CommitSelectionDialog_DialogMessage=Please select a commit from the list
CommitSelectionDialog_DialogTitle={0} commits in repository {1}
@@ -1568,4 +1579,4 @@ GitOpenInCompareAction_cannotRetrieveCommitWithId=Cannot retrieve commit with id
CloneFailureDialog_tile=Transport Error
CloneFailureDialog_dontShowAgain=Don't show this dialog again
-CloneFailureDialog_checkList={0}\n\nPlease check:\nNetwork Connection settings\nNetwork Connection -> SSH2 Eclipse preferences\n\nYou may also need to restart Eclipse after making changes in preferences. \ No newline at end of file
+CloneFailureDialog_checkList={0}\n\nPlease check:\nNetwork Connection settings\nNetwork Connection -> SSH2 Eclipse preferences\n\nYou may also need to restart Eclipse after making changes in preferences.

Back to the top