當前位置: 首頁>>代碼示例>>Java>>正文


Java SVNURL.appendPath方法代碼示例

本文整理匯總了Java中org.tmatesoft.svn.core.SVNURL.appendPath方法的典型用法代碼示例。如果您正苦於以下問題:Java SVNURL.appendPath方法的具體用法?Java SVNURL.appendPath怎麽用?Java SVNURL.appendPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.tmatesoft.svn.core.SVNURL的用法示例。


在下文中一共展示了SVNURL.appendPath方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createHandler

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@NotNull
private static DirectoryEntryConsumer createHandler(@NotNull final SvnBranchConfigurationNew result, @NotNull final SVNURL rootPath) {
  return new DirectoryEntryConsumer() {

    @Override
    public void consume(final DirectoryEntry entry) throws SVNException {
      if (entry.isDirectory()) {
        SVNURL childUrl = rootPath.appendPath(entry.getName(), false);

        if (StringUtil.endsWithIgnoreCase(entry.getName(), DEFAULT_TRUNK_NAME)) {
          result.setTrunkUrl(childUrl.toString());
        }
        else {
          result.addBranches(childUrl.toString(),
                             new InfoStorage<List<SvnBranchItem>>(new ArrayList<SvnBranchItem>(0), InfoReliability.defaultValues));
        }
      }
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:DefaultBranchConfigInitializer.java

示例2: update

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
private void update() {
  RepositoryTreeNode baseNode = myBrowser.getSelectedNode();
  if (baseNode == null) {
    myTargetURL.setText("");
    getOKAction().setEnabled(false);
    return;
  }
  SVNURL baseURL = baseNode.getURL();
  String name = myNameField.getText();
  if (name == null || "".equals(name)) {
    getOKAction().setEnabled(false);
    return;
  }
  try {
    baseURL = baseURL.appendPath(myNameField.getText(), false);
  } catch (SVNException e) {
    //
    getOKAction().setEnabled(false);
    return;
  }
  myTargetURL.setText(baseURL.toString());
  getOKAction().setEnabled(!myURL.toString().equals(myTargetURL.getText()));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:CopyOptionsDialog.java

示例3: annotateNonExisting

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
private SvnRemoteFileAnnotation annotateNonExisting(Pair<SvnChangeList, FilePath> pair,
                                                    VcsFileRevision revision,
                                                    Info info,
                                                    Charset charset, final VirtualFile current) throws VcsException, SVNException, IOException {
  final File wasFile = pair.getSecond().getIOFile();
  final File root = getCommonAncestor(wasFile, info.getFile());

  if (root == null) throw new VcsException("Can not find relative path for " + wasFile.getPath() + "@" + revision.getRevisionNumber().asString());

  final String relativePath = FileUtil.getRelativePath(root.getPath(), wasFile.getPath(), File.separatorChar);
  if (relativePath == null) throw new VcsException("Can not find relative path for " + wasFile.getPath() + "@" + revision.getRevisionNumber().asString());

  Info wcRootInfo = myVcs.getInfo(root);
  if (wcRootInfo == null || wcRootInfo.getURL() == null) {
      throw new VcsException("Can not find relative path for " + wasFile.getPath() + "@" + revision.getRevisionNumber().asString());
  }
  SVNURL wasUrl = wcRootInfo.getURL();
  final String[] strings = relativePath.replace('\\','/').split("/");
  for (String string : strings) {
    wasUrl = wasUrl.appendPath(string, true);
  }

  final SVNRevision svnRevision = ((SvnRevisionNumber)revision.getRevisionNumber()).getRevision();
  byte[] data = SvnUtil.getFileContents(myVcs, SvnTarget.fromURL(wasUrl), svnRevision, svnRevision);
  final String contents = LoadTextUtil.getTextByBinaryPresentation(data, charset == null ? CharsetToolkit.UTF8_CHARSET : charset).toString();
  final SvnRemoteFileAnnotation result = new SvnRemoteFileAnnotation(myVcs, contents, revision.getRevisionNumber(), current);
  final AnnotationConsumer annotateHandler = createAnnotationHandler(ProgressManager.getInstance().getProgressIndicator(), result);

  final boolean calculateMergeinfo = SvnConfiguration.getInstance(myVcs.getProject()).isShowMergeSourcesInAnnotate() &&
                                     SvnUtil.checkRepositoryVersion15(myVcs, wasUrl.toString());
  AnnotateClient client = myVcs.getFactory().createAnnotateClient();
  client
    .annotate(SvnTarget.fromURL(wasUrl, svnRevision), SVNRevision.create(1), svnRevision, calculateMergeinfo, getLogClientOptions(myVcs),
              annotateHandler);
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:37,代碼來源:SvnAnnotationProvider.java

示例4: appendMultiParts

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
public static SVNURL appendMultiParts(@NotNull final SVNURL base, @NotNull final String subPath) throws SVNException {
  if (StringUtil.isEmpty(subPath)) return base;
  final List<String> parts = StringUtil.split(subPath.replace('\\', '/'), "/", true);
  SVNURL result = base;
  for (String part : parts) {
    result = result.appendPath(part, false);
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:SvnUtil.java

示例5: append

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
public static SVNURL append(@NotNull SVNURL parent, String child) {
  try {
    return parent.appendPath(child, false);
  }
  catch (SVNException e) {
    throw createIllegalArgument(e);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:SvnUtil.java

示例6: toDirectoryEntry

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@NotNull
public DirectoryEntry toDirectoryEntry(@NotNull SVNURL url, @Nullable SVNURL repositoryUrl) throws SVNException {
  return new DirectoryEntry(url.appendPath(name, false), repositoryUrl, PathUtil.getFileName(name), kind,
                            commit != null ? commit.build() : null, name);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:CmdBrowseClient.java

示例7: checkout

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
/**
 * @작성자 : KYJ
 * @작성일 : 2017. 12. 20.
 * @param path
 * @param pegrevision
 * @param revision
 * @param outDir
 * @param exceptionHandler
 * @return
 * @throws Exception
 */
public Long checkout(String path, SVNRevision pegrevision, SVNRevision revision, File outDir, ExceptionHandler exceptionHandler)
		throws Exception {
	SVNURL root = getSvnURL();
	SVNURL pathURL = root;
	if (ValueUtil.isNotEmpty(path)) {
		pathURL = root.appendPath(path, true);
	}
	return checkout(pathURL, pegrevision, revision, outDir, exceptionHandler);
}
 
開發者ID:callakrsos,項目名稱:Gargoyle,代碼行數:21,代碼來源:SVNCheckout.java


注:本文中的org.tmatesoft.svn.core.SVNURL.appendPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。