Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/CHANGES  view on Meta::CPAN

http://svn.apache.org/repos/asf/subversion/tags/1.2.0

See the 1.2 release notes for a more verbose overview of the changes since
the 1.1 release:  http://subversion.apache.org/docs/release-notes/1.2.html

 User-visible changes:
  - Client:
    * add peg-rev syntax to co/blame/cat/ls/pget/plist/export (issue #1093)
    * 'svn info' now works on URLs (r13123, 13144)
    * 'svn* --version' now shows available repository back-ends (r13761)
    * new fixed-length keywords (for placement in binary files) (issue #2095)
    * on Windows, disk-cached passwords are now encrypted (r13888)
    * performance improvements:
       - 'svn status' does much less disk parsing (r11677, 11704)
       - 'svn st -u' no longer asks server to generate textdeltas (issue #2259)
       - 'svn revert -R' doing much less work (r13883)
       - utf8<->native conversions are faster now (issue #2016)
    * new switches added:
       - 'svn commit --no-unlock           - retain lock in wc upon commit
       - 'svn log --limit N'               - show only first N log messages
       - 'svn info --revision'             - show info on older object (r13265)

src/subversion/build/libtool.m4  view on Meta::CPAN

# Old name:
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])


# LT_CMD_MAX_LEN
#---------------
AC_DEFUN([LT_CMD_MAX_LEN],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
# find the maximum length of command line arguments
AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  i=0
  teststring=ABCD

  case $build_os in
  msdosdjgpp*)
    # On DJGPP, this test can blow up pretty badly due to problems in libc
    # (any single argument exceeding 2000 bytes causes a buffer overrun
    # during glob expansion).  Even if it were fixed, the result of this
    # check would be larger than it should be.
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
    ;;

  gnu*)
    # Under GNU Hurd, this test is not required because there is
    # no limit to the length of command line arguments.
    # Libtool will interpret -1 as no limit whatsoever
    lt_cv_sys_max_cmd_len=-1;
    ;;

  cygwin* | mingw* | cegcc*)
    # On Win9x/ME, this test blows up -- it succeeds, but takes
    # about 5 minutes as the teststring grows exponentially.
    # Worse, since 9x/ME are not pre-emptively multitasking,
    # you end up with a "frozen" computer, even though with patience
    # the test eventually succeeds (with a max line length of 256k).
    # Instead, let's just punt: use the minimum linelength reported by
    # all of the supported platforms: 8192 (on NT/2K/XP).
    lt_cv_sys_max_cmd_len=8192;
    ;;

  mint*)
    # On MiNT this can take a long time and run out of memory.
    lt_cv_sys_max_cmd_len=8192;
    ;;

  amigaos*)
    # On AmigaOS with pdksh, this test takes hours, literally.
    # So we just punt and use a minimum line length of 8192.
    lt_cv_sys_max_cmd_len=8192;
    ;;

  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
    # This has been around since 386BSD, at least.  Likely further.
    if test -x /sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
    elif test -x /usr/sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
    else

src/subversion/build/libtool.m4  view on Meta::CPAN

      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
    else
      # Make teststring a little bigger before we do anything with it.
      # a 1K string should be a reasonable start.
      for i in 1 2 3 4 5 6 7 8; do
        teststring=$teststring$teststring
      done
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
      # If test is not a shell built-in, we'll probably end up computing a
      # maximum length that is only half of the actual maximum length, but
      # we can't tell.
      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
	      test 17 != "$i" # 1/2 MB should be enough
      do
        i=`expr $i + 1`
        teststring=$teststring$teststring
      done
      # Only check the string length outside the loop.
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
      teststring=
      # Add a significant safety factor because C++ compilers can tack on
      # massive amounts of additional arguments before passing them to the
      # linker.  It appears as though 1/2 is a usable value.
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
    fi
    ;;
  esac
])
if test -n "$lt_cv_sys_max_cmd_len"; then
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
else
  AC_MSG_RESULT(none)
fi
max_cmd_len=$lt_cv_sys_max_cmd_len
_LT_DECL([], [max_cmd_len], [0],
    [What is the maximum length of a command?])
])# LT_CMD_MAX_LEN

# Old name:
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])


# _LT_HEADER_DLFCN
# ----------------

src/subversion/build/libtool.m4  view on Meta::CPAN


  # Write the raw and C identifiers.
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
    # Fake it for dumpbin and say T for any non-static function,
    # D for any global variable and I for any imported variable.
    # Also find C++ and __fastcall symbols from MSVC++,
    # which start with @ or ?.
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
"     {last_section=section; section=\$ 3};"\
"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
"     \$ 0!~/External *\|/{next};"\
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
"     {if(hide[section]) next};"\
"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
"     ' prfx=^$ac_symprfx]"
  else
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  fi
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"

  # Check to see that the pipe works correctly.
  pipe_works=no

  rm -f conftest*

src/subversion/build/ltmain.sh  view on Meta::CPAN

{
    $debug_cmd

    $require_term_colors

    _G_infix=$1; shift
    _G_indent=$_G_infix
    _G_prefix="$progname: $_G_infix: "
    _G_message=$*

    # Strip color escape sequences before counting printable length
    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
    do
      test -n "$_G_tc" && {
        _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
      }
    done
    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes

    func_echo_infix_1_IFS=$IFS

src/subversion/build/ltmain.sh  view on Meta::CPAN

func_grep ()
{
    $debug_cmd

    $GREP "$1" "$2" >/dev/null 2>&1
}


# func_len STRING
# ---------------
# Set func_len_result to the length of STRING. STRING may not
# start with a hyphen.
  test -z "$_G_HAVE_XSI_OPS" \
    && (eval 'x=a/b/c;
      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
    && _G_HAVE_XSI_OPS=yes

if test yes = "$_G_HAVE_XSI_OPS"; then
  eval 'func_len ()
  {
    $debug_cmd

src/subversion/build/ltmain.sh  view on Meta::CPAN

  /* Put quoted arguments into the new argument vector.  */
  for (i = 0; i < argc; i++)
    {
      const char *string = argv[i];

      if (string[0] == '\0')
	new_argv[i] = xstrdup ("\"\"");
      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
	{
	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
	  size_t length;
	  unsigned int backslashes;
	  const char *s;
	  char *quoted_string;
	  char *p;

	  length = 0;
	  backslashes = 0;
	  if (quote_around)
	    length++;
	  for (s = string; *s != '\0'; s++)
	    {
	      char c = *s;
	      if (c == '"')
		length += backslashes + 1;
	      length++;
	      if (c == '\\')
		backslashes++;
	      else
		backslashes = 0;
	    }
	  if (quote_around)
	    length += backslashes + 1;

	  quoted_string = XMALLOC (char, length + 1);

	  p = quoted_string;
	  backslashes = 0;
	  if (quote_around)
	    *p++ = '"';
	  for (s = string; *s != '\0'; s++)
	    {
	      char c = *s;
	      if (c == '"')
		{

src/subversion/build/run_tests.py  view on Meta::CPAN

      log.write('LISTING: %s\n' % progbase)
    else:
      log.write('START: %s\n' % progbase)

    log.flush()

    start_time = datetime.now()

    progabs = os.path.abspath(os.path.join(self.srcdir, prog))
    old_cwd = os.getcwd()
    line_length = _get_term_width()
    dots_needed = line_length \
                    - len(test_info) \
                    - len('success')
    try:
      os.chdir(progdir)
      if progbase[-3:] == '.py':
        failed = self._run_py_test(progabs, test_nums, dots_needed)
      else:
        failed = self._run_c_test(prog, test_nums, dots_needed)
    except:
      os.chdir(old_cwd)

src/subversion/configure  view on Meta::CPAN

  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

$as_echo "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF

src/subversion/configure  view on Meta::CPAN

  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
  cat conftest.out >&5
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
    lt_cv_nm_interface="MS dumpbin"
  fi
  rm -f conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
$as_echo "$lt_cv_nm_interface" >&6; }

# find the maximum length of command line arguments
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
$as_echo_n "checking the maximum length of command line arguments... " >&6; }
if ${lt_cv_sys_max_cmd_len+:} false; then :
  $as_echo_n "(cached) " >&6
else
    i=0
  teststring=ABCD

  case $build_os in
  msdosdjgpp*)
    # On DJGPP, this test can blow up pretty badly due to problems in libc
    # (any single argument exceeding 2000 bytes causes a buffer overrun
    # during glob expansion).  Even if it were fixed, the result of this
    # check would be larger than it should be.
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
    ;;

  gnu*)
    # Under GNU Hurd, this test is not required because there is
    # no limit to the length of command line arguments.
    # Libtool will interpret -1 as no limit whatsoever
    lt_cv_sys_max_cmd_len=-1;
    ;;

  cygwin* | mingw* | cegcc*)
    # On Win9x/ME, this test blows up -- it succeeds, but takes
    # about 5 minutes as the teststring grows exponentially.
    # Worse, since 9x/ME are not pre-emptively multitasking,
    # you end up with a "frozen" computer, even though with patience
    # the test eventually succeeds (with a max line length of 256k).
    # Instead, let's just punt: use the minimum linelength reported by
    # all of the supported platforms: 8192 (on NT/2K/XP).
    lt_cv_sys_max_cmd_len=8192;
    ;;

  mint*)
    # On MiNT this can take a long time and run out of memory.
    lt_cv_sys_max_cmd_len=8192;
    ;;

  amigaos*)
    # On AmigaOS with pdksh, this test takes hours, literally.
    # So we just punt and use a minimum line length of 8192.
    lt_cv_sys_max_cmd_len=8192;
    ;;

  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
    # This has been around since 386BSD, at least.  Likely further.
    if test -x /sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
    elif test -x /usr/sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
    else

