Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
25,200 | void () { HgShowUnAppliedPatchesAction.showUnAppliedPatches(project, repository); } | onSuccess |
25,201 | void (@NotNull HgRepository repository, @NotNull Hash commit) { throw new UnsupportedOperationException(); } | actionPerformed |
25,202 | void (@NotNull AnActionEvent e) { final Project project = e.getRequiredData(CommonDataKeys.PROJECT); VcsLogCommitSelection selection = e.getRequiredData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); selection.requestFullDetails(selectedDetails -> { VcsFullCommitDetails fullCommitDetails = ContainerUtil.getFirstItem(selecte... | actionPerformed |
25,203 | boolean (@NotNull HgRepository repository, @NotNull Hash commit) { return super.isEnabled(repository, commit) && isAppliedPatch(repository, commit); } | isEnabled |
25,204 | boolean (@NotNull HgRepository repository, final @NotNull Hash hash) { return ContainerUtil.exists(repository.getMQAppliedPatches(), info -> info.getHash().equals(hash)); } | isAppliedPatch |
25,205 | void (@NotNull HgRepository repository, @NotNull Hash commit) { new HgQRenameCommand(repository).execute(commit); } | actionPerformed |
25,206 | void (@NotNull HgRepository repository, @NotNull Hash commit) { String revisionHash = commit.asString(); new HgQImportCommand(repository).execute(revisionHash); } | actionPerformed |
25,207 | boolean (@NotNull HgRepository repository, @NotNull Hash commit) { return super.isEnabled(repository, commit) && !HgMqAppliedPatchAction.isAppliedPatch(repository, commit); } | isEnabled |
25,208 | void (@NotNull HgRepository repository, @NotNull Hash commit) { String revision = commit.asString(); Project project = repository.getProject(); BackgroundTaskUtil.executeOnPooledThread(repository, () -> { HgCommandExecutor executor = new HgCommandExecutor(project); HgCommandResult result = executor.executeInCurrentThre... | actionPerformed |
25,209 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
25,210 | void (@NotNull AnActionEvent e) { final HgMqUnAppliedPatchesPanel patchInfo = e.getRequiredData(HgMqUnAppliedPatchesPanel.MQ_PATCHES); final List<String> names = patchInfo.getSelectedPatchNames(); final HgRepository repository = patchInfo.getRepository(); Runnable task = () -> { ProgressManager.getInstance().getProgres... | actionPerformed |
25,211 | void (@NotNull AnActionEvent e) { HgMqUnAppliedPatchesPanel patchInfo = e.getData(HgMqUnAppliedPatchesPanel.MQ_PATCHES); e.getPresentation().setEnabled(patchInfo != null && patchInfo.getSelectedRowsCount() != 0 && isEnabled(patchInfo.getRepository())); } | update |
25,212 | boolean (@NotNull HgRepository repository) { return true; //todo should be improved, param not needed } | isEnabled |
25,213 | Set<String> (@Nullable String fileListString, @NotNull String separator) { return StringUtil.isEmpty(fileListString) ? Collections.emptySet() : new HashSet<>(StringUtil.split(fileListString, separator)); } | parseFileList |
25,214 | int (@NotNull String str) { int len = str.length(); int depth = 1; for (int i = 0; i < len; ++i) { char c = str.charAt(i); switch (c) { case '(' -> depth++; case ')' -> depth--; } if (depth == 0) { return i + 1; } } LOG.info("Unexpected output during parse copied files in log command " + str); return -1; } | findRightBracePosition |
25,215 | List<VcsCommitMetadata> (final @NotNull Project project, final @NotNull VirtualFile root, int limit, @NotNull List<String> parameters) { final VcsLogObjectsFactory factory = getObjectsFactoryWithDisposeCheck(project); if (factory == null) { return Collections.emptyList(); } HgVcs hgvcs = HgVcs.getInstance(project); ass... | loadMetadata |
25,216 | VcsFullCommitDetails (@NotNull Project project, @NotNull VirtualFile root, @NotNull VcsLogObjectsFactory factory, @NotNull HgFileRevision revision) { List<List<VcsFileStatusInfo>> reportedChanges = new ArrayList<>(); reportedChanges.add(getStatusInfo(revision)); HgRevisionNumber vcsRevisionNumber = revision.getRevision... | createDetails |
25,217 | List<VcsFileStatusInfo> (@NotNull Project project, @NotNull VirtualFile root, @NotNull HgRevisionNumber commit, @NotNull HgRevisionNumber parent) { HgStatusCommand status = new HgStatusCommand.Builder(true).ignored(false).unknown(false).copySource(true) .baseRevision(parent).targetRevision(commit).build(project); retur... | getChangesFromParent |
25,218 | List<VcsFileStatusInfo> (@NotNull HgFileRevision revision) { List<VcsFileStatusInfo> firstParentChanges = new ArrayList<>(); for (String file : revision.getModifiedFiles()) { firstParentChanges.add(new VcsFileStatusInfo(Change.Type.MODIFICATION, file, null)); } for (String file : revision.getAddedFiles()) { firstParent... | getStatusInfo |
25,219 | List<VcsFileStatusInfo> (@NotNull Set<HgChange> changes) { Set<String> deleted = new HashSet<>(); Set<String> copied = new HashSet<>(); for (HgChange change : changes) { Change.Type type = getType(change.getStatus()); if (Change.Type.DELETED.equals(type)) { deleted.add(change.beforeFile().getRelativePath()); } else if ... | convertHgChanges |
25,220 | HgFile (@NotNull Project project, @NotNull VirtualFile root) { HgFile hgFile = new HgFile(root, VcsUtil.getFilePath(root.getPath())); if (project.isDisposed()) { return hgFile; } FilePath originalFileName = HgUtil.getOriginalFileName(hgFile.toFilePath(), ChangeListManager.getInstance(project)); return new HgFile(hgFile... | getOriginalHgFile |
25,221 | HgBaseLogParser<VcsCommitMetadata> (@NotNull VirtualFile root, VcsLogObjectsFactory factory) { return new HgBaseLogParser<>() { @Override protected VcsCommitMetadata convertDetails(@NotNull String rev, @NotNull String changeset, @NotNull SmartList<? extends HgRevisionNumber> parents, @NotNull Date revisionDate, @NotNul... | createMetadataParser |
25,222 | VcsCommitMetadata (@NotNull String rev, @NotNull String changeset, @NotNull SmartList<? extends HgRevisionNumber> parents, @NotNull Date revisionDate, @NotNull String author, @NotNull String email, @NotNull List<String> attributes) { String message = parseAdditionalStringAttribute(attributes, MESSAGE_INDEX); String sub... | convertDetails |
25,223 | List<TimedVcsCommit> (@NotNull Project project, @NotNull VirtualFile root, @NotNull Consumer<? super VcsUser> userRegistry, @NotNull List<String> params) { return readHashes(project, root, userRegistry, -1, params); } | readAllHashes |
25,224 | List<TimedVcsCommit> (@NotNull Project project, @NotNull VirtualFile root, @NotNull Consumer<? super VcsUser> userRegistry, int limit, @NotNull List<String> params) { final VcsLogObjectsFactory factory = getObjectsFactoryWithDisposeCheck(project); if (factory == null) { return Collections.emptyList(); } HgVcs hgvcs = H... | readHashes |
25,225 | TimedVcsCommit (@NotNull String rev, @NotNull String changeset, @NotNull SmartList<? extends HgRevisionNumber> parents, @NotNull Date revisionDate, @NotNull String author, @NotNull String email, @NotNull List<String> attributes) { List<Hash> parentsHash = new SmartList<>(); for (HgRevisionNumber parent : parents) { par... | convertDetails |
25,226 | Change (@NotNull Project project, @NotNull VirtualFile root, @Nullable String fileBefore, @Nullable HgRevisionNumber revisionBefore, @Nullable String fileAfter, HgRevisionNumber revisionAfter, FileStatus aStatus) { HgContentRevision beforeRevision = fileBefore == null || aStatus == FileStatus.ADDED ? null : HgContentRe... | createChange |
25,227 | List<String> (@NotNull List<String> hashes) { List<String> hashArgs = new ArrayList<>(); for (String hash : hashes) { hashArgs.add("-r"); hashArgs.add(hash); } return hashArgs; } | prepareHashes |
25,228 | String (String paramName, String value) { return "--" + paramName + "=" + value; // no value escaping needed, because the parameter itself will be quoted by GeneralCommandLine } | prepareParameter |
25,229 | void (@NotNull String line) { int separatorIndex; while ((separatorIndex = line.indexOf(HgChangesetUtil.CHANGESET_SEPARATOR)) >= 0) { myOutput.append(line, 0, separatorIndex); myConsumer.consume(myOutput); myOutput.setLength(0); // maybe also call myOutput.trimToSize() to free some memory ? line = line.substring(separa... | processOutputLine |
25,230 | List<Change> (@NotNull Project project, @NotNull VcsShortCommitDetails commit, @NotNull List<VcsFileStatusInfo> changes, int parentIndex) { List<Change> result = new ArrayList<>(); for (VcsFileStatusInfo info : changes) { String filePath = info.getFirstPath(); HgRevisionNumber parentRevision = myRevisionNumber.getParen... | parseStatusInfo |
25,231 | Comparator<VcsRef> () { return REF_COMPARATOR; } | getLabelsOrderComparator |
25,232 | List<RefGroup> (@NotNull Collection<? extends VcsRef> refs) { List<VcsRef> sortedRefs = sort(refs); MultiMap<VcsRefType, VcsRef> groupedRefs = ContainerUtil.groupBy(sortedRefs, VcsRef::getType); List<RefGroup> result = new ArrayList<>(); List<VcsRef> branches = new ArrayList<>(); List<VcsRef> bookmarks = new ArrayList<... | groupForBranchFilter |
25,233 | List<RefGroup> (@NotNull Collection<? extends VcsRef> references, boolean compact, boolean showTagNames) { List<VcsRef> sortedReferences = sort(references); List<VcsRef> headAndTip = new ArrayList<>(); MultiMap<VcsRefType, VcsRef> groupedRefs = MultiMap.createLinked(); for (VcsRef ref : sortedReferences) { if (ref.getT... | groupForTable |
25,234 | HgBranchType (@NotNull VcsRef reference) { return reference.getType().equals(BOOKMARK) ? HgBranchType.BOOKMARK : HgBranchType.BRANCH; } | getBranchType |
25,235 | boolean (@NotNull VcsRef reference) { if (reference.getType().equals(HEAD) || reference.getType().equals(TIP)) return true; if (!reference.getType().isBranch()) return false; return myProject.getService(HgBranchManager.class) .isFavorite(getBranchType(reference), getRepository(reference), reference.getName()); } | isFavorite |
25,236 | void (@NotNull VcsRef reference, boolean favorite) { if (!reference.getType().isBranch() || reference.getType().equals(HEAD) || reference.getType().equals(TIP)) return; myProject.getService(HgBranchManager.class) .setFavorite(getBranchType(reference), getRepository(reference), reference.getName(), favorite); } | setFavorite |
25,237 | Comparator<VcsRef> () { return REF_COMPARATOR; } | getBranchLayoutComparator |
25,238 | List<VcsRef> (@NotNull Collection<? extends VcsRef> refs) { return ContainerUtil.sorted(refs, getLabelsOrderComparator()); } | sort |
25,239 | Set<VcsRef> (@NotNull VirtualFile root) { if (myProject.isDisposed()) { return Collections.emptySet(); } HgRepository repository = getHgRepoManager(myProject).getRepositoryForRoot(root); if (repository == null) { LOG.error("Repository not found for root " + root); return Collections.emptySet(); } repository.update(); M... | readAllRefs |
25,240 | VcsKey () { return HgVcs.getKey(); } | getSupportedVcs |
25,241 | VcsLogRefManager () { return myRefSorter; } | getReferenceManager |
25,242 | Disposable (final @NotNull Collection<? extends VirtualFile> roots, final @NotNull VcsLogRefresher refresher) { MessageBusConnection connection = myProject.getMessageBus().connect(); connection.subscribe(HgVcs.STATUS_TOPIC, new HgUpdater() { @Override public void update(Project project, @Nullable VirtualFile root) { if... | subscribeToRootRefreshEvents |
25,243 | void (Project project, @Nullable VirtualFile root) { if (root != null && roots.contains(root)) { refresher.refresh(root); } } | update |
25,244 | List<TimedVcsCommit> (final @NotNull VirtualFile root, @NotNull VcsLogFilterCollection filterCollection, int maxCount) { List<String> filterParameters = new ArrayList<>(); // branch filter and user filter may be used several times without delimiter VcsLogBranchFilter branchFilter = filterCollection.get(VcsLogFilterColl... | getCommitsMatchingFilter |
25,245 | HgRepositoryManager (@NotNull Project project) { return project.getService(HgRepositoryManager.class); } | getHgRepoManager |
25,246 | CommitT (String s) { return convert(s); } | fun |
25,247 | List<String> (HgVersion currentVersion) { List<String> templates = new ArrayList<>(); templates.add("{rev}"); templates.add("{node}"); if (currentVersion.isParentRevisionTemplateSupported()) { templates.add("{p1rev}:{p1node} {p2rev}:{p2node}"); } else { templates.add("{parents}"); } templates.addAll(Arrays.asList("{dat... | constructDefaultTemplate |
25,248 | List<String> (@NotNull List<String> fileTemplates, @NotNull HgVersion currentVersion) { final boolean supported = currentVersion.isBuiltInFunctionSupported(); return ContainerUtil.map(fileTemplates, s -> supported ? "{join(" + s + ",'" + HgChangesetUtil.FILE_SEPARATOR + "')}" : "{" + s + "}"); } | wrapIn |
25,249 | SmartList<HgRevisionNumber> (@NotNull String parentsString, @NotNull String currentRevisionString) { SmartList<HgRevisionNumber> parents = new SmartList<>(); if (StringUtil.isEmptyOrSpaces(parentsString)) { // parents shouldn't be empty only if not supported long revision = Long.parseLong(currentRevisionString); HgRevi... | parseParentRevisions |
25,250 | String (final List<String> attributes, int index) { int numAttributes = attributes.size(); if (numAttributes > index) { return attributes.get(index); } LOG.warn("Couldn't parse hg log commit info attribute " + index); return ""; } | parseAdditionalStringAttribute |
25,251 | String (@NotNull String message) { int subjectIndex = message.indexOf('\n'); return subjectIndex == -1 ? message : message.substring(0, subjectIndex); } | extractSubject |
25,252 | VcsKey () { return HgVcs.getKey(); } | getSupportedVcs |
25,253 | void (final @NotNull List<? extends VcsFullCommitDetails> commits) { Map<HgRepository, List<VcsFullCommitDetails>> commitsInRoots = DvcsUtil.groupCommitsByRoots( HgUtil.getRepositoryManager(myProject), commits); for (Map.Entry<HgRepository, List<VcsFullCommitDetails>> entry : commitsInRoots.entrySet()) { processGraftin... | cherryPick |
25,254 | void (@NotNull HgRepository repository, @NotNull List<String> hashes) { Project project = repository.getProject(); VirtualFile root = repository.getRoot(); HgGraftCommand command = new HgGraftCommand(project, repository); HgCommandResult result = command.startGrafting(hashes); boolean hasConflicts = HgConflictResolver.... | processGrafting |
25,255 | boolean (@NotNull Collection<? extends VirtualFile> roots) { HgRepositoryManager hgRepositoryManager = HgUtil.getRepositoryManager(myProject); return roots.stream().allMatch(r -> hgRepositoryManager.getRepositoryForRootQuick(r) != null); } | canHandleForRoots |
25,256 | void (@NotNull DocumentEvent e) { validateFields(); } | textChanged |
25,257 | String () { return tagTxt.getText(); } | getTagName |
25,258 | VirtualFile () { return hgRepositorySelectorComponent.getRepository().getRoot(); } | getRepository |
25,259 | void (@NotNull Collection<HgRepository> repositories, @Nullable HgRepository selectedRepo) { hgRepositorySelectorComponent.setRoots(repositories); hgRepositorySelectorComponent.setSelectedRoot(selectedRepo); } | setRoots |
25,260 | JComponent () { return contentPanel; } | createCenterPanel |
25,261 | void () { HgReferenceValidator validator = new HgBranchReferenceValidator(hgRepositorySelectorComponent.getRepository()); String name = getTagName(); if (!validator.checkInput(name)) { String message = validator.getErrorText(name); setErrorText(message == null ? HgBundle.message("action.hg4idea.tag.name.error") : messa... | validateFields |
25,262 | JComponent () { return tagTxt; } | getPreferredFocusedComponent |
25,263 | JComponent () { return myContentPanel; } | getContentPanel |
25,264 | void () { myCommitAfterMergeCheckBox.setEnabled(myMergeRadioButton.isSelected()); } | updateEnabledStates |
25,265 | void (@NotNull HgUpdateConfigurationSettings updateConfiguration) { updateConfiguration.setShouldPull(myPullCheckBox.isSelected()); if (myOnlyUpdateButton.isSelected()) { updateConfiguration.setUpdateType(HgUpdateType.ONLY_UPDATE); } if (myMergeRadioButton.isSelected()) { updateConfiguration.setUpdateType(HgUpdateType.... | applyTo |
25,266 | JComponent () { String panelConstraints = "flowy, ins 0 0 0 10, fill"; MigLayout migLayout = new MigLayout(panelConstraints); JPanel contentPane = new JPanel(migLayout); myPullCheckBox = new JBCheckBox(HgBundle.message("action.hg4idea.pull.p"), true); myPullCheckBox.setToolTipText(HgBundle.message("action.hg4idea.pull.... | createCenterPanel |
25,267 | void (ItemEvent e) { updateEnabledStates(); } | itemStateChanged |
25,268 | void (@NotNull HgUpdateConfigurationSettings updateConfiguration) { myPullCheckBox.setSelected(updateConfiguration.shouldPull()); HgUpdateType updateType = updateConfiguration.getUpdateType(); JRadioButton button = switch (updateType) { case ONLY_UPDATE -> myOnlyUpdateButton; case MERGE -> myMergeRadioButton; case REBA... | updateFrom |
25,269 | JComponent () { return myBookmarkName; } | getPreferredFocusedComponent |
25,270 | String () { return HgBookmarkDialog.class.getName(); } | getDimensionServiceKey |
25,271 | JComponent () { JPanel contentPanel = new JPanel(new GridBagLayout()); GridBag g = new GridBag() .setDefaultInsets(new Insets(0, 0, DEFAULT_VGAP, DEFAULT_HGAP)) .setDefaultAnchor(GridBagConstraints.LINE_START) .setDefaultFill(GridBagConstraints.HORIZONTAL); JLabel icon = new JLabel(UIUtil.getQuestionIcon(), SwingConsta... | createCenterPanel |
25,272 | void (@NotNull DocumentEvent e) { validateFields(); } | textChanged |
25,273 | void () { HgReferenceValidator validator = new HgBranchReferenceValidator(myRepository); String name = getName(); if (!validator.checkInput(name)) { String message = validator.getErrorText(name); setErrorText(message == null ? HgBundle.message("hg4idea.bookmark.specify.name") : message, myBookmarkName); setOKActionEnab... | validateFields |
25,274 | boolean () { return !myActiveCheckbox.isSelected(); } | isActive |
25,275 | void (ActionEvent e) { onChangeRepository(); } | actionPerformed |
25,276 | void () { myRepositoryURL = new EditorComboBox(""); myRepositoryURL.addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { onChangePullSource(); } }); } | createUIComponents |
25,277 | void (@NotNull DocumentEvent e) { onChangePullSource(); } | documentChanged |
25,278 | void (@NotNull VirtualFile repo) { Collection<String> paths = HgUtil.getRepositoryPaths(project, repo); for (String path : paths) { myRepositoryURL.prependItem(path); } } | addPathsFromHgrc |
25,279 | HgRepository () { return hgRepositorySelector.getRepository(); } | getRepository |
25,280 | String () { return myCurrentRepositoryUrl; } | getSource |
25,281 | void (@NotNull Collection<HgRepository> repositories, final @Nullable HgRepository selectedRepo) { hgRepositorySelector.setRoots(repositories); hgRepositorySelector.setSelectedRoot(selectedRepo); onChangeRepository(); } | setRoots |
25,282 | JComponent () { return mainPanel; } | createCenterPanel |
25,283 | String () { return "reference.mercurial.pull.dialog"; } | getHelpId |
25,284 | void () { final VirtualFile repo = hgRepositorySelector.getRepository().getRoot(); final String defaultPath = HgUtil.getRepositoryDefaultPath(project, repo); if (!StringUtil.isEmptyOrSpaces(defaultPath)) { addPathsFromHgrc(repo); myRepositoryURL.setText(HgUtil.removePasswordIfNeeded(defaultPath)); myCurrentRepositoryUr... | onChangeRepository |
25,285 | void () { myCurrentRepositoryUrl = myRepositoryURL.getText(); setOKActionEnabled(!StringUtil.isEmptyOrSpaces(myRepositoryURL.getText())); } | onChangePullSource |
25,286 | String () { return HgPullDialog.class.getName(); } | getDimensionServiceKey |
25,287 | void (ActionEvent e) { updateRepository(); } | actionPerformed |
25,288 | void (ChangeEvent e) { update(); } | stateChanged |
25,289 | void (Collection<HgRepository> repos, @Nullable HgRepository selectedRepo) { hgRepositorySelectorComponent.setRoots(repos); hgRepositorySelectorComponent.setSelectedRoot(selectedRepo); updateRepository(); } | setRoots |
25,290 | HgRepository () { return hgRepositorySelectorComponent.getRepository(); } | getRepository |
25,291 | String () { return (String)tagSelector.getSelectedItem(); } | getTag |
25,292 | boolean () { return tagOption.isSelected(); } | isTagSelected |
25,293 | String () { return (String)branchSelector.getSelectedItem(); } | getBranch |
25,294 | boolean () { return branchOption.isSelected(); } | isBranchSelected |
25,295 | boolean () { return revisionOption.isSelected(); } | isRevisionSelected |
25,296 | String () { return (String)bookmarkSelector.getSelectedItem(); } | getBookmark |
25,297 | boolean () { return bookmarkOption.isSelected(); } | isBookmarkSelected |
25,298 | String () { return revisionTxt.getText(); } | getRevision |
25,299 | void () { revisionTxt.setEnabled(revisionOption.isSelected()); branchSelector.setEnabled(branchOption.isSelected()); tagSelector.setEnabled(tagOption.isSelected()); bookmarkSelector.setEnabled(bookmarkOption.isSelected()); } | update |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.