Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
65,900
void () { }
checkoutCompleted
65,901
void (File wc1, String expectedText) { assertTrue(wc1.isDirectory()); final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wc1); final UpdatedFiles files = UpdatedFiles.create(); final UpdateSession session = vcs.getUpdateEnvironment().updateDirectories(new FilePath[]{VcsUtil.getFilePath(vf)}...
updateExpectAuthCanceled
65,902
void (File wc1) { assertTrue(wc1.isDirectory()); final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wc1); final UpdatedFiles files = UpdatedFiles.create(); final UpdateSession session = vcs.getUpdateEnvironment().updateDirectories(new FilePath[]{VcsUtil.getFilePath(vf)}, files, new EmptyPro...
updateSimple
65,903
String () { return getPluginHomePath("svn4idea"); }
getPluginHome
65,904
void () { if (IS_UNDER_TEAMCITY) { assumeTrue(SystemInfo.OS_NAME + '/' + CpuArch.CURRENT + " is not supported", !SystemInfo.isMac && CpuArch.isIntel64()); } }
assumeSupportedTeamCityAgentArch
65,905
File () { File svnBinDir = new File(myPluginRoot, getTestDataDir() + "/svn/bin"); String executablePath = SystemInfo.isWindows ? "windows/svn.exe" : SystemInfo.isLinux ? "linux/svn" : SystemInfo.isMac ? "mac/svn" : null; assertNotNull("No Subversion executable was found " + SystemInfo.OS_NAME, executablePath); File svn...
getSvnClientDirectory
65,906
void () { CountDownLatch done = new CountDownLatch(1); vcs.getSvnFileUrlMappingImpl().scheduleRefresh(() -> done.countDown()); RunAll.runAll(() -> done.await()); }
refreshSvnMappingsSynchronously
65,907
void () { dirtyScopeManager.markEverythingDirty(); changeListManager.ensureUpToDate(); }
refreshChanges
65,908
void () { changeListManager.ensureUpToDate(); ((VcsAnnotationLocalChangesListenerImpl)vcsManager.getAnnotationLocalChangesListener()).calmDown(); }
waitChangesAndAnnotations
65,909
Set<String> (@NotNull List<Change> changes, @NotNull String message) { Set<String> feedback = new HashSet<>(); throwIfNotEmpty(vcs.getCheckinEnvironment().commit(changes, message, new CommitContext(), feedback)); return feedback; }
commit
65,910
void (@NotNull List<Change> changes) { List<VcsException> exceptions = new ArrayList<>(); vcs.createRollbackEnvironment().rollbackChanges(changes, exceptions, RollbackProgressListener.EMPTY); throwIfNotEmpty(exceptions); }
rollback
65,911
void () { SvnApplicationSettings.getInstance().setCommandLinePath(myClientBinaryPath + File.separator + "svn"); }
projectCreated
65,912
void () { if (changeListManager != null) { changeListManager.waitEverythingDoneInTestMode(); } }
tearDownChangeListManager
65,913
void (final VcsConfiguration.StandardConfirmation op) { setStandardConfirmation(SvnVcs.VCS_NAME, op, VcsShowConfirmationOption.Value.DO_ACTION_SILENTLY); }
enableSilentOperation
65,914
void (final VcsConfiguration.StandardConfirmation op) { setStandardConfirmation(SvnVcs.VCS_NAME, op, VcsShowConfirmationOption.Value.DO_NOTHING_SILENTLY); }
disableSilentOperation
65,915
void () { undo("VcsTestUtil MoveFile"); }
undoFileMove
65,916
void () { undo("VcsTestUtil RenameFile"); }
undoFileRename
65,917
void () { undo(null); }
undo
65,918
void (@Nullable String expectedCommandName) { runInEdtAndWait(() -> { final TestDialog oldTestDialog = TestDialogManager.setTestDialog(TestDialog.OK); try { UndoManager undoManager = UndoManager.getInstance(myProject); assertTrue("undo is not available", undoManager.isUndoAvailable(null)); if (expectedCommandName != nu...
undo
65,919
String () { return myTestDataDir; }
getTestDataDir
65,920
VirtualFile (final VirtualFile parent, final String name, final String content, boolean create) { final VirtualFile result = parent.findChild(name); if (result != null || !create) return result; return content == null ? createDirInCommand(parent, name) : createFileInCommand(parent, name, content); }
findChild
65,921
void (boolean create) { myRootDir = findChild(myBase, "root", null, create); mySourceDir = findChild(myRootDir, "source", null, create); myS1File = findChild(mySourceDir, "s1.txt", ourS1Contents, create); myS2File = findChild(mySourceDir, "s2.txt", ourS2Contents, create); myTargetDir = findChild(myRootDir, "target", nu...
refresh
65,922
VcsDirectoryMapping (@NotNull File directory) { return new VcsDirectoryMapping(toSystemIndependentName(directory.getPath()), vcs.getName()); }
createDirectoryMapping
65,923
void () { vcsManager.getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false); final CommonUpdateProjectAction action = new CommonUpdateProjectAction(); action.getTemplatePresentation().setText("1"); action .actionPerformed(new AnActionEvent(null, SimpleDataContext.getProjectContext(myProject), "test", new Pr...
imitUpdate
65,924
Processor<ProcessOutput> () { return output -> { assertEquals(output.getStderr(), 0, output.getExitCode()); return false; }; }
createPrimitiveExitCodeVerifier
65,925
WCInfo () { WCInfo found = null; final File workingIoFile = virtualToIoFile(myWorkingCopyDir); final List<WCInfo> infos = vcs.getAllWcInfos(); for (WCInfo info : infos) { if (FileUtil.filesEqual(workingIoFile, new File(info.getPath()))) { found = info; break; } } assertNotNull(found); return found; }
getWcInfo
65,926
Result (@NotNull VirtualFile file) { if (!myTheirsDir.equals(file) && file.isDirectory() && file.getChildren().length == 0) { try { myClientRunner.delete(myTheirsDir, file.getPath()); } catch (IOException e) { throw new VisitorException(e); } } return file.isDirectory() && SvnUtil.isAdminDirectory(file) ? SKIP_CHILDREN...
visitFileEx
65,927
Collection<Object[]> () { return StreamEx.of(FileToFile.class, DirToDir.class, DirToFile.class, FileToDir.class) .flatMap(aClass -> Stream.of(aClass.getDeclaredFields())) .filter(field -> Modifier.isStatic(field.getModifiers())) // DirToDir.MINE_EDIT_THEIRS_DELETE - no more a conflict since 1.7.7 .filter(field -> getSt...
data
65,928
void () { assertNull(createTestFailedComment(conflictFile.getPath()) + " tree conflict resolved", SvnUtil.getStatus(vcs, conflictFile.getIOFile()).getTreeConflict()); for (TreeConflictData.FileData file : conflictData.getLeftFiles()) { File exFile = new File(myWorkingCopyDir.getPath(), file.myRelativePath); final Statu...
checkStatusesAfterMineFullResolve
65,929
String (final String path) { return "File: " + path + " in: " + myWorkingCopyDir.getPath(); }
createTestFailedComment
65,930
Object (Field field) { try { return field.get(null); } catch (IllegalAccessException e) { throw new RuntimeException(e); } }
getStaticFieldValue
65,931
void (@NotNull VirtualFile file, final long number) { final VcsRevisionDescription revision = ((SvnDiffProvider)vcs.getDiffProvider()).getCurrentRevisionDescription(file); assertEquals(number, ((SvnRevisionNumber)revision.getRevisionNumber()).getLongRevisionNumber()); }
assertRevision
65,932
void () { List<RootUrlInfo> infos = vcs.getSvnFileUrlMapping().getAllWcInfos(); Url[] urls = ar(myAnotherRepoUrl != null ? parseUrl(myAnotherRepoUrl + "/root/target", false) : myExternalURL, myMainUrl); assertThat(map(infos, RootUrlInfo::getUrl), containsInAnyOrder(urls)); }
assertWorkingCopies
65,933
void () { final File sourceFile = new File(myWorkingCopyDir.getPath(), "source" + File.separator + "s1.txt"); final File externalFile = new File(myWorkingCopyDir.getPath(), "source" + File.separator + "external" + File.separator + "t12.txt"); final LocalFileSystem lfs = LocalFileSystem.getInstance(); final VirtualFile ...
simpleExternalStatusImpl
65,934
void () { imitUpdate(); final File sourceDir = new File(myWorkingCopyDir.getPath(), "source"); final File externalFile = new File(sourceDir, "external/t11.txt"); final VirtualFile externalVf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(externalFile); assertNotNull(externalVf); }
updatedCreatedExternalFromIDEAImpl
65,935
void () { final File sourceDir = new File(myWorkingCopyDir.getPath(), "source"); final File externalFile = new File(sourceDir, "external/t11.txt"); final VirtualFile externalVf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(externalFile); assertNotNull(externalVf); editFileInCommand(externalVf, "some new co...
uncommittedExternalStatusImpl
65,936
void () { imitUpdate(); refreshSvnMappingsSynchronously(); assertWorkingCopies(); }
uncommittedExternalCopyIsDetectedImpl
65,937
void () { assertThat(changeListManager.getChangesIn(myWorkingCopyDir), is(empty())); }
assertNoChanges
65,938
void (int count) { assertThat(changeListManager.getChangesIn(myWorkingCopyDir), hasSize(count)); }
assertChanges
65,939
void (@NotNull VirtualFile file, @NotNull FileStatus status) { assertEquals(status, changeListManager.getStatus(file)); }
assertStatus
65,940
QuickMergeContentsVariants () { return myMergeVariant; }
selectMergeVariant
65,941
void (@NotNull QuickMergeContentsVariants mergeVariant) { myMergeVariant = mergeVariant; }
setMergeVariant
65,942
boolean () { return false; }
shouldContinueSwitchedRootFound
65,943
boolean (@NotNull Url targetUrl) { return myReintegrateAnswer; }
shouldReintegrate
65,944
SelectMergeItemsResult (@NotNull List<SvnChangeList> lists, @NotNull MergeChecker mergeChecker, boolean allStatusesCalculated, boolean allListsLoaded) { return new SelectMergeItemsResult( mySelectedListsProvider != null ? QuickMergeContentsVariants.select : QuickMergeContentsVariants.all, mySelectedListsProvider != nul...
selectMergeItems
65,945
LocalChangesAction (boolean mergeAll) { return LocalChangesAction.continueMerge; }
selectLocalChangesAction
65,946
void (@NotNull List<FilePath> paths) { }
showIntersectedLocalPaths
65,947
void (@NotNull String message, @NotNull List<VcsException> exceptions) { if (!isEmpty(exceptions)) { myExceptions.addAll(exceptions); } else { myExceptions.add(new RuntimeException(message)); } }
showErrors
65,948
void (@NotNull String message, boolean isError) { if (isError) { myExceptions.add(new RuntimeException(message)); } else { System.out.println("merge warning: " + message); } }
showErrors
65,949
void () { refreshChanges(); // first time new changes are detected and added to _IDEA_ changeslist changeListManager.ensureUpToDate(); // and on the same thread a request is put for files addition; // so stay here for 2nd cycle and wait for native addition completion }
ensureAddedToNativeList
65,950
AcceptResult (Url url, String realm, Object certificate, boolean canCache) { return AcceptResult.ACCEPTED_PERMANENTLY; }
acceptServerAuthentication
65,951
void (VcsFileRevision revision) { super.acceptRevision(revision); if(getSession().getRevisionList().size() > 1) { throw new ProcessCanceledException(); } }
acceptRevision
65,952
void (File wc1, final File created) { assertTrue(wc1.isDirectory()); final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wc1); final UpdatedFiles files = UpdatedFiles.create(); final UpdateSession session = vcs.getUpdateEnvironment().updateDirectories(new FilePath[]{VcsUtil.getFilePath(vf)},...
testUpdateImpl
65,953
void (File directory, VcsKey vcs) { }
directoryCheckedOut
65,954
void () { }
checkoutCompleted
65,955
void (VirtualFile current, final String name) { final VirtualFile file = createFileInCommand(current, name, "123"); testImpl(file); }
testOneFile
65,956
void (VirtualFile file) { refreshChanges(); assertNoChanges(); dirtyScopeManager.fileDirty(file); changeListManager.ensureUpToDate(); assertNoChanges(); final FileStatus status = changeListManager.getStatus(file); assertEquals(FileStatus.IGNORED, status); }
testImpl
65,957
void () { assertThat(changeListManager.getDefaultChangeList().getChanges(), is(empty())); }
assertNoChanges
65,958
void (boolean saveData) { mySaveData = saveData; }
setSaveData
65,959
AcceptResult (Url url, String realm, Object certificate, boolean canCache) { return AcceptResult.REJECTED; }
acceptServerAuthentication
65,960
void (final String kind, final Convertor<Url, AuthenticationData> authentication) { myData.put(kind, authentication); }
addAuthentication
65,961
AuthenticationData (String kind, Url url, String realm, boolean canCache) { canCache = canCache && mySaveData; Convertor<Url, AuthenticationData> convertor = myData.get(kind); AuthenticationData result = convertor == null ? null : convertor.convert(url); if (result == null) { if (SvnAuthenticationManager.PASSWORD.equal...
requestClientAuthentication
65,962
void () { setExcludeFromToTheirsCheck("root/source/s1.txt"); }
afterInit
65,963
void () { setExcludeFromToTheirsCheck("root/source", "root/source/s1.txt", "root/source/s2.txt"); }
afterInit
65,964
void () { setExcludeFromToTheirsCheck("root/source/s1.txt"); }
afterInit
65,965
void () { setExcludeFromToTheirsCheck("root/source", "root/source/s1.txt", "root/source/s2.txt"); }
afterInit
65,966
void () { }
afterInit
65,967
String () { return myConflictFile; }
getConflictFile
65,968
boolean (@SystemIndependent String path) { return myExcludeFromToTheirsCheck.contains(path); }
isExcludedFromToTheirsCheck
65,969
void (@SystemIndependent String @NotNull ... excludeFromToTheirsCheck) { myExcludeFromToTheirsCheck.clear(); myExcludeFromToTheirsCheck.addAll(asList(excludeFromToTheirsCheck)); }
setExcludeFromToTheirsCheck
65,970
void (VcsAbstractHistorySession session) { }
reportCreatedEmptySession
65,971
void (VcsFileRevision revision) { count.incrementAndGet(); if (firstOnly) { semaphore.up(); } }
acceptRevision
65,972
void (VcsException exception) { throw new RuntimeException(exception); }
reportException
65,973
void () { if (!firstOnly) { semaphore.up(); } }
finished
65,974
void () { final SubTree subTree = new SubTree(myWorkingCopyDir); refreshChanges(); final List<VirtualFile> files = getAllFiles(subTree); checkFilesAreInList(toVirtualFileArray(files), changeListManager.getDefaultListName(), changeListManager); final Collection<Change> changes = changeListManager.getDefaultChangeList()....
testAddDirEditFileAndAfterRevert
65,975
List<VirtualFile> (final SubTree subTree) { final List<VirtualFile> files = new ArrayList<>(); files.addAll(Arrays.asList(subTree.myRootDir, subTree.mySourceDir, subTree.myS2File, subTree.myS1File, subTree.myTargetDir)); files.addAll(subTree.myTargetFiles); return files; }
getAllFiles
65,976
VirtualFile (final VirtualFile parent, final String name) { final VirtualFile[] files = parent.getChildren(); for (VirtualFile file : files) { if (name.equals(file.getName())) return file; } System.out.println("not found as child"); assertNotNull(LocalFileSystem.getInstance().findFileByIoFile(new File(parent.getPath(),...
assertVF
65,977
void (@Nullable CopyData point, long sourceRevision, long targetRevision, boolean isTrunkFromBranch) { assertNotNull(point); assertEquals(sourceRevision, point.getCopySourceRevision()); assertEquals(targetRevision, point.getCopyTargetRevision()); assertEquals(isTrunkFromBranch, point.isTrunkSupposedCorrect()); }
assertBranchPoint
65,978
void () { ServerUnavailableCallback callback = new ServerUnavailableCallback(new AuthenticationService(vcs, true), myRepositoryUrl); StreamEx<String[]> error2Exception = StreamEx.of(SVN_ERRORS).append(StreamEx.of(UsernamePasswordCallbackTest.AUTH_ERRORS).map(e -> new String[]{e, null})); for (String[] pair : error2Exce...
testCanHandle
65,979
void () { UsernamePasswordCallback callback = new UsernamePasswordCallback(new AuthenticationService(vcs, true), myRepositoryUrl); for (String error : AUTH_ERRORS) { assertTrue(error, callback.canHandle(error)); } }
testCanHandle
65,980
SvnContentRevision (@NotNull SvnVcs vcs, @NotNull FilePath file, @NotNull Status status) { Revision revision = status.getRevision().isValid() ? status.getRevision() : status.getCommitInfo().getRevision(); return createBaseRevision(vcs, file, revision); }
createBaseRevision
65,981
SvnContentRevision (@NotNull SvnVcs vcs, @NotNull FilePath file, @NotNull Revision revision) { if (file.getFileType().isBinary()) { return new SvnBinaryContentRevision(vcs, file, revision, true); } return new SvnContentRevision(vcs, file, revision, true); }
createBaseRevision
65,982
SvnContentRevision (@NotNull SvnVcs vcs, @NotNull FilePath file, @NotNull Revision revision) { if (file.getFileType().isBinary()) { return new SvnBinaryContentRevision(vcs, file, revision, false); } return new SvnContentRevision(vcs, file, revision, false); }
createRemote
65,983
VcsRevisionNumber () { return getRevisionNumber(); }
getCurrentRevision
65,984
VcsRevisionNumber () { return new SvnRevisionNumber(myRevision); }
getRevisionNumber
65,985
String () { return myFile.getPath(); }
toString
65,986
String () { return myRevision.toString(); }
asString
65,987
long () { return myRevision.getNumber(); }
getLongRevisionNumber
65,988
int (VcsRevisionNumber vcsRevisionNumber) { if (vcsRevisionNumber == null || vcsRevisionNumber.getClass() != SvnRevisionNumber.class) { return -1; } Revision rev = ((SvnRevisionNumber)vcsRevisionNumber).myRevision; if (myRevision.getNumber() >= 0 && rev.getNumber() >= 0) { return java.lang.Long.compare(myRevision.getNu...
compareTo
65,989
Revision () { return myRevision; }
getRevision
65,990
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final SvnRevisionNumber that = (SvnRevisionNumber)o; return myRevision.equals(that.myRevision); }
equals
65,991
int () { return myRevision.hashCode(); }
hashCode
65,992
String () { return myRevision.toString(); }
toString
65,993
void (@NotNull Task.Backgroundable task, @NotNull ModalityState modalityState, @Nullable ProgressIndicator indicator) { throw new UnsupportedOperationException(); }
run
65,994
void (@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); try { task.consume(indicator); } catch (VcsException e) { addError(e); if (!e.isWarning()) { indicator.cancel(); } } }
run
65,995
void () { end(); }
onCancel
65,996
void (@NotNull Throwable e) { LOG.error(e); end(); }
onThrowable
65,997
void () { continuation.run(); }
onFinished
65,998
void (@NotNull ThrowableRunnable<VcsException> task) { myProcessor.add(continuation -> { boolean isSuccess = false; try { task.run(); isSuccess = true; } catch (VcsException e) { addError(e); isSuccess = e.isWarning(); } finally { if (!isSuccess) { end(); } continuation.run(); } }); }
runInEdt
65,999
void (@NotNull VcsException e) { myExceptions.add(e); }
addError