src/subversion/configure  view on Meta::CPAN

      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
    else
      # Make teststring a little bigger before we do anything with it.
      # a 1K string should be a reasonable start.
      for i in 1 2 3 4 5 6 7 8; do
        teststring=$teststring$teststring
      done
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
      # If test is not a shell built-in, we'll probably end up computing a
      # maximum length that is only half of the actual maximum length, but
      # we can't tell.
      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
	      test 17 != "$i" # 1/2 MB should be enough
      do
        i=`expr $i + 1`
        teststring=$teststring$teststring
      done
      # Only check the string length outside the loop.
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
      teststring=
      # Add a significant safety factor because C++ compilers can tack on
      # massive amounts of additional arguments before passing them to the
      # linker.  It appears as though 1/2 is a usable value.
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
    fi
    ;;
  esac

src/subversion/configure  view on Meta::CPAN


  # Write the raw and C identifiers.
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
    # Fake it for dumpbin and say T for any non-static function,
    # D for any global variable and I for any imported variable.
    # Also find C++ and __fastcall symbols from MSVC++,
    # which start with @ or ?.
    lt_cv_sys_global_symbol_pipe="$AWK '"\
"     {last_section=section; section=\$ 3};"\
"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
"     \$ 0!~/External *\|/{next};"\
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
"     {if(hide[section]) next};"\
"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
"     ' prfx=^$ac_symprfx"
  else
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  fi
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"

  # Check to see that the pipe works correctly.
  pipe_works=no

  rm -f conftest*

src/subversion/configure  view on Meta::CPAN

_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF

src/subversion/configure  view on Meta::CPAN


# A literal string matcher.
FGREP=$lt_FGREP

# A BSD- or MS-compatible name lister.
NM=$lt_NM

# Whether we need soft or hard links.
LN_S=$lt_LN_S

# What is the maximum length of a command?
max_cmd_len=$max_cmd_len

# Object file suffix (normally "o").
objext=$ac_objext

# Executable file suffix (normally "").
exeext=$exeext

# whether the shell understands "unset".
lt_unset=$lt_unset

src/subversion/subversion/bindings/ctypes-python/csvn/ext/listmixin.py  view on Meta::CPAN

        elif r2 == 1:
          step = 1
        if step == 0:
          step = 1
        if step == 1:
          step = 2
        indices = list(range(*slice(start, end, step).indices(len(x))))
        assignval = [rand_elem() for assignidx in
                     indices]
        if random.randrange(2) == 0:
          # Make right hand value have incorrect length
          if random.randrange(2) == 0 and len(assignval) > 0:
            if random.randrange(2) == 0:
              assignval.pop()
            else:
              assignval = []
          else:
            assignval.append(1)
        assert (extended_set_or_none(x, slice(start, end, step), assignval) ==
                extended_set_or_none(y, slice(start, end, step), assignval))

src/subversion/subversion/bindings/ctypes-python/csvn/types.py  view on Meta::CPAN

class SvnStringPtr(object):

    def to_param(obj, pool):
        return svn_string_ncreate(obj, len(obj), pool)
    to_param = staticmethod(to_param)

    def from_param(obj):

        assert isinstance(obj[0], svn_string_t)

        # Convert from a raw svn_string_t object. Pass in the length, so that
        # we handle binary property values with embedded NULLs correctly.
        return string_at(obj[0].data.raw, obj[0].len)
    from_param = staticmethod(from_param)

src/subversion/subversion/bindings/ctypes-python/test/test.dumpfile  view on Meta::CPAN

SVN-fs-dump-format-version: 2

UUID: 890f2569-e600-4cfc-842a-f574dec58d87

Revision-number: 0
Prop-content-length: 56
Content-length: 56

K 8
svn:date
V 27
2007-08-02T17:24:38.742153Z
PROPS-END

Revision-number: 1
Prop-content-length: 142
Content-length: 142

K 7
svn:log
V 42
Repository setup for future awesomeness.


K 10
svn:author
V 5
clark
K 8
svn:date
V 27
2007-08-02T17:30:43.849637Z
PROPS-END

Node-path: branches
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Node-path: tags
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Node-path: trunk
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Revision-number: 2
Prop-content-length: 165
Content-length: 165

K 7
svn:log
V 65
Add important documentation info. Almost ready for 0.1 release!


K 10
svn:author
V 5
bruce
K 8
svn:date
V 27
2007-08-02T17:33:17.989467Z
PROPS-END

Node-path: trunk/README.txt
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 126
Text-content-md5: 8d260c7bc0d9f43ec1eebf8cb5f063c3
Content-length: 136

PROPS-END
This repository is for test purposes only. Any resemblance to any other
repository, real or imagined, is purely coincidental.


Revision-number: 3
Prop-content-length: 134
Content-length: 134

K 7
svn:log
V 34
Make sure everybody gets credit.


K 10
svn:author
V 5
henry
K 8
svn:date
V 27
2007-08-02T17:36:14.231181Z
PROPS-END

Node-path: trunk/README.txt
Node-kind: file
Node-action: change
Text-content-length: 159
Text-content-md5: 1d8302c39f9e873d48eb90b655e7c7e0
Content-length: 159

This repository is for test purposes only. Any resemblance to any other
repository, real or imagined, is purely coincidental.

Contributors:
Clark
Bruce
Henry


Revision-number: 4
Prop-content-length: 153
Content-length: 153

K 7
svn:log
V 53
Add important new file. This marks the 1.0 release.


K 10
svn:author
V 5
clark
K 8
svn:date
V 27
2007-08-02T17:38:08.361367Z
PROPS-END

Node-path: trunk/ANOTHERREADME.txt
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 66
Text-content-md5: 7078f8e625fb15490da0dd328c472f99
Content-length: 76

PROPS-END
This file holds all the information too important for README.txt.


Revision-number: 5
Prop-content-length: 165
Content-length: 165

K 7
svn:log
V 65
Start branch that does not follow the catastrophic path of 1.0.


K 10
svn:author
V 5
bruce
K 8
svn:date
V 27
2007-08-02T17:40:32.349920Z
PROPS-END

Node-path: branches/0.x
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Node-path: branches/0.x/README.txt
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 234
Text-content-md5: 41ae027ac4d5d16e506f06db1c5b5d14
Content-length: 244

PROPS-END
This repository is for test purposes only. Any resemblance to any other
repository, real or imagined, is purely coincidental.

This branch preserves and refines the code of the excellent pre-1.0 days.

Contributors:
Clark
Bruce
Henry


Revision-number: 6
Prop-content-length: 146
Content-length: 146

