Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugin/src/main/java/git4idea/GitUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,14 @@ public static String getPrintableRemotes(@Nonnull Collection<GitRemote> remotes)
* @param file the file affected by the revision
* @param local pass true to let the diff be editable, i.e. making the revision "at the right" be a local (current) revision.
* pass false to let both sides of the diff be non-editable.
* @param revertable pass true to let "Revert" action be active.
* @param revertible pass true to let "Revert" action be active.
*/
public static void showSubmittedFiles(
final Project project,
final String revision,
final VirtualFile file,
final boolean local,
final boolean revertable
final boolean revertible
) {
new Task.Backgroundable(project, GitLocalize.changesRetrieving(revision)) {
@Override
Expand All @@ -881,7 +881,7 @@ public void run(@Nonnull ProgressIndicator indicator) {
try {
VirtualFile vcsRoot = getGitRoot(file);
final CommittedChangeList changeList =
GitChangeUtils.getRevisionChanges(project, vcsRoot, revision, true, local, revertable);
GitChangeUtils.getRevisionChanges(project, vcsRoot, revision, true, local, revertible);
if (changeList != null) {
UIUtil.invokeLaterIfNeeded(
() -> AbstractVcsHelper.getInstance(project)
Expand Down Expand Up @@ -936,7 +936,7 @@ public static Map<VirtualFile, List<VirtualFile>> sortFilesByGitRootsIgnoringOth
* @param staged if true checks the staging area, if false checks unstaged files.
* @param project
* @param root
* @return true if there is anything in the unstaged/staging area, false if the unstraed/staging area is empty.
* @return true if there is anything in the unstaged/staging area, false if the unstaged/staging area is empty.
*/
public static boolean hasLocalChanges(boolean staged, Project project, VirtualFile root) throws VcsException {
final GitSimpleHandler diff = new GitSimpleHandler(project, root, GitCommand.DIFF);
Expand Down
15 changes: 8 additions & 7 deletions plugin/src/main/java/git4idea/changes/GitChangeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import consulo.versionControlSystem.VcsException;
import consulo.versionControlSystem.change.Change;
import consulo.versionControlSystem.change.ContentRevision;
import consulo.versionControlSystem.change.CurrentContentRevision;
import consulo.virtualFileSystem.VirtualFile;
import consulo.virtualFileSystem.status.FileStatus;
import git4idea.GitContentRevision;
Expand Down Expand Up @@ -262,18 +263,18 @@ public static boolean isHeadMissing(final VcsException e)
* @param revisionName the name of revision (might be tag)
* @param skipDiffsForMerge
* @param local
* @param revertable
* @param revertible
* @return change list for the respective revision
* @throws VcsException in case of problem with running git
*/
public static GitCommittedChangeList getRevisionChanges(Project project, VirtualFile root, String revisionName, boolean skipDiffsForMerge, boolean local, boolean revertable) throws VcsException
public static GitCommittedChangeList getRevisionChanges(Project project, VirtualFile root, String revisionName, boolean skipDiffsForMerge, boolean local, boolean revertible) throws VcsException
{
GitSimpleHandler h = new GitSimpleHandler(project, root, GitCommand.SHOW);
h.setSilent(true);
h.addParameters("--name-status", "--first-parent", "--no-abbrev", "-M", "--pretty=format:" + COMMITTED_CHANGELIST_FORMAT, "--encoding=UTF-8", revisionName, "--");
String output = h.run();
StringScanner s = new StringScanner(output);
return parseChangeList(project, root, s, skipDiffsForMerge, h, local, revertable);
return parseChangeList(project, root, s, skipDiffsForMerge, h, local, revertible);
}

@Nullable
Expand Down Expand Up @@ -311,9 +312,9 @@ public static SHAHash commitExists(final Project project, final VirtualFile root
* @param skipDiffsForMerge
* @param handler the handler that produced the output to parse. - for debugging purposes.
* @param local pass {@code true} to indicate that this revision should be an editable
* {@link consulo.versionControlSystem.change.CurrentContentRevision}.
* {@link CurrentContentRevision}.
* Pass {@code false} for
* @param revertable
* @param revertible
* @return the parsed changelist
* @throws VcsException if there is a problem with running git
*/
Expand All @@ -323,7 +324,7 @@ public static GitCommittedChangeList parseChangeList(Project project,
boolean skipDiffsForMerge,
GitHandler handler,
boolean local,
boolean revertable) throws VcsException
boolean revertible) throws VcsException
{
ArrayList<Change> changes = new ArrayList<>();
// parse commit information
Expand Down Expand Up @@ -382,7 +383,7 @@ else if(commentBody.length() == 0)
}
}
String changeListName = String.format("%s(%s)", commentSubject, revisionNumber);
return new GitCommittedChangeList(changeListName, fullComment, committerName, thisRevision, commitDate, changes, assertNotNull(GitVcs.getInstance(project)), revertable);
return new GitCommittedChangeList(changeListName, fullComment, committerName, thisRevision, commitDate, changes, assertNotNull(GitVcs.getInstance(project)), revertible);
}

public static long longForSHAHash(String revisionNumber)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class GitHeavyCommit {
private final Date myDate;

private final String myAuthorEmail;
private final String myComitterEmail;
private final String myCommitterEmail;

private final List<String> myTags;
private final List<String> myLocalBranches;
Expand Down Expand Up @@ -76,7 +76,7 @@ public GitHeavyCommit(@Nonnull VirtualFile root, @Nonnull final AbstractHash sho
final Set<String> parentsHashes,
final List<FilePath> pathsList,
final String authorEmail,
final String comitterEmail,
final String committerEmail,
List<String> tags,
final List<String> localBranches,
final List<String> remoteBranches,
Expand All @@ -93,7 +93,7 @@ public GitHeavyCommit(@Nonnull VirtualFile root, @Nonnull final AbstractHash sho
myParentsHashes = parentsHashes;
myPathsList = pathsList;
myAuthorEmail = authorEmail;
myComitterEmail = comitterEmail;
myCommitterEmail = committerEmail;
myTags = tags;
myChanges = changes;
myLocalBranches = localBranches;
Expand Down Expand Up @@ -176,7 +176,7 @@ public String getAuthorEmail() {
}

public String getCommitterEmail() {
return myComitterEmail;
return myCommitterEmail;
}

public List<FilePath> getPathsList() {
Expand Down Expand Up @@ -209,8 +209,9 @@ public long getAuthorTime() {
return myAuthorTime;
}

@Deprecated(forRemoval = true)
public String getComitterEmail() {
return myComitterEmail;
return getCommitterEmail();
}

public boolean isOnLocal() {
Expand Down
14 changes: 2 additions & 12 deletions plugin/src/main/java/git4idea/i18n/GitBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@
* limitations under the License.
*/
package git4idea.i18n;
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
*
* Author: Anatol Pomazu
*/

import consulo.annotation.DeprecationInfo;
import consulo.annotation.internal.MigratedExtensionsTo;
Expand All @@ -35,6 +23,8 @@

/**
* Git4Idea package I18N localization bundle helper
*
* @author Anatol Pomazu
*/
@Deprecated(forRemoval = true)
@DeprecationInfo("Use GitLocalize")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GitRejectedPushUpdateDialog extends DialogWrapper {
static final int MERGE_EXIT_CODE = NEXT_USER_EXIT_CODE;
static final int REBASE_EXIT_CODE = MERGE_EXIT_CODE + 1;

private static final String HTML_IDENT = "&nbsp;&nbsp;&nbsp;&nbsp;";
private static final String HTML_INDENT = "&nbsp;&nbsp;&nbsp;&nbsp;";
public static final String DESCRIPTION_START = "Push of current branch ";

private final Project myProject;
Expand Down Expand Up @@ -148,7 +148,7 @@ else if (myRepositories.size() == 1) { // there are more than 1 repositories in
String branchName = currentBranches.values().iterator().next().getName();
StringBuilder sb = new StringBuilder(DESCRIPTION_START + code(branchName) + " was rejected in repositories <br/>");
for (GitRepository repository : DvcsUtil.sortRepositories(currentBranches.keySet())) {
sb.append(HTML_IDENT).append(code(repository.getPresentableUrl())).append("<br/>");
sb.append(HTML_INDENT).append(code(repository.getPresentableUrl())).append("<br/>");
}
sb.append(descriptionEnding());
return sb.toString();
Expand All @@ -158,7 +158,8 @@ else if (myRepositories.size() == 1) { // there are more than 1 repositories in
for (Map.Entry<GitRepository, GitBranch> entry : currentBranches.entrySet()) {
GitRepository repository = entry.getKey();
GitBranch currentBranch = entry.getValue();
sb.append(HTML_IDENT + code(currentBranch.getName()) + " in " + code(repository.getPresentableUrl()) + "<br/>");
sb.append(HTML_INDENT).append(code(currentBranch.getName()))
.append(" in ").append(code(repository.getPresentableUrl())).append("<br/>");
}
sb.append(descriptionEnding());
return sb.toString();
Expand Down
8 changes: 4 additions & 4 deletions plugin/src/main/java/git4idea/update/GitUpdateProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class GitUpdateProcess {
@Nonnull
private final List<GitRepository> myRepositories;
private final boolean myCheckRebaseOverMergeProblem;
private final boolean myCheckForTrackedBranchExistance;
private final boolean myCheckForTrackedBranchExistence;
private final UpdatedFiles myUpdatedFiles;
@Nonnull
private final ProgressIndicator myProgressIndicator;
Expand All @@ -91,10 +91,10 @@ public GitUpdateProcess(@Nonnull Project project,
@Nonnull Collection<GitRepository> repositories,
@Nonnull UpdatedFiles updatedFiles,
boolean checkRebaseOverMergeProblem,
boolean checkForTrackedBranchExistance) {
boolean checkForTrackedBranchExistence) {
myProject = project;
myCheckRebaseOverMergeProblem = checkRebaseOverMergeProblem;
myCheckForTrackedBranchExistance = checkForTrackedBranchExistance;
myCheckForTrackedBranchExistence = checkForTrackedBranchExistence;
myGit = Git.getInstance();
myChangeListManager = ChangeListManager.getInstance(project);
myVcsManager = ProjectLevelVcsManager.getInstance(project);
Expand Down Expand Up @@ -352,7 +352,7 @@ private Map<VirtualFile, GitBranchPair> checkTrackedBranchesConfiguration() {
GitBranchTrackInfo trackInfo = GitBranchUtil.getTrackInfoForBranch(repository, branch);
if (trackInfo == null) {
LOG.info(String.format("checkTrackedBranchesConfigured: no track info for current branch %s in %s", branch, repository));
if (myCheckForTrackedBranchExistance) {
if (myCheckForTrackedBranchExistence) {
notifyImportantError(repository.getProject(), "Can't Update", getNoTrackedBranchError(repository, branch.getName()));
return null;
}
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/main/java/git4idea/util/GitUIUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public static void notifyMessages(
if (messages != null && !messages.isEmpty()) {
desc += StringUtil.join(messages, "<hr/><br/>");
}
VcsNotifier notificator = VcsNotifier.getInstance(project);
VcsNotifier notifier = VcsNotifier.getInstance(project);
if (important) {
notificator.notifyError(title, desc);
notifier.notifyError(title, desc);
}
else {
notificator.notifyImportantWarning(title, desc, null);
notifier.notifyImportantWarning(title, desc, null);
}
}

Expand Down
Loading