Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
25,400
void (@NotNull Runnable action) { // no extra changing components => ignore }
setFireOnChangeAction
25,401
void (final @NotNull PushTargetEditorListener listener) { myDestTargetPanel.addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { listener.onTargetInEditModeChanged(myDestTargetPanel.getText()); } }); }
addTargetEditorListener
25,402
void (@NotNull DocumentEvent e) { listener.onTargetInEditModeChanged(myDestTargetPanel.getText()); }
documentChanged
25,403
OutgoingResult (@NotNull final HgRepository repository, @NotNull final PushSpec<HgPushSource, HgTarget> pushSpec, boolean initial) { final Project project = repository.getProject(); HgVcs hgvcs = HgVcs.getInstance(project); assert hgvcs != null; final HgVersion version = hgvcs.getVersion(); String[] templates = HgBaseL...
getOutgoingCommits
25,404
void (@NotNull CommitLoader commitLoader) { commitLoader.reloadCommits(); }
handleError
25,405
void (@NotNull Map<HgRepository, PushSpec<HgPushSource, HgTarget>> pushSpecs, @Nullable VcsPushOptionValue vcsPushOptionValue, boolean force) { for (Map.Entry<HgRepository, PushSpec<HgPushSource, HgTarget>> entry : pushSpecs.entrySet()) { HgRepository repository = entry.getKey(); PushSpec<HgPushSource, HgTarget> hgSpec...
push
25,406
void (final @NotNull Project project, @NotNull HgPushCommand command) { final VirtualFile repo = command.getRepo(); HgCommandResult result = command.executeInCurrentThread(); if (result == null) { return; } if (result.getExitValue() == PUSH_SUCCEEDED_EXIT_VALUE) { int commitsNum = getNumberOfPushedCommits(result); Stri...
pushSynchronously
25,407
int (@NotNull HgCommandResult result) { int numberOfCommitsInAllSubrepos = 0; final List<String> outputLines = result.getOutputLines(); for (String outputLine : outputLines) { outputLine = outputLine.trim(); final Matcher matcher = PUSH_COMMITS_PATTERN.matcher(outputLine); if (matcher.matches()) { try { String numberOf...
getNumberOfPushedCommits
25,408
OptionsPanelPosition () { return OptionsPanelPosition.SOUTH; }
getPosition
25,409
String () { return myBranch; }
getPresentation
25,410
HgConfig (Project project, VirtualFile root) { return new HgConfig(project, root); }
getInstance
25,411
String () { return getNamedConfig("paths", "default"); }
getDefaultPath
25,412
String () { String path = getNamedConfig("paths", "default:pushurl"); if (path == null) { path = getNamedConfig("paths", "default-push"); } if (path == null) { path = getNamedConfig("paths", "default"); } return path; }
getDefaultPushPath
25,413
String (@NotNull @NonNls String sectionName, @Nullable @NonNls String configName) { if (StringUtil.isEmptyOrSpaces(sectionName) || StringUtil.isEmptyOrSpaces(configName)) { return null; } Map<String, String> sectionValues = myConfigMap.get(sectionName); return sectionValues != null ? sectionValues.get(configName) : nul...
getNamedConfig
25,414
Collection<String> () { Map<String, String> pathOptions = myConfigMap.get("paths"); //NON-NLS return pathOptions != null ? pathOptions.values() : Collections.emptyList(); }
getPaths
25,415
boolean () { String value = getNamedConfig("extensions", "mq"); return (value != null && !value.trim().startsWith("!")); }
isMqUsed
25,416
VcsKey () { return HgVcs.getKey(); }
getSupportedVcs
25,417
String () { return myCurrentBranch; }
getCurrentBranch
25,418
Collection<HgNameWithHashInfo> () { return myBookmarks; }
getBookmarks
25,419
Collection<HgNameWithHashInfo> () { return myTags; }
getTags
25,420
Collection<HgNameWithHashInfo> () { return myLocalTags; }
getLocalTags
25,421
String () { return myTipRevision; }
getTipRevision
25,422
String () { return myCurrentRevision; }
getCurrentRevision
25,423
String () { return myCurrentBookmark; }
getCurrentBookmark
25,424
List<HgNameWithHashInfo> () { return myMQApplied; }
getMQApplied
25,425
List<String> () { return myMqNames; }
getMqPatchNames
25,426
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; HgRepoInfo info = (HgRepoInfo)o; if (myState != info.myState) return false; if (myTipRevision != null ? !myTipRevision.equals(info.myTipRevision) : info.myTipRevision != null) return false; if (myCurrentRevision ...
equals
25,427
int () { return Objects.hash(myCurrentBranch, myCurrentRevision, myTipRevision, myCurrentBookmark, myState, myBranches, myBookmarks, myTags, myLocalTags, mySubrepos, myMQApplied, myMqNames); }
hashCode
25,428
String () { return String.format("HgRepository{myCurrentBranch=%s, myCurrentRevision='%s', myState=%s}", myCurrentBranch, myCurrentRevision, myState); }
toString
25,429
boolean () { return !mySubrepos.isEmpty(); }
hasSubrepos
25,430
Collection<HgNameWithHashInfo> () { return mySubrepos; }
getSubrepos
25,431
File (@NotNull HgVersion version, @NotNull File parentCacheFile) { //before 2.5 only branchheads exist; branchheads-served after mercurial 2.5; branch2-served after 2.9; // when project is recently cloned there are only base file if (version.hasBranch2()) { File file = new File(parentCacheFile, "branch2-served"); retur...
identifyBranchHeadFile
25,432
String () { if (!isDirStateInfoAvailable()) return null; try { return BaseEncoding.base16().lowerCase().encode(readHashBytesFromFile(myDirStateFile)); } catch (IOException e) { // dirState exists if not fresh, if we could not load dirState info repository must be corrupted LOG.error("IOException while trying to read cu...
readCurrentRevision
25,433
String () { if (!isBranchInfoAvailable()) return null; String[] branchesWithHeads; try { branchesWithHeads = DvcsUtil.tryLoadFile(myBranchHeadsFile).split("\n"); } catch (RepoStateException e) { LOG.error(e); return null; } String head = branchesWithHeads[0]; Matcher matcher = HASH_NAME.matcher(head); if (matcher.match...
readCurrentTipRevision
25,434
boolean () { myBranchHeadsFile = identifyBranchHeadFile(myVcs.getVersion(), myCacheDir); return !isFresh() && myBranchHeadsFile.exists(); }
isBranchInfoAvailable
25,435
boolean () { return myDirStateFile.exists(); }
isDirStateInfoAvailable
25,436
String () { return branchExist() ? DvcsUtil.tryLoadFileOrReturn(myCurrentBranch, HgRepository.DEFAULT_BRANCH) : HgRepository.DEFAULT_BRANCH; }
readCurrentBranch
25,437
boolean () { return new File(myHgDir, "merge").exists(); }
isMergeInProgress
25,438
boolean () { return mySubrepoFile.exists(); }
hasSubrepos
25,439
boolean () { return new File(myHgDir, "rebasestate").exists(); }
isRebaseInProgress
25,440
boolean () { return new File(myHgDir, "graftstate").exists(); }
isCherryPickInProgress
25,441
boolean () { return !myCacheDir.exists(); }
isFresh
25,442
boolean () { return myCurrentBranch.exists(); }
branchExist
25,443
Collection<HgNameWithHashInfo> () { return readReferences(myBookmarksFile); }
readBookmarks
25,444
Collection<HgNameWithHashInfo> () { return readReferences(myTagsFile); }
readTags
25,445
Collection<HgNameWithHashInfo> () { return readReferences(myLocalTagsFile); }
readLocalTags
25,446
Collection<HgNameWithHashInfo> (@NotNull File fileWithReferences) { HashSet<HgNameWithHashInfo> result = new HashSet<>(); readReferences(fileWithReferences, result); return result; }
readReferences
25,447
void (@NotNull File fileWithReferences, @NotNull Collection<HgNameWithHashInfo> resultRefs) { // files like .hg/bookmarks which contains hash + name, f.e. 25e44c95b2612e3cdf29a704dabf82c77066cb67 A_BookMark or //files like .hg/patches/status hash:name, f.e. 25e44c95b2612e3cdf29a704dabf82c77066cb67:1.diff if (!fileWithR...
readReferences
25,448
String () { return myCurrentBookmark.exists() ? DvcsUtil.tryLoadFileOrReturn(myCurrentBookmark, "") : null; }
readCurrentBookmark
25,449
Collection<HgNameWithHashInfo> () { if (!hasSubrepos()) return Collections.emptySet(); return readReferences(mySubrepoFile); }
readSubrepos
25,450
List<HgNameWithHashInfo> () { ArrayList<HgNameWithHashInfo> mqPatchRefs = new ArrayList<>(); readReferences(new File(myMqInternalDir, "status"), mqPatchRefs); return mqPatchRefs; }
readMQAppliedPatches
25,451
List<String> () { File seriesFile = new File(myMqInternalDir, "series"); return seriesFile.exists() ? StringUtil.split(DvcsUtil.tryLoadFileOrReturn(seriesFile, ""), "\n") : ContainerUtil.emptyList(); }
readMqPatchNames
25,452
HgRepository (@NotNull VirtualFile root, @NotNull Project project, @NotNull Disposable parentDisposable) { ProgressManager.checkCanceled(); HgVcs vcs = HgVcs.getInstance(project); if (vcs == null) { throw new IllegalArgumentException("Vcs not found for project " + project); } HgRepositoryImpl repository = new HgReposit...
getInstance
25,453
void () { HgRepositoryUpdater updater = new HgRepositoryUpdater(this); Disposer.register(this, updater); myLocalIgnoredHolder.startRescan(); }
setupUpdater
25,454
VirtualFile () { return myHgDir; }
getHgDir
25,455
State () { return myInfo.getState(); }
getState
25,456
String () { String branchOrBookMarkName = getCurrentBookmark(); if (StringUtil.isEmptyOrSpaces(branchOrBookMarkName)) { branchOrBookMarkName = getCurrentBranch(); } return branchOrBookMarkName; }
getCurrentBranchName
25,457
AbstractVcs () { return myVcs; }
getVcs
25,458
String () { return myInfo.getCurrentBranch(); }
getCurrentBranch
25,459
String () { return myInfo.getCurrentRevision(); }
getCurrentRevision
25,460
String () { return myInfo.getTipRevision(); }
getTipRevision
25,461
Set<String> () { return myOpenedBranches; }
getOpenedBranches
25,462
Collection<HgNameWithHashInfo> () { return myInfo.getBookmarks(); }
getBookmarks
25,463
String () { return myInfo.getCurrentBookmark(); }
getCurrentBookmark
25,464
Collection<HgNameWithHashInfo> () { return myInfo.getTags(); }
getTags
25,465
Collection<HgNameWithHashInfo> () { return myInfo.getLocalTags(); }
getLocalTags
25,466
HgConfig () { return myConfig; }
getRepositoryConfig
25,467
boolean () { return myInfo.hasSubrepos(); }
hasSubrepos
25,468
Collection<HgNameWithHashInfo> () { return myInfo.getSubrepos(); }
getSubrepos
25,469
List<HgNameWithHashInfo> () { return myInfo.getMQApplied(); }
getMQAppliedPatches
25,470
List<String> () { return myInfo.getMqPatchNames(); }
getAllPatchNames
25,471
List<String> () { final List<String> appliedPatches = HgUtil.getNamesWithoutHashes(getMQAppliedPatches()); return ContainerUtil.filter(getAllPatchNames(), s -> !appliedPatches.contains(s)); }
getUnappliedPatchNames
25,472
void () { HgRepoInfo currentInfo = readRepoInfo(); // update only if something changed!!! if update every time - new log will be refreshed every time, too. // Then blinking and do not work properly; final Project project = getProject(); if (!project.isDisposed() && !currentInfo.equals(myInfo)) { myInfo = currentInfo; H...
update
25,473
String () { return "HgRepository " + getRoot() + " : " + myInfo; }
toLogString
25,474
HgRepoInfo () { //in GitRepositoryImpl there are temporary state object for reader fields storing! Todo Check; return new HgRepoInfo(myReader.readCurrentBranch(), myReader.readCurrentRevision(), myReader.readCurrentTipRevision(), myReader.readState(), myReader.readBranches(), myReader.readBookmarks(), myReader.readCurr...
readRepoInfo
25,475
void () { myConfig = HgConfig.getInstance(getProject(), getRoot()); }
updateConfig
25,476
HgLocalIgnoredHolder () { return myLocalIgnoredHolder; }
getIgnoredFilesHolder
25,477
void () { BackgroundTaskUtil.syncPublisher(myProject, VcsManagedFilesHolder.TOPIC).updatingModeChanged(); }
updateStarted
25,478
void (@NotNull Collection<FilePath> ignoredPaths, boolean isFullRescan) { if(myProject.isDisposed()) return; BackgroundTaskUtil.syncPublisher(myProject, VcsManagedFilesHolder.TOPIC).updatingModeChanged(); ChangeListManagerImpl.getInstanceImpl(myProject).notifyUnchangedFileStatusChanged(); }
updateFinished
25,479
HgRepositoryFiles (@NotNull VirtualFile hgDir) { return new HgRepositoryFiles(hgDir); }
getInstance
25,480
String (@NotNull String s) { return "/" + s; }
slash
25,481
Collection<String> () { return Arrays.asList(slash(BRANCHHEADS), slash(MERGE)); }
getSubDirRelativePaths
25,482
String () { return myBranchHeadsDirPath; }
getBranchHeadsDirPath
25,483
String () { return myMQDirPath; }
getMQDirPath
25,484
boolean (String filePath) { return filePath.startsWith(myBranchHeadsPath); }
isbranchHeadsFile
25,485
boolean (String filePath) { return filePath.equals(myBranchPath); }
isBranchFile
25,486
boolean (String filePath) { return filePath.equals(myDirstatePath); }
isDirstateFile
25,487
boolean (String filePath) { return filePath.startsWith(myMergePath); }
isMergeFile
25,488
boolean (String filePath) { return filePath.startsWith(myRebasePath); }
isRebaseFile
25,489
boolean (String filePath) { return filePath.equals(myBookmarksPath); }
isBookmarksFile
25,490
boolean (String filePath) { return filePath.equals(myCurrentBookmarkPath); }
isCurrentBookmarksFile
25,491
boolean (String filePath) { return filePath.equals(myConfigHgrcPath); }
isConfigHgrcFile
25,492
boolean (String filePath) { return filePath.equals(myTagsPath); }
isTagsFile
25,493
boolean (String filePath) { return filePath.equals(myLocalTagsPath); }
isLocalTagsFile
25,494
boolean (String filePath) { return filePath.startsWith(myMQDirPath); }
isMqFile
25,495
boolean (String filePath) { return filePath.equals(myHgIgnorePath); }
isHgIgnore
25,496
void () { if (myWatchRequest != null) { LocalFileSystem.getInstance().removeWatchedRoot(myWatchRequest); } myUpdateQueue.cancelAllUpdates(); myUpdateConfigQueue.cancelAllUpdates(); if (myMessageBusConnection != null) { myMessageBusConnection.disconnect(); } }
dispose
25,497
void (@NotNull List<? extends @NotNull VFileEvent> events) { // which files in .hg were changed boolean branchHeadsChanged = false; boolean branchFileChanged = false; boolean dirstateFileChanged = false; boolean mergeFileChanged = false; boolean rebaseFileChanged = false; boolean bookmarksFileChanged = false; boolean t...
after
25,498
void () { myRepository.updateConfig(); }
run
25,499
boolean (@NotNull Update update) { return true; }
canEat