K 7
svn:log
V 46
What this project needs is more directories!


K 10
svn:author
V 5
clark
K 8
svn:date
V 27
2007-08-02T17:41:57.237766Z
PROPS-END

Node-path: trunk/also_a_dir
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Node-path: trunk/dir
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Node-path: trunk/dir/dir2
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Revision-number: 7
Prop-content-length: 134
Content-length: 134

K 7
svn:log
V 34
Get rid of needless directories.


K 10
svn:author
V 5

src/subversion/subversion/bindings/ctypes-python/test/test.dumpfile  view on Meta::CPAN


Node-path: trunk/also_a_dir
Node-action: delete


Node-path: trunk/dir
Node-action: delete


Revision-number: 8
Prop-content-length: 156
Content-length: 156

K 7
svn:log
V 56
Set prop to indicate proper information on awesomeness.

K 10
svn:author
V 5
clark
K 8
svn:date
V 27
2007-08-02T18:19:04.608051Z
PROPS-END

Node-path: trunk/README.txt
Node-kind: file
Node-action: change
Prop-content-length: 30
Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Content-length: 30

K 7
Awesome
V 3
Yes
PROPS-END


Revision-number: 9
Prop-content-length: 137
Content-length: 137

K 7
svn:log
V 37
Restore information deleted in rev 8

K 10
svn:author
V 5
bruce
K 8
svn:date
V 27
2007-08-02T18:24:16.960652Z
PROPS-END

Node-path: trunk/README.txt
Node-kind: file
Node-action: change
Text-content-length: 159
Text-content-md5: 1d8302c39f9e873d48eb90b655e7c7e0
Content-length: 159

This repository is for test purposes only. Any resemblance to any other
repository, real or imagined, is purely coincidental.

Contributors:
Clark
Bruce
Henry


src/subversion/subversion/bindings/cxxhl/src/exception.cpp  view on Meta::CPAN

namespace detail {

class error_description
{
public:
  static error_description* create(const char* message,
                                   const char *loc_file, long loc_line,
                                   bool trace_link)
    {
      bool empty_message = (message == NULL);
      const std::size_t length = (empty_message ? 0 : std::strlen(message));
      void *memblock = ::operator new(length + sizeof(error_description));

      error_description* description = new(memblock) error_description(
          loc_file, loc_line, trace_link, empty_message);
      if (length)
        std::memcpy(description->m_message, message, length);
      description->m_message[length] = 0;
      return description;
    }

  static error_description* create(const char* message)
    {
      return create(message, NULL, 0, false);
    }

  error_description* reference() throw()
    {

src/subversion/subversion/bindings/cxxhl/src/exception.cpp  view on Meta::CPAN

            }
        }
    }
  ml.push_back(error::message(error_code, std::string(description)));
}
} // anonymous namespace

