org.tigris.subversion.javahl.Version类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(10.3k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.tigris.subversion.javahl.Version类的一些代码示例,展示了Version类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version类的具体详情如下:
包路径:org.tigris.subversion.javahl.Version
类名称:Version

Version介绍

[英]Encapsulates version information about the underlying native libraries. Basically a wrapper for svn_version.h.
[中]封装有关底层本机库的版本信息。基本上是svn_version.h的包装器。

代码示例

代码示例来源:origin: org.tigris.subversion/svn-javahl-api

/**
 * @return The full version string for the loaded JavaHL library,
 * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
 * @since 1.4.0
 */
public String toString()
{
  StringBuffer version = new StringBuffer();
  version.append(getMajor())
    .append('.').append(getMinor())
    .append('.').append(getPatch())
    .append(getNumberTag())
    .append(getTag());
  return version.toString();
}

代码示例来源:origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

/**
 * @return Whether the JavaHL native library version is at least
 * of <code>major.minor.patch</code> level.
 * @since 1.5.0
 */
public boolean isAtLeast(int major, int minor, int patch)
{
  int actualMajor = getMajor();
  int actualMinor = getMinor();
  return ((major < actualMajor)
      || (major == actualMajor && minor < actualMinor)
      || (major == actualMajor && minor == actualMinor &&
        patch <= getPatch()));
}

代码示例来源:origin: org.apache.subversion/svn-javahl-tests

/**
 * Test SVNClient.getVersion().
 * @throws Throwable
 */
public void testVersion() throws Throwable
{
  try
  {
    Version version = client.getVersion();
    String versionString = version.toString();
    if (versionString == null || versionString.trim().length() == 0)
    {
      throw new Exception("Version string empty");
    }
  }
  catch (Exception e)
  {
    fail("Version should always be available unless the " +
       "native libraries failed to initialize: " + e);
  }
}

代码示例来源:origin: org.tigris.subversion/svn-javahl-api

/**
 * Initializer for native resources to be invoked <em>after</em>
 * the native library has been loaded.  Sets library version
 * information, and initializes the re-entrance hack for native
 * code.
 * @throws LinkageError If the version of the loaded native
 * library is not compatible with this version of JavaHL's Java
 * APIs.
 */
private static final void init()
{
  initNativeLibrary();
  version = new Version();
  if (!version.isAtLeast(1, 5, 0))
  {
    throw new LinkageError("Native library version must be at least " +
                "1.5.0, but is only " + version);
  }
}

代码示例来源:origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

/**
 * list all logfiles (BDB) in use or not)
 *
 * @param path     the path to the repository
 * @param receiver interface to receive the logfile names
 * @throws ClientException throw in case of problem
 */
public void listDBLogs(String path, MessageReceiver receiver) throws ClientException {
  notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-svn-core

/**
 * @return Whether the JavaHL native library version is at least
 * of <code>major.minor.patch</code> level.
 * @since 1.5.0
 */
public boolean isAtLeast(int major, int minor, int patch)
{
  int actualMajor = getMajor();
  int actualMinor = getMinor();
  return ((major < actualMajor)
      || (major == actualMajor && minor < actualMinor)
      || (major == actualMajor && minor == actualMinor &&
        patch <= getPatch()));
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-svn-core

/**
 * Initializer for native resources to be invoked <em>after</em>
 * the native library has been loaded.  Sets library version
 * information, and initializes the re-entrance hack for native
 * code.
 * @throws LinkageError If the version of the loaded native
 * library is not compatible with this version of JavaHL's Java
 * APIs.
 */
private static final void init()
{
  initNativeLibrary();
  version = new Version();
  if (!version.isAtLeast(1, 5, 0))
  {
    throw new LinkageError("Native library version must be at least " +
                "1.5.0, but is only " + version);
  }
}

代码示例来源:origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

/**
 * @return The full version string for the loaded JavaHL library,
 * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
 * @since 1.4.0
 */
public String toString()
{
  StringBuffer version = new StringBuffer();
  version.append(getMajor())
    .append('.').append(getMinor())
    .append('.').append(getPatch())
    .append(getNumberTag())
    .append(getTag());
  return version.toString();
}

代码示例来源:origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

/**
 * list unused logfiles
 *
 * @param path     the path to the repository
 * @param receiver interface to receive the logfile names
 * @throws ClientException throw in case of problem
 */
public void listUnusedDBLogs(String path, MessageReceiver receiver) throws ClientException {
  notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
}

代码示例来源:origin: org.tigris.subversion/svn-javahl-api

/**
 * @return Whether the JavaHL native library version is at least
 * of <code>major.minor.patch</code> level.
 * @since 1.5.0
 */
public boolean isAtLeast(int major, int minor, int patch)
{
  int actualMajor = getMajor();
  int actualMinor = getMinor();
  return ((major < actualMajor)
      || (major == actualMajor && minor < actualMinor)
      || (major == actualMajor && minor == actualMinor &&
        patch <= getPatch()));
}

代码示例来源:origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

/**
 * Initializer for native resources to be invoked <em>after</em>
 * the native library has been loaded.  Sets library version
 * information, and initializes the re-entrance hack for native
 * code.
 * @throws LinkageError If the version of the loaded native
 * library is not compatible with this version of JavaHL's Java
 * APIs.
 */
private static final void init()
{
  initNativeLibrary();
  version = new Version();
  if (!version.isAtLeast(1, 5, 0))
  {
    throw new LinkageError("Native library version must be at least " +
                "1.5.0, but is only " + version);
  }
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-svn-core

/**
 * @return The full version string for the loaded JavaHL library,
 * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
 * @since 1.4.0
 */
public String toString()
{
  StringBuffer version = new StringBuffer();
  version.append(getMajor())
    .append('.').append(getMinor())
    .append('.').append(getPatch())
    .append(getNumberTag())
    .append(getTag());
  return version.toString();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-svnkit

/**
 * list all logfiles (BDB) in use or not)
 *
 * @param path     the path to the repository
 * @param receiver interface to receive the logfile names
 * @throws ClientException throw in case of problem
 */
public void listDBLogs(String path, MessageReceiver receiver) throws ClientException {
  notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
}

代码示例来源:origin: org.tmatesoft.svnkit/svnkit-javahl16

/**
 * list all logfiles (BDB) in use or not)
 *
 * @param path     the path to the repository
 * @param receiver interface to receive the logfile names
 * @throws ClientException throw in case of problem
 */
public void listDBLogs(String path, MessageReceiver receiver) throws ClientException {
  notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
}

代码示例来源:origin: org.tmatesoft.svnkit/svnkit-javahl16

/**
 * list unused logfiles
 *
 * @param path     the path to the repository
 * @param receiver interface to receive the logfile names
 * @throws ClientException throw in case of problem
 */
public void listUnusedDBLogs(String path, MessageReceiver receiver) throws ClientException {
  notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-svnkit

/**
 * list unused logfiles
 *
 * @param path     the path to the repository
 * @param receiver interface to receive the logfile names
 * @throws ClientException throw in case of problem
 */
public void listUnusedDBLogs(String path, MessageReceiver receiver) throws ClientException {
  notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
}

代码示例来源:origin: org.tigris.subversion/svn-javahl-tests

/**
 * Test SVNClient.getVersion().
 * @throws Throwable
 */
public void testVersion() throws Throwable
{
  try
  {
    Version version = client.getVersion();
    String versionString = version.toString();
    if (versionString == null || versionString.trim().length() == 0)
    {
      throw new Exception("Version string empty");
    }
  }
  catch (Exception e)
  {
    fail("Version should always be available unless the " +
       "native libraries failed to initialize: " + e);
  }
}

代码示例来源:origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

/**
 * create a subversion repository.
 *
 * @param path               the path where the repository will been
 *                           created.
 * @param disableFsyncCommit disable to fsync at the commit (BDB).
 * @param keepLog            keep the log files (BDB).
 * @param configPath         optional path for user configuration files.
 * @param fstype             the type of the filesystem (BDB or FSFS)
 * @throws ClientException throw in case of problem
 */
public void create(String path, boolean disableFsyncCommit,
          boolean keepLog, String configPath,
          String fstype) throws ClientException {
  if (BDB.equalsIgnoreCase(fstype)) {
    notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
  }
  try {
    SVNRepositoryFactory.createLocalRepository(new File(path), false, false);
    if (configPath != null) {
    }
  } catch (SVNException e) {
    JavaHLObjectFactory.throwException(e, myDelegate);
  }
}

代码示例来源:origin: org.tmatesoft.svnkit/svnkit-javahl16

/**
 * create a subversion repository.
 *
 * @param path               the path where the repository will been
 *                           created.
 * @param disableFsyncCommit disable to fsync at the commit (BDB).
 * @param keepLog            keep the log files (BDB).
 * @param configPath         optional path for user configuration files.
 * @param fstype             the type of the filesystem (BDB or FSFS)
 * @throws ClientException throw in case of problem
 */
public void create(String path, boolean disableFsyncCommit,
          boolean keepLog, String configPath,
          String fstype) throws ClientException {
  if (BDB.equalsIgnoreCase(fstype)) {
    notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
  }
  try {
    SVNRepositoryFactory.createLocalRepository(new File(path), false, false);
    if (configPath != null) {
    }
  } catch (SVNException e) {
    JavaHLObjectFactory.throwException(e, myDelegate);
  }
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-svnkit

/**
 * create a subversion repository.
 *
 * @param path               the path where the repository will been
 *                           created.
 * @param disableFsyncCommit disable to fsync at the commit (BDB).
 * @param keepLog            keep the log files (BDB).
 * @param configPath         optional path for user configuration files.
 * @param fstype             the type of the filesystem (BDB or FSFS)
 * @throws ClientException throw in case of problem
 */
public void create(String path, boolean disableFsyncCommit,
          boolean keepLog, String configPath,
          String fstype) throws ClientException {
  if (BDB.equalsIgnoreCase(fstype)) {
    notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString());
  }
  try {
    SVNRepositoryFactory.createLocalRepository(new File(path), false, false);
    if (configPath != null) {
    }
  } catch (SVNException e) {
    JavaHLObjectFactory.throwException(e, myDelegate);
  }
}

相关文章