error::message_list error::compile_messages(bool show_traces) const
{
  // Determine the maximum size of the returned list
  message_list::size_type max_length = 0;
  for (const error* err = this; err; err = err->m_nested.get())
    {
      if (show_traces && m_description->file())
        ++max_length;                   // We will display an error location
      if (!m_description->trace())
        ++max_length;                   // Traces do not emit a message line
    }
  message_list ml;
  ml.reserve(max_length);

  // This vector holds a list of all error codes that we've printed
  // the generic description for.  See svn_handle_error2 for details.
  std::vector<int> empties;
  empties.reserve(max_length);

  apr_pool_t* pool = NULL;
  apr_pool_create(&pool, NULL);
  try
    {
      for (const error* err = this; err; err = err->m_nested.get())
        {
          if (!err->m_description->what())
            {
              // Non-specific messages are printed only once.

src/subversion/subversion/bindings/javahl/native/CreateJ.cpp  view on Meta::CPAN

  jstring jpropName = JNIUtil::makeJString(wcNotify->prop_name);
  if (JNIUtil::isJavaExceptionThrown())
    POP_AND_RETURN_NULL;

  jobject jrevProps = CreateJ::PropertyMap(wcNotify->rev_props);
  if (JNIUtil::isJavaExceptionThrown())
    POP_AND_RETURN_NULL;

  jlong joldRevision = wcNotify->old_revision;
  jlong jhunkOriginalStart = wcNotify->hunk_original_start;
  jlong jhunkOriginalLength = wcNotify->hunk_original_length;
  jlong jhunkModifiedStart = wcNotify->hunk_modified_start;
  jlong jhunkModifiedLength = wcNotify->hunk_modified_length;
  jlong jhunkMatchedLine = wcNotify->hunk_matched_line;
  jint jhunkFuzz = static_cast<jint>(wcNotify->hunk_fuzz);
  if (jhunkFuzz != wcNotify->hunk_fuzz)
    {
      env->ThrowNew(env->FindClass("java.lang.ArithmeticException"),
                    "Overflow converting C svn_linenum_t to Java int");
      POP_AND_RETURN_NULL;
    }

  // call the Java method

src/subversion/subversion/bindings/javahl/native/JNIUtil.cpp  view on Meta::CPAN


#ifdef ENABLE_NLS
#ifdef WIN32
  {
    WCHAR ucs2_path[MAX_PATH];
    char *utf8_path;
    const char *internal_path;
    apr_pool_t *pool;
    apr_status_t apr_err;
    apr_size_t inwords, outbytes;
    unsigned int outlength;

    pool = svn_pool_create(g_pool);
    /* get dll name - our locale info will be in '../share/locale' */
    inwords = sizeof(ucs2_path) / sizeof(ucs2_path[0]);
    HINSTANCE moduleHandle = GetModuleHandle("libsvnjavahl-1");
    GetModuleFileNameW(moduleHandle, ucs2_path, inwords);
    inwords = lstrlenW(ucs2_path);
    outbytes = outlength = 3 * (inwords + 1);
    utf8_path = reinterpret_cast<char *>(apr_palloc(pool, outlength));
    apr_err = apr_conv_ucs2_to_utf8((const apr_wchar_t *) ucs2_path,
                                    &inwords, utf8_path, &outbytes);
    if (!apr_err && (inwords > 0 || outbytes == 0))
      apr_err = APR_INCOMPLETE;
    if (apr_err)
      {
        if (stderr)
          fprintf(stderr, "Can't convert module path to UTF-8");
        return FALSE;
      }
    utf8_path[outlength - outbytes] = '\0';
    internal_path = svn_dirent_internal_style(utf8_path, pool);
    /* get base path name */
    internal_path = svn_dirent_dirname(internal_path, pool);
    internal_path = svn_dirent_join(internal_path, SVN_LOCALE_RELATIVE_PATH,
                                  pool);
    bindtextdomain(PACKAGE_NAME, internal_path);
    svn_pool_destroy(pool);
  }
#else
  bindtextdomain(PACKAGE_NAME, SVN_LOCALE_DIR);

src/subversion/subversion/bindings/javahl/native/JNIUtil.cpp  view on Meta::CPAN

    return NULL;

  env->DeleteLocalRef(clazz);

  return ret;
}

/**
 * Create a Java byte array from an array of characters.
 * @param data      the character array
 * @param length    the number of characters in the array
 */
jbyteArray JNIUtil::makeJByteArray(const void *data, int length)
{
  if (data == NULL)
    {
      // a NULL will create no Java array
      return NULL;
    }

  JNIEnv *env = getEnv();

  // Allocate the Java array.
  jbyteArray ret = env->NewByteArray(length);
  if (isJavaExceptionThrown() || ret == NULL)
      return NULL;

  // Access the bytes.
  jbyte *retdata = env->GetByteArrayElements(ret, NULL);
  if (isJavaExceptionThrown())
    return NULL;

  // Copy the bytes.
  memcpy(retdata, data, length);

  // Release the bytes.
  env->ReleaseByteArrayElements(ret, retdata, 0);
  if (isJavaExceptionThrown())
    return NULL;

  return ret;
}

/**

src/subversion/subversion/bindings/javahl/native/JNIUtil.h  view on Meta::CPAN

   * exceptionClassName.  A NativeException sub-class must supply a
   * 3-arg constructor identical to that of NativeException.  @a
   * source is any file name and line number information.
   */
  static void throwNativeException(const char *exceptionClassName,
                                   const char *msg,
                                   const char *source = NULL,
                                   int aprErr = -1);

  static void throwNullPointerException(const char *message);
  static jbyteArray makeJByteArray(const void *data, int length);
  static jbyteArray makeJByteArray(const svn_string_t *str);
  static jobject createDate(apr_time_t time);
  static void logMessage(const char *message);
  static int getLogLevel();
  static char *getFormatBuffer();
  static void initLogFile(int level, jstring path);
  static jstring makeJString(const char *txt);
  static bool isJavaExceptionThrown();
  static JNIEnv *getEnv();
  static void setEnv(JNIEnv *);

src/subversion/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DirEntry.java  view on Meta::CPAN

    /**
     * Return the kind of entry (file or directory)
     * @return the kind of the entry (file or directory) see NodeKind class
     */
    public NodeKind getNodeKind()
    {
        return nodeKind;
    }

    /**
     * Return the length of file test or 0 for directories
     * @return length of file text, or 0 for directories
     */
    public long getSize()
    {
        return size;
    }

    /**
     * Set the path.  This should only be used by compatibility wrapper.
     */
    public void setPath(String path)

src/subversion/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/LogDate.java  view on Meta::CPAN

    private static final DateFormat formatter = new SimpleDateFormat(
            "yyyy-MM-dd'T'HH:mm:ss.SSS z");
    private static final TimeZone UTC = TimeZone.getTimeZone("UTC");

    private final long timeMicros;
    private final String cachedString;
    private final Calendar cachedDate;

    public LogDate(String datestr) throws ParseException
    {
        if (datestr == null || datestr.length() != 27 || datestr.charAt(26) != 'Z')
        {
            throw new ParseException("String is not a valid Subversion date", 0);
        }
        Date date;
        synchronized(formatter)
        {
            date = formatter.parse(datestr.substring(0, 23) + " UTC");
        }
        this.cachedString = datestr;
        cachedDate = Calendar.getInstance(UTC);

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/BlameCallbackImpl.java  view on Meta::CPAN

            {
                sb.append("         - ");
            }

            sb.append(line);

            return sb.toString();
        }

        /**
         * Left pad the input string to a given length, to simulate printf()-
         * style output. This method appends the output to the class sb member.
         * @param sb StringBuffer to append to
         * @param val the input string
         * @param len the minimum length to pad to
         */
        private void pad(StringBuffer sb, String val, int len)
        {
            int padding = len - val.length();

            for (int i = 0; i < padding; i++)
            {
                sb.append(' ');
            }

            sb.append(val);
        }

    }

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/DirEntry.java  view on Meta::CPAN

    /**
     * Return the kind of entry (file or directory)
     * @return the kind of the entry (file or directory) see NodeKind class
     */
    public int getNodeKind()
    {
        return nodeKind;
    }

    /**
     * Return the length of file test or 0 for directories
     * @return length of file text, or 0 for directories
     */
    public long getSize()
    {
        return size;
    }

    /**
     * Set the path.  This should only be used by compatibility wrapper.
     */
    public void setPath(String path)

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/InputInterface.java  view on Meta::CPAN


import java.io.IOException;

/**
 * Interface for data to be received from subversion
 * used for SVNAdmin.load and SVNAdmin.dump
 */
public interface InputInterface
{
    /**
     * read the number of data.length bytes from input.
     * @param data          array to store the read bytes.
     * @throws IOException  throw in case of problems.
     */
    public int read(byte [] data) throws IOException;

    /**
     * close the input
     * @throws IOException throw in case of problems.
     */
    public void close() throws IOException;

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/LogDate.java  view on Meta::CPAN

    private static final DateFormat formatter = new SimpleDateFormat(
            "yyyy-MM-dd'T'HH:mm:ss.SSS z");
    private static final TimeZone UTC = TimeZone.getTimeZone("UTC");

    private final long timeMicros;
    private final String cachedString;
    private final Calendar cachedDate;

    public LogDate(String datestr) throws ParseException
    {
        if (datestr == null || datestr.length() != 27 || datestr.charAt(26) != 'Z')
        {
            throw new ParseException("String is not a valid Subversion date", 0);
        }
        Date date;
        synchronized(formatter)
        {
            date = formatter.parse(datestr.substring(0, 23) + " UTC");
        }
        this.cachedString = datestr;
        cachedDate = Calendar.getInstance(UTC);

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Mergeinfo.java  view on Meta::CPAN

     * Add one or more RevisionRange objects to merge info. If the
     * merge source is already stored, the list of revisions is
     * replaced.
     * @param mergeSrc The merge source URL.
     * @param ranges RevisionRange objects to add.
     * @throws SubversionException If range list contains objects of
     * type other than RevisionRange.
     */
    public void addRevisions(String mergeSrc, RevisionRange[] ranges)
    {
        for (int i = 0; i < ranges.length; i++)
            addRevisionRange(mergeSrc, ranges[i]);
    }

    /**
     * Add a revision range to the merged revisions for a path.  If
     * the merge source already has associated revision ranges, add
     * the revision range to the existing list.
     * @param mergeSrc The merge source URL.
     * @param range The revision range to add.
     */

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java  view on Meta::CPAN

    /**
     * @deprecated Use {@link #status(String, int, boolean, boolean,
     *                                boolean, boolean, String[],
     *                                StatusCallback)} instead.
     * @since 1.0
     */
    public Status singleStatus(String path, boolean onServer)
            throws ClientException
    {
        Status[] statusArray = status(path, false, onServer, true, false, false);
        if (statusArray == null || statusArray.length == 0)
            return null;
        return statusArray[0];
    }

    /**
     * @deprecated Use {@link #status(String, int, boolean, boolean,
     *                                boolean, boolean, String[],
     *                                StatusCallback)} instead.
     * @since 1.0
     */

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java  view on Meta::CPAN

        {
            private List<DirEntry> dirents = new ArrayList<DirEntry>();

            public void doEntry(DirEntry dirent, Lock lock)
            {
                // All of this is meant to retain backward compatibility with
                // the old svn_client_ls-style API.  For further information
                // about what is going on here, see the comments in
                // libsvn_client/list.c:store_dirent().

                if (dirent.getPath().length() == 0)
                {
                    if (dirent.getNodeKind() == NodeKind.file)
                    {
                        String absPath = dirent.getAbsPath();
                        int lastSeparator = absPath.lastIndexOf('/');
                        String path = absPath.substring(lastSeparator,
                                                        absPath.length());
                        dirent.setPath(path);
                    }
                    else
                    {
                        // It's the requested directory, which we don't want
                        // to add.
                        return;
                    }
                }

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java  view on Meta::CPAN

                }

                callback.singleMessage(changedPaths, revision, oldRevprops,
                                       hasChildren);
            }
        }

        try
        {
            List<org.apache.subversion.javahl.types.RevisionRange> aRevisions =
              new ArrayList<org.apache.subversion.javahl.types.RevisionRange>(revisionRanges.length);

            for (RevisionRange range : revisionRanges)
            {
                aRevisions.add(range.toApache());
            }

            aSVNClient.logMessages(path,
                         pegRevision == null ? null :pegRevision.toApache(),
                         aRevisions, stopOnCopy, discoverPath,
                         includeMergedRevisions,

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java  view on Meta::CPAN

    @SuppressWarnings("unchecked")
    public void copy(CopySource[] sources, String destPath, String message,
                     boolean copyAsChild, boolean makeParents,
                     boolean ignoreExternals, Map revpropTable)
            throws ClientException
    {
        try
        {
            List<org.apache.subversion.javahl.types.CopySource> aCopySources =
                new ArrayList<org.apache.subversion.javahl.types.CopySource>(
                                                            sources.length);

            for (CopySource src : sources)
            {
                aCopySources.add(src.toApache());
            }

            aSVNClient.copy(aCopySources, destPath, copyAsChild,
                            makeParents, ignoreExternals, revpropTable,
                            message == null ? cachedHandler
                                : new ConstMsg(message),

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java  view on Meta::CPAN

     */
    public void merge(String path, Revision pegRevision,
                      RevisionRange[] revisions, String localPath,
                      boolean force, int depth, boolean ignoreAncestry,
                      boolean dryRun, boolean recordOnly)
            throws ClientException
    {
        try
        {
            List<org.apache.subversion.javahl.types.RevisionRange> aRevisions =
              new ArrayList<org.apache.subversion.javahl.types.RevisionRange>(revisions.length);

            for (RevisionRange range : revisions )
            {
                aRevisions.add(range.toApache());
            }

            aSVNClient.merge(path,
                         pegRevision == null ? null : pegRevision.toApache(),
                         aRevisions, localPath, force, Depth.toADepth(depth),
                         ignoreAncestry, dryRun, recordOnly);

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNInputStream.java  view on Meta::CPAN

        /**
         * write the bytes in data to java
         * @param data          the data to be written
         * @throws IOException  throw in case of problems.
         */
        public int write(byte[] data) throws IOException
        {
            if (closed)
                throw new IOException("stream has been closed");
            myStream.write(data);
            return data.length;
        }

        /**
         * close the output
         * @throws IOException throw in case of problems.
         */
        public void close() throws IOException
        {
            myStream.close();
        }

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNOutputStream.java  view on Meta::CPAN

         * build a new connection object
         * @param myMaster  the other side of the pipe
         * @throws IOException
         */
        Inputer(SVNOutputStream myMaster) throws IOException
        {
            myStream = new PipedInputStream(myMaster);
        }

        /**
         * read the number of data.length bytes from input.
         * @param data          array to store the read bytes.
         * @throws IOException  throw in case of problems.
         */
        public int read(byte[] data) throws IOException
        {
            if (closed)
                throw new IOException("stream has been closed");
            return myStream.read();
        }

src/subversion/subversion/bindings/javahl/tests/data/issue2979.dump  view on Meta::CPAN

SVN-fs-dump-format-version: 2

UUID: 712a93d4-7deb-6645-8811-f770f3dbb12c

Revision-number: 0
Prop-content-length: 56
Content-length: 56

K 8
svn:date
V 27
2007-10-21T02:14:52.574819Z
PROPS-END

Revision-number: 1
Prop-content-length: 101
Content-length: 101

K 7
svn:log
V 0

K 10
svn:author
V 7
svn4ant
K 8
svn:date
V 27
2007-10-21T02:14:52.895280Z
PROPS-END

Node-path: 20-Oct-2007_10-14-52614PM
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Revision-number: 2
Prop-content-length: 104
Content-length: 104

K 7
svn:log
V 3
FOO
K 10
svn:author
V 7
svn4ant
K 8
svn:date
V 27
2007-10-21T02:14:55.989729Z
PROPS-END

Node-path: 20-Oct-2007_10-14-52614PM/a
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10

PROPS-END


Node-path: 20-Oct-2007_10-14-52614PM/a/world.txt
Node-kind: file
Node-action: add
Prop-content-length: 100
Text-content-length: 5
Text-content-md5: f5a7924e621e84c9280a9a27e1bcb7f6
Content-length: 105

K 13
svn:mime-type
V 10
text/plain
K 12
svn:keywords
V 2
Id
K 13
svn:eol-style
V 6
native
PROPS-END
World

Node-path: 20-Oct-2007_10-14-52614PM/hello.txt
Node-kind: file
Node-action: add
Prop-content-length: 100
Text-content-length: 5
Text-content-md5: 8b1a9953c4611296a827abf8c47804d7
Content-length: 105

K 13
svn:mime-type
V 10
text/plain
K 12
svn:keywords
V 2
Id
K 13

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

    /**
     * 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);
        }
    }

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

    /**
     * Test SVNClient.getVersionExtended().
     * @throws Throwable
     */
    public void testVersionExtendedQuiet() throws Throwable
    {
        try
        {
            VersionExtended vx = client.getVersionExtended(false);
            String result = vx.getBuildDate();
            if (result == null || result.trim().length() == 0)
                throw new Exception("Build date empty");
            result = vx.getBuildTime();
            if (result == null || result.trim().length() == 0)
                throw new Exception("Build time empty");
            result = vx.getBuildHost();
            if (result == null || result.trim().length() == 0)
                throw new Exception("Build host empty");
            result = vx.getCopyright();
            if (result == null || result.trim().length() == 0)
                throw new Exception("Copyright empty");
        }
        catch (Exception e)
        {
            fail("VersionExtended should always be available unless the " +
                 "native libraries failed to initialize: " + e);
        }
    }

    /**
     * Test SVNClient.getVersionExtended().
     * @throws Throwable
     */
    public void testVersionExtendedVerbose() throws Throwable
    {
        try
        {
            VersionExtended vx = client.getVersionExtended(true);
            String result = vx.getRuntimeHost();
            if (result == null || result.trim().length() == 0)
                throw new Exception("Runtime host empty");

            // OS name is allowed to be null, but not empty
            result = vx.getRuntimeOSName();
            if (result != null && result.trim().length() == 0)
                throw new Exception("Runtime OS name empty");

            java.util.Iterator<VersionExtended.LinkedLib> ikl;
            ikl = vx.getLinkedLibs();
            if (ikl.hasNext())
            {
                VersionExtended.LinkedLib lib = ikl.next();
                result = lib.getName();
                if (result == null || result.trim().length() == 0)
                    throw new Exception("Linked lib name empty");
                result = lib.getCompiledVersion();
                if (result == null || result.trim().length() == 0)
                    throw new Exception("Linked lib compiled version empty");
                // Runtime version is allowed to be null, but not empty
                result = lib.getRuntimeVersion();
                if (result != null && result.trim().length() == 0)
                    throw new Exception("Linked lib runtime version empty");
            }

            java.util.Iterator<VersionExtended.LoadedLib> ill;
            ill = vx.getLoadedLibs();
            if (ill.hasNext())
            {
                VersionExtended.LoadedLib lib = ill.next();
                result = lib.getName();
                if (result == null || result.trim().length() == 0)
                    throw new Exception("Loaded lib name empty");
                // Version is allowed to be null, but not empty
                result = lib.getVersion();
                if (result != null && result.trim().length() == 0)
                    throw new Exception("Loaded lib version empty");
            }
        }
        catch (Exception e)
        {
            fail("VersionExtended should always be available unless the " +
                 "native libraries failed to initialize: " + e);
        }
    }

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN


        // check the status of the working copy
        thisTest.checkStatus();

        // Test status of non-existent file
        File fileC = new File(thisTest.getWorkingCopy() + "/A", "foo.c");

        MyStatusCallback statusCallback = new MyStatusCallback();
        client.status(fileToSVNPath(fileC, false), Depth.unknown, false, true,
                    false, false, null, statusCallback);
        if (statusCallback.getStatusArray().length > 0)
            fail("File foo.c should not return a status.");

    }

    /**
     * Test the "out of date" info from {@link
     * org.apache.subversion.javahl.SVNClient#status()}.
     *
     * @throws SubversionException
     * @throws IOException

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

        throws SubversionException, IOException
    {
        OneTest thisTest = new OneTest();

        WC wc = thisTest.getWc();
        final Revision firstRevision = Revision.getInstance(1);
        final Revision pegRevision = null;  // Defaults to Revision.HEAD.

        // Copy files from A/B/E to A/B/F.
        String[] srcPaths = { "alpha", "beta" };
        List<CopySource> sources = new ArrayList<CopySource>(srcPaths.length);
        for (String fileName : srcPaths)
        {
            sources.add(
                new CopySource(new File(thisTest.getWorkingCopy(),
                                        "A/B/E/" + fileName).getPath(),
                               firstRevision, pegRevision));
            wc.addItem("A/B/F/" + fileName,
                       wc.getItemContent("A/B/E/" + fileName));
            wc.setItemWorkingCopyRevision("A/B/F/" + fileName, 2);
            addExpectedCommitItem(thisTest.getWCPath(),

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN


    /**
     * Tests that the passed start and end revision are contained
     * within the array of revisions.
     * @since 1.5
     */
    private void assertExpectedMergeRange(long start, long end,
                                          long[] revisions)
    {
        Arrays.sort(revisions);
        for (int i = 0; i < revisions.length; i++) {
            if (revisions[i] <= start) {
                for (int j = i; j < revisions.length; j++)
                {
                    if (end <= revisions[j])
                        return;
                }
                fail("End revision: " + end + " was not in range: " + revisions[0] +
                        " : " + revisions[revisions.length - 1]);
                return;
            }
        }
        fail("Start revision: " + start + " was not in range: " + revisions[0] +
                " : " + revisions[revisions.length - 1]);
    }

    /**
     * Test the basic SVNClient.update functionality with concurrent
     * changes in the repository and the working copy.
     * @throws Throwable
     */
    public void testBasicMergingUpdate() throws Throwable
    {
        // build the first working copy

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

    public void testBasicLogMessage() throws Throwable
    {
        // create the working copy
        OneTest thisTest = new OneTest();

        // get the commit message of the initial import and test it
        List<RevisionRange> ranges = new ArrayList<RevisionRange>(1);
        ranges.add(new RevisionRange(null, null));
        LogMessage lm[] = collectLogMessages(thisTest.getWCPath(), null,
                                             ranges, false, true, false, 0);
        assertEquals("wrong number of objects", 1, lm.length);
        assertEquals("wrong message", "Log Message", lm[0].getMessage());
        assertEquals("wrong revision", 1, lm[0].getRevisionNumber());
        assertEquals("wrong user", "jrandom", lm[0].getAuthor());
        assertNotNull("changed paths set", lm[0].getChangedPaths());
        Set<ChangePath> cp = lm[0].getChangedPaths();
        assertEquals("wrong number of chang pathes", 20, cp.size());
        ChangePath changedApath = cp.toArray(new ChangePath[1])[0];
        assertNotNull("wrong path", changedApath);
        assertEquals("wrong copy source rev", -1,
                      changedApath.getCopySrcRevision());

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

     * @since 1.2
     */
    public void testBasicInfo2() throws Throwable
    {
        // build the first working copy
        OneTest thisTest = new OneTest();

        final String failureMsg = "Incorrect number of info objects";
        Info[] infos = collectInfos(thisTest.getWCPath(), null, null,
                                     Depth.empty, null);
        assertEquals(failureMsg, 1, infos.length);
        infos = collectInfos(thisTest.getWCPath(), null, null, Depth.infinity,
                             null);
        assertEquals(failureMsg, 21, infos.length);
        for (Info info : infos)
        {
            assertNull("Unexpected changelist present",
                       info.getChangelistName());

            boolean isFile = info.getKind() == NodeKind.file;
            assertTrue("Unexpected working file size " + info.getWorkingSize()
                       + " for '" + info + '\'',
                       (isFile ? info.getWorkingSize() > -1 :
                        info.getWorkingSize() == -1));

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

        // so obstructions are tolerated
        client.checkout(thisTest.getUrl(), secondWC, null, null,
                        Depth.infinity, false, true);

        // Check the WC status, the only status should be a text
        // mod to lambda.  All the other obstructing files were identical
        MyStatusCallback statusCallback = new MyStatusCallback();
        client.status(secondWC, Depth.unknown, false, false, false, false,
                    null, statusCallback);
        Status[] secondWCStatus = statusCallback.getStatusArray();
        if (!(secondWCStatus.length == 1 &&
            secondWCStatus[0].getPath().endsWith("A/B/lambda") &&
            secondWCStatus[0].getTextStatus() == Status.Kind.modified &&
            secondWCStatus[0].getPropStatus() == Status.Kind.none))
        {
            fail("Unexpected WC status after co with " +
                 "unversioned obstructions");
        }

        // Make a third WC to test obstruction tolerance of sw and up.
        OneTest backupTest = thisTest.copy(".backup2");

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

        {
            private List<DirEntry> dirents = new ArrayList<DirEntry>();

            public void doEntry(DirEntry dirent, Lock lock)
            {
                // All of this is meant to retain backward compatibility with
                // the old svn_client_ls-style API.  For further information
                // about what is going on here, see the comments in
                // libsvn_client/list.c:store_dirent().

                if (dirent.getPath().length() == 0)
                {
                    if (dirent.getNodeKind() == NodeKind.file)
                    {
                        String absPath = dirent.getAbsPath();
                        int lastSeparator = absPath.lastIndexOf('/');
                        String path = absPath.substring(lastSeparator,
                                                        absPath.length());
                        dirent.setPath(path);
                    }
                    else
                    {
                        // It's the requested directory, which we don't want
                        // to add.
                        return;
                    }
                }

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java  view on Meta::CPAN

                {
                    sb.append("         - ");
                }

                sb.append(line);

                return sb.toString();
            }

            /**
             * Left pad the input string to a given length, to simulate
             * printf()-style output. This method appends the output to the
             * class sb member.
             * @param sb StringBuffer to append to
             * @param val the input string
             * @param len the minimum length to pad to
             */
            private void pad(StringBuffer sb, String val, int len)
            {
                int padding = len - val.length();

                for (int i = 0; i < padding; i++)
                {
                    sb.append(' ');
                }

                sb.append(val);
            }
        }
    }

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java  view on Meta::CPAN

                    }
                    catch (Exception e)
                    {
                        testCases = null;
                        break;
                    }
                }
            }

            // Add the appropriate set of tests to our test suite.
            if (testCases == null || testCases.length == 0)
            {
                // Add default test suites.
                suite.addTestSuite(SVNReposTests.class);
                suite.addTestSuite(BasicTests.class);
            }
            else
            {
                // Add specific test methods.
                for (int i = 0; i < testCases.length; i++)
                {
                    suite.addTest(testCases[i]);
                }
            }
            return suite;
        }
    }

    /**
     * Main method, will call all tests of all test classes

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java  view on Meta::CPAN

     * command-line arguments, and set them on {@link
     * org.apache.subversion.javahl.tests.SVNTests}.
     *
     * @param args The command line arguments to process.
     */
    private static void processArgs(String[] args)
    {
        if (args == null)
            return;

        for (int i = 0; i < args.length; i++)
        {
            String arg = args[i];
            if ("-d".equals(arg))
            {
                if (i + 1 < args.length)
                {
                    SVNTests.rootDirectoryName = args[++i];
                }
            }
            else if ("-u".equals(arg))
            {
                if (i + 1 < args.length)
                {
                    SVNTests.rootUrl = args[++i];
                }
            }
        }
    }
}

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java  view on Meta::CPAN

        // if not already set, get a usefull value for rootDir
        if (rootDirectoryName == null)
            rootDirectoryName = System.getProperty("test.rootdir");
        if (rootDirectoryName == null)
            rootDirectoryName = System.getProperty("user.dir");
        rootDir = new File(rootDirectoryName);

        // if not already set, get a useful value for root url
        if (rootUrl == null)
            rootUrl = System.getProperty("test.rooturl");
        if (rootUrl == null || rootUrl.trim().length() == 0)
        {
            // if no root url, set build a file url
            rootUrl = rootDir.toURI().toString();
            // The JRE may have a different view about the number of
            // '/' characters to follow "file:" in a URL than
            // Subversion.  We convert to the Subversion view.
            if (rootUrl.startsWith("file:///"))
                ; // this is the form subversion needs
            else if (rootUrl.startsWith("file://"))
                rootUrl = rootUrl.replaceFirst("file://", "file:///");

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java  view on Meta::CPAN

     * @param file  the directory of the repository
     * @return the URL for the repository
     * @throws SubversionException
     */
    protected URI makeReposUrl(File file) throws SubversionException
    {
       try
       {
            // split the common part of the root directory
            String path = file.getAbsolutePath()
                 .substring(this.rootDir.getAbsolutePath().length() + 1);
            // append to the root url
            return new URI(rootUrl + path.replace(File.separatorChar, '/'));
       }
       catch (URISyntaxException ex)
       {
           throw new SubversionException(ex.getMessage());
       }
    }

    /**

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/WC.java  view on Meta::CPAN

    }

    /**
     * Check the result of a single file SVNClient.list call
     * @param tested            the result array
     * @param singleFilePath    the path to be checked
     * @throws Exception
     */
    void check(DirEntry[] tested, String singleFilePath)
    {
        Assert.assertEquals("not a single dir entry", 1, tested.length);
        Item item = items.get(singleFilePath);
        Assert.assertNotNull("not found in working copy", item);
        Assert.assertNotNull("not a file", item.myContent);
        Assert.assertEquals("state says file, working copy not",
                tested[0].getNodeKind(),
                item.nodeKind == null ? NodeKind.file : item.nodeKind);
    }

    /**
     * Check the result of a directory SVNClient.list call

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/WC.java  view on Meta::CPAN

     */
    void check(DirEntry[] tested, String basePath, boolean recursive)
    {
        // clear the touched flag of all items
        for (Item item : items.values())
        {
            item.touched = false;
        }

        // normalize directory path
        if (basePath != null && basePath.length() > 0)
        {
            basePath += '/';
        }
        else
        {
            basePath = "";
        }
        // check all returned DirEntry's
        for (DirEntry entry : tested)
        {

src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/WC.java  view on Meta::CPAN

                workingCopyPath.replace(File.separatorChar, '/');

        // check all result Staus object
        for (Status status : tested)
        {
            String path = status.getPath();
            Assert.assertTrue("status path starts not with working copy path",
                    path.startsWith(normalizeWCPath));

            // we calculate the relative path to the working copy root
            if (path.length() > workingCopyPath.length() + 1)
            {
                Assert.assertEquals("missing '/' in status path",
                        path.charAt(workingCopyPath.length()), '/');
                path = path.substring(workingCopyPath.length() + 1);
            }
            else
                // this is the working copy root itself
                path = "";

            Item item = items.get(path);
            Assert.assertNotNull("status not found in working copy: " + path,
                    item);
            Assert.assertEquals("wrong text status in working copy: " + path,
                    item.textStatus, status.getTextStatus());

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

    /**
     * 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);
        }
    }

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

        {
            Path.isURL(null);
            fail("A null path should raise an exception");
        }
        catch (IllegalArgumentException expected)
        {
        }

        // Subversion "paths" which aren't URLs.
        String[] paths = { "/path", "c:\\path" };
        for (int i = 0; i < paths.length; i++)
        {
            assertFalse("'" + paths[i] + "' should not be considered a URL",
                        Path.isURL(paths[i]));
        }

        // Subversion "paths" which are URLs.
        paths = new String[] { "http://example.com", "svn://example.com",
                               "svn+ssh://example.com", "file:///src/svn/" };
        for (int i = 0; i < paths.length; i++)
        {
            assertTrue("'" + paths[i] + "' should be considered a URL",
                       Path.isURL(paths[i]));
        }
    }

    /**
     * Tests Mergeinfo and RevisionRange classes.
     * @since 1.5
     */
    public void testMergeinfoParser() throws Throwable
    {
        String mergeInfoPropertyValue =
            "/trunk:1-300,305,307,400-405\n/branches/branch:308-400";
        Mergeinfo info = new Mergeinfo(mergeInfoPropertyValue);
        String[] paths = info.getPaths();
        assertEquals(2, paths.length);
        RevisionRange[] trunkRange = info.getRevisionRange("/trunk");
        assertEquals(4, trunkRange.length);
        assertEquals("1-300", trunkRange[0].toString());
        assertEquals("305", trunkRange[1].toString());
        assertEquals("307", trunkRange[2].toString());
        assertEquals("400-405", trunkRange[3].toString());
        RevisionRange[] branchRange =
            info.getRevisionRange("/branches/branch");
        assertEquals(1, branchRange.length);
    }

    /**
     * Test the basic SVNClient.status functionality.
     * @throws Throwable
     */
    public void testBasicStatus() throws Throwable
    {
        // build the test setup
        OneTest thisTest = new OneTest();

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

        throws SubversionException, IOException
    {
        OneTest thisTest = new OneTest();

        WC wc = thisTest.getWc();
        final Revision firstRevision = Revision.getInstance(1);
        final Revision pegRevision = null;  // Defaults to Revision.HEAD.

        // Copy files from A/B/E to A/B/F.
        String[] srcPaths = { "alpha", "beta" };
        CopySource[] sources = new CopySource[srcPaths.length];
        for (int i = 0; i < srcPaths.length; i++)
        {
            String fileName = srcPaths[i];
            sources[i] =
                new CopySource(new File(thisTest.getWorkingCopy(),
                                        "A/B/E/" + fileName).getPath(),
                               firstRevision, pegRevision);
            wc.addItem("A/B/F/" + fileName,
                       wc.getItemContent("A/B/E/" + fileName));
            wc.setItemWorkingCopyRevision("A/B/F/" + fileName, 2);
            addExpectedCommitItem(thisTest.getWCPath(), thisTest.getUrl(),

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

     * @since 1.5
     */
    public void testMove()
        throws SubversionException, IOException
    {
        OneTest thisTest = new OneTest();
        WC wc = thisTest.getWc();

        // Move files from A/B/E to A/B/F.
        String[] srcPaths = { "alpha", "beta" };
        for (int i = 0; i < srcPaths.length; i++)
        {
            String fileName = srcPaths[i];
            srcPaths[i] = new File(thisTest.getWorkingCopy(),
                                   "A/B/E/" + fileName).getPath();

            wc.addItem("A/B/F/" + fileName,
                       wc.getItemContent("A/B/E/" + fileName));
            wc.setItemWorkingCopyRevision("A/B/F/" + fileName, 2);
            addExpectedCommitItem(thisTest.getWCPath(), thisTest.getUrl(),
                                  "A/B/F/" + fileName, NodeKind.file,

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

     */
    private void assertExpectedSuggestion(String expectedSrc,
                                          String destPath, OneTest thisTest)
        throws SubversionException
    {
        String wcPath = fileToSVNPath(new File(thisTest.getWCPath(),
                                               destPath), false);
        String[] suggestions = client.suggestMergeSources(wcPath,
                                                          Revision.WORKING);
        assertNotNull(suggestions);
        assertTrue(suggestions.length >= 1);
        assertTrue("Unexpected copy source path, expected " +
                   expectedSrc + ", got " + suggestions[0],
                   expectedSrc.equals(suggestions[0]));

        // Same test using URL
        String url = thisTest.getUrl() + "/" + destPath;
        suggestions = client.suggestMergeSources(url, Revision.HEAD);
        assertNotNull(suggestions);
        assertTrue(suggestions.length >= 1);
        assertTrue("Unexpected copy source path, expected " +
                   expectedSrc + ", got " + suggestions[0],
                   expectedSrc.equals(suggestions[0]));

    }

    /**
     * Tests that the passed start and end revision are contained
     * within the array of revisions.
     * @since 1.5
     */
    private void assertExpectedMergeRange(long start, long end,
                                          long[] revisions)
    {
        Arrays.sort(revisions);
        for (int i = 0; i < revisions.length; i++) {
            if (revisions[i] <= start) {
                for (int j = i; j < revisions.length; j++)
                {
                    if (end <= revisions[j])
                        return;
                }
                fail("End revision: " + end + " was not in range: " + revisions[0] +
                        " : " + revisions[revisions.length - 1]);
                return;
            }
        }
        fail("Start revision: " + start + " was not in range: " + revisions[0] +
                " : " + revisions[revisions.length - 1]);
    }

    /**
     * Test the basic SVNClient.update functionality with concurrent
     * changes in the repository and the working copy.
     * @throws Throwable
     */
    public void testBasicMergingUpdate() throws Throwable
    {
        // build the first working copy

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

     * @throws Throwable
     */
    public void testBasicLogMessage() throws Throwable
    {
        // create the working copy
        OneTest thisTest = new OneTest();

        // get the commit message of the initial import and test it
        LogMessage lm[] = client.logMessages(thisTest.getWCPath(), null,
                                             null, false, true);
        assertEquals("wrong number of objects", 1, lm.length);
        assertEquals("wrong message", "Log Message", lm[0].getMessage());
        assertEquals("wrong revision", 1, lm[0].getRevisionNumber());
        assertEquals("wrong user", "jrandom", lm[0].getAuthor());
        assertNotNull("changed paths set", lm[0].getChangedPaths());
        ChangePath cp[] = lm[0].getChangedPaths();
        assertEquals("wrong number of chang pathes", 20, cp.length);
        assertEquals("wrong path", "/A", cp[0].getPath());
        assertEquals("wrong copy source rev", -1, cp[0].getCopySrcRevision());
        assertNull("wrong copy source path", cp[0].getCopySrcPath());
        assertEquals("wrong action", 'A', cp[0].getAction());
        assertEquals("wrong time with getTimeMicros()",
                     lm[0].getTimeMicros()/1000,
                     lm[0].getDate().getTime());
        assertEquals("wrong time with getTimeMillis()",
                     lm[0].getTimeMillis(),
                     lm[0].getDate().getTime());

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

     * @throws Throwable
     * @since 1.2
     */
    public void testBasicInfo2() throws Throwable
    {
        // build the first working copy
        OneTest thisTest = new OneTest();

        final String failureMsg = "Incorrect number of info objects";
        Info2[] infos = client.info2(thisTest.getWCPath(), null, null, false);
        assertEquals(failureMsg, 1, infos.length);
        infos = client.info2(thisTest.getWCPath(), null, null, true);
        assertEquals(failureMsg, 21, infos.length);
        for (int i = 0; i < infos.length; i++)
        {
            Info2 info = infos[i];
            assertNull("Unexpected changelist present",
                       info.getChangelistName());

            boolean isFile = info.getKind() == NodeKind.file;
            assertTrue("Unexpected working file size " + info.getWorkingSize()
                       + " for '" + info + '\'',
                       (isFile ? info.getWorkingSize() > -1 :
                        info.getWorkingSize() == -1));

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

     */
    public void testBasicMerge() throws Throwable
    {
        OneTest thisTest = setupAndPerformMerge();

        // Verify that there are now potential merge sources.
        String[] suggestedSrcs =
            client.suggestMergeSources(thisTest.getWCPath() + "/branches/A",
                                       Revision.WORKING);
        assertNotNull(suggestedSrcs);
        assertEquals(1, suggestedSrcs.length);

        // Test that getMergeinfo() returns null.
        assertNull(client.getMergeinfo(new File(thisTest.getWCPath(), "A")
                                       .toString(), Revision.HEAD));

        // Merge and commit some changes (r4).
        appendText(thisTest, "A/mu", "xxx", 4);
        appendText(thisTest, "A/D/G/rho", "yyy", 4);
        assertEquals("wrong revision number from commit",
                     client.commit(new String[] { thisTest.getWCPath() },

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

     */
    public void testRecordOnlyMerge() throws Throwable
    {
        OneTest thisTest = setupAndPerformMerge();

        // Verify that there are now potential merge sources.
        String[] suggestedSrcs =
            client.suggestMergeSources(thisTest.getWCPath() + "/branches/A",
                                       Revision.WORKING);
        assertNotNull(suggestedSrcs);
        assertEquals(1, suggestedSrcs.length);

        // Test that getMergeinfo() returns null.
        assertNull(client.getMergeinfo(new File(thisTest.getWCPath(), "A")
                                       .toString(), Revision.HEAD));

        // Merge and commit some changes (r4).
        appendText(thisTest, "A/mu", "xxx", 4);
        appendText(thisTest, "A/D/G/rho", "yyy", 4);
        assertEquals("wrong revision number from commit",
                     client.commit(new String[] { thisTest.getWCPath() },

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

    private OneTest setupAndPerformMerge()
        throws Exception
    {
        OneTest thisTest = new OneTest();

        // Verify that there are initially no potential merge sources.
        String[] suggestedSrcs =
            client.suggestMergeSources(thisTest.getWCPath(),
                                       Revision.WORKING);
        assertNotNull(suggestedSrcs);
        assertEquals(0, suggestedSrcs.length);

        // create branches directory in the repository (r2)
        addExpectedCommitItem(null, thisTest.getUrl(), "branches",
                              NodeKind.none, CommitItemStateFlags.Add);
        client.mkdir(new String[]{thisTest.getUrl() + "/branches"}, "log_msg");

        // copy A to branches (r3)
        addExpectedCommitItem(null, thisTest.getUrl(), "branches/A",
                              NodeKind.none, CommitItemStateFlags.Add);
        client.copy(thisTest.getUrl() + "/A", thisTest.getUrl() +

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN

        // build the test setup. Used for the changes
        OneTest thisTest = new OneTest();
        WC wc = thisTest.getWc();

        // build the backup test setup. That is the one that will be updated
        OneTest tcTest = thisTest.copy(".tree-conflict");


        // Move files from A/B/E to A/B/F.
        String[] srcPaths = { "alpha" };
        for (int i = 0; i < srcPaths.length; i++)
        {
            String fileName = srcPaths[i];
            srcPaths[i] = new File(thisTest.getWorkingCopy(),
                                   "A/B/E/" + fileName).getPath();

            wc.addItem("A/B/F/" + fileName,
                       wc.getItemContent("A/B/E/" + fileName));
            wc.setItemWorkingCopyRevision("A/B/F/" + fileName, 2);
            addExpectedCommitItem(thisTest.getWCPath(), thisTest.getUrl(),
                                  "A/B/F/" + fileName, NodeKind.file,

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java  view on Meta::CPAN


        // Attempt to checkout backup WC with "--force"
        // so obstructions are tolerated
        client.checkout(thisTest.getUrl(), secondWC, null, null,
                        Depth.infinity, false, true);

        // Check the WC status, the only status should be a text
        // mod to lambda.  All the other obstructing files were identical
        Status[] secondWCStatus = client.status(secondWC, true, false,
                                                false, false, false);
        if (!(secondWCStatus.length == 1 &&
            secondWCStatus[0].getPath().endsWith("A/B/lambda") &&
            secondWCStatus[0].getTextStatus() == StatusKind.modified &&
            secondWCStatus[0].getPropStatus() == StatusKind.none))
        {
            fail("Unexpected WC status after co with " +
                 "unversioned obstructions");
        }

        // Make a third WC to test obstruction tolerance of sw and up.
        OneTest backupTest = thisTest.copy(".backup2");

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/RunTests.java  view on Meta::CPAN

                    }
                    catch (Exception e)
                    {
                        testCases = null;
                        break;
                    }
                }
            }

            // Add the appropriate set of tests to our test suite.
            if (testCases == null || testCases.length == 0)
            {
                // Add default test suites.
                suite.addTestSuite(SVNAdminTests.class);
                suite.addTestSuite(BasicTests.class);
            }
            else
            {
                // Add specific test methods.
                for (int i = 0; i < testCases.length; i++)
                {
                    suite.addTest(testCases[i]);
                }
            }
            return suite;
        }
    }

    /**
     * Main method, will call all tests of all test classes

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/RunTests.java  view on Meta::CPAN

     * command-line arguments, and set them on {@link
     * org.tigris.subversion.javahl.tests.SVNTests}.
     *
     * @param args The command line arguments to process.
     */
    private static void processArgs(String[] args)
    {
        if (args == null)
            return;

        for (int i = 0; i < args.length; i++)
        {
            String arg = args[i];
            if ("-d".equals(arg))
            {
                if (i + 1 < args.length)
                {
                    SVNTests.rootDirectoryName = args[++i];
                }
            }
            else if ("-u".equals(arg))
            {
                if (i + 1 < args.length)
                {
                    SVNTests.rootUrl = args[++i];
                }
            }
        }
    }
}

src/subversion/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNAdminTests.java  view on Meta::CPAN

    {
        OneTest thisTest = new OneTest(false);
        final String MSG = "Initial repository creation";
        admin.setRevProp(thisTest.getRepositoryPath(), Revision.getInstance(0),
                         "svn:log", MSG, false, false);
        PropertyData[] pdata = client.revProperties(
                                      makeReposUrl(thisTest.getRepository()),
                                      Revision.getInstance(0));
        assertNotNull("expect non null rev props");
        String logMessage = null;
        for (int i = 0; i < pdata.length; i++)
        {
            if ("svn:log".equals(pdata[i].getName()))
            {
                logMessage = pdata[i].getValue();
                break;
            }
        }
        assertEquals("expect rev prop change to take effect", MSG, logMessage);
    }
    public void testLoadRepo()



( run in 0.628 second using v1.01-cache-2.11-cpan-65fba6d93b7 )