You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by as...@apache.org on 2012/11/24 21:29:48 UTC
svn commit: r1413258 [2/33] - in /subversion/branches/compressed-pristines:
./ build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/emacs/ contrib/server-side/fsfsfixer/ notes/
notes/directory-index/ subversion/ subve...
Modified: subversion/branches/compressed-pristines/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/configure.ac?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/configure.ac (original)
+++ subversion/branches/compressed-pristines/configure.ac Sat Nov 24 20:29:11 2012
@@ -479,8 +479,9 @@ if test "$svn_lib_sasl" = "yes"; then
[Defined if Cyrus SASL v2 is present on the system])
fi
-dnl Mac OS soecufuc features -------------------
+dnl Mac OS specific features -------------------
+SVN_LIB_MACHO_ITERATE
SVN_LIB_MACOS_PLIST
SVN_LIB_MACOS_KEYCHAIN
@@ -501,7 +502,7 @@ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
CPPFLAGS="$old_CPPFLAGS"
-dnl D-Bus (required for support for KWallet and GNOME Keyring) -------------------
+dnl D-Bus (required for support for KWallet) -------------------
if test -n "$PKG_CONFIG"; then
AC_MSG_CHECKING([for D-Bus .pc file])
@@ -544,9 +545,7 @@ AS_HELP_STRING([--without-gpg-agent],
[Disable support for GPG-Agent]),
[], [with_gpg_agent=yes])
AC_MSG_CHECKING([whether to support GPG-Agent])
-if test "$svn_enable_shared" != "yes"; then
- AC_MSG_RESULT([no (shared library support is disabled)])
-elif test "$with_gpg_agent" = "yes"; then
+if test "$with_gpg_agent" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([SVN_HAVE_GPG_AGENT], [1],
[Is GPG Agent support enabled?])
@@ -560,50 +559,65 @@ dnl GNOME Keyring -------------------
AC_ARG_WITH(gnome_keyring,
AS_HELP_STRING([--with-gnome-keyring],
- [Enable use of GNOME Keyring for auth credentials]),
+ [Enable use of GNOME Keyring for auth credentials (enabled by default if found)]),
[with_gnome_keyring="$withval"],
- [with_gnome_keyring=no])
+ [with_gnome_keyring=auto])
+found_gnome_keyring=no
AC_MSG_CHECKING([whether to look for GNOME Keyring])
if test "$with_gnome_keyring" != "no"; then
AC_MSG_RESULT([yes])
if test "$svn_enable_shared" = "yes"; then
if test "$APR_HAS_DSO" = "yes"; then
if test -n "$PKG_CONFIG"; then
- if test "$HAVE_DBUS" = "yes"; then
- AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
- if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
+ AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
+ if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
+ AC_MSG_RESULT([yes])
+ old_CPPFLAGS="$CPPFLAGS"
+ SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
+ CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
+ AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
+ AC_MSG_CHECKING([for GNOME Keyring])
+ if test "$found_gnome_keyring" = "yes"; then
AC_MSG_RESULT([yes])
- old_CPPFLAGS="$CPPFLAGS"
- SVN_GNOME_KEYRING_INCLUDES="$DBUS_CPPFLAGS `$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
- CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
- AC_CHECK_HEADER(gnome-keyring.h, with_gnome_keyring=yes, with_gnome_keyring=no)
- AC_MSG_CHECKING([for GNOME Keyring])
+ AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
+ [Is GNOME Keyring support enabled?])
+ CPPFLAGS="$old_CPPFLAGS"
+ SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
+ else
+ AC_MSG_RESULT([no])
if test "$with_gnome_keyring" = "yes"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
- [Is GNOME Keyring support enabled?])
- CPPFLAGS="$old_CPPFLAGS"
- SVN_GNOME_KEYRING_LIBS="$DBUS_LIBS `$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
- else
- AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot find GNOME Keyring])
fi
- else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files])
fi
else
- AC_MSG_ERROR([cannot find D-Bus])
+ AC_MSG_RESULT([no])
+ if test "$with_gnome_keyring" = "yes"; then
+ AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
+ else
+ with_gnome_keyring=no
+ fi
fi
else
- AC_MSG_ERROR([cannot find pkg-config])
+ if test "$with_gnome_keyring" = "yes"; then
+ AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
+ else
+ with_gnome_keyring=no
+ fi
fi
else
- AC_MSG_ERROR([APR does not have support for DSOs])
+ if test "$with_gnome_keyring" = "yes"; then
+ AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
+ else
+ with_gnome_keyring=no
+ fi
fi
else
- AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
+ if test "$with_gnome_keyring" = "yes"; then
+ AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
+ else
+ with_gnome_keyring=no
+ fi
fi
else
AC_MSG_RESULT([no])
@@ -815,7 +829,7 @@ if test "$svn_lib_kwallet" = "yes"; then
INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
fi
-if test "$with_gnome_keyring" = "yes"; then
+if test "$found_gnome_keyring" = "yes"; then
BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
@@ -1003,6 +1017,11 @@ AS_HELP_STRING([--enable-maintainer-mode
CFLAGS="-Wno-system-headers $CFLAGS_KEEP"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"])
+ dnl Put this flag behind -Wall:
+
+ CFLAGS="$CFLAGS_KEEP -Wno-format-nonliteral"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"])
+
AC_LANG_POP([C])
CFLAGS="$CFLAGS_KEEP"
fi
Modified: subversion/branches/compressed-pristines/contrib/client-side/emacs/dsvn.el
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/contrib/client-side/emacs/dsvn.el?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/contrib/client-side/emacs/dsvn.el (original)
+++ subversion/branches/compressed-pristines/contrib/client-side/emacs/dsvn.el Sat Nov 24 20:29:11 2012
@@ -360,21 +360,55 @@ Argument ARG are the command line argume
(append svn-diff-args (split-string arg))
'diff-mode))
+(defun svn-add-unversioned-files-p (files)
+ "Ask the user whether FILES should be added; return the answer."
+ (let ((buf (get-buffer-create "*svn-unversioned-files*")))
+ (with-current-buffer buf
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (insert (mapconcat (lambda (f) f) files "\n"))
+ (setq buffer-read-only t)
+ (goto-char (point-min))
+ (save-selected-window
+ (pop-to-buffer buf)
+ (shrink-window-if-larger-than-buffer)
+ (let* ((n (length files))
+ (add-them (y-or-n-p
+ (if (= n 1)
+ "Add this item first? "
+ (format "Add these %d items first? " n)))))
+ (let ((win (get-buffer-window buf)))
+ (if win
+ (condition-case nil
+ (delete-window win)
+ (error nil))))
+ (bury-buffer buf)
+ add-them)))))
+
(defun svn-commit ()
"Commit changes to one or more files."
(interactive)
(save-some-buffers)
- (let ((status-buf (current-buffer))
- (commit-buf (get-buffer-create "*svn commit*"))
- (window-conf (and svn-restore-windows (current-window-configuration)))
- (listfun (lambda () (with-current-buffer log-edit-parent-buffer
- (svn-action-files)))))
- (log-edit 'svn-confirm-commit t
- (if (< emacs-major-version 23)
- listfun
- (list (cons 'log-edit-listfun listfun)))
- commit-buf)
- (set (make-local-variable 'saved-window-configuration) window-conf)))
+ (let ((unversioned-files (svn-action-files
+ (lambda (pos) (eq (svn-file-status pos) ?\?)))))
+ (if unversioned-files
+ (if (svn-add-unversioned-files-p unversioned-files)
+ (progn
+ (message "Adding unversioned items. Please re-commit when ready.")
+ (svn-run 'add unversioned-files "Adding files"))
+ (message "Files not added; nothing committed."))
+ (let ((status-buf (current-buffer))
+ (commit-buf (get-buffer-create "*svn commit*"))
+ (window-conf (and svn-restore-windows
+ (current-window-configuration)))
+ (listfun (lambda () (with-current-buffer log-edit-parent-buffer
+ (svn-action-files)))))
+ (log-edit 'svn-confirm-commit t
+ (if (< emacs-major-version 23)
+ listfun
+ (list (cons 'log-edit-listfun listfun)))
+ commit-buf)
+ (set (make-local-variable 'saved-window-configuration) window-conf)))))
(defun svn-confirm-commit ()
"Commit changes with the current buffer as commit message."
@@ -1643,27 +1677,24 @@ Set it if MARK is non-NIL, and clear it
"Return a list of lists (FILE POS) to act on.
Optional argument PRED is a predicate function that is called with POS as
argument."
- (let ((files ())
- (pos (next-single-property-change (point-min) 'svn-file)))
- (while pos
- (when (and (get-text-property pos 'svn-mark)
- (or (not pred)
- (funcall pred pos)))
- (setq files (cons (list (get-text-property pos 'svn-file)
- pos)
- files)))
- (setq pos (next-single-property-change pos 'svn-file)))
- (if (null files)
- (let ((file (svn-getprop (point) 'file)))
- (unless file
- (error "No file on this line"))
- (when (and pred
- (not (funcall pred (line-beginning-position))))
- (error "Invalid file"))
- (list (list file
- (save-excursion
- (beginning-of-line)
- (point)))))
+ (let ((positions ()))
+ (let ((pos (next-single-property-change (point-min) 'svn-file)))
+ (while pos
+ (when (get-text-property pos 'svn-mark)
+ (setq positions (cons pos positions)))
+ (setq pos (next-single-property-change pos 'svn-file))))
+ (when (null positions)
+ (unless (svn-getprop (point) 'file)
+ (error "No file on this line"))
+ (setq positions (list (line-beginning-position))))
+
+ (let ((files ()))
+ (mapc (lambda (pos)
+ (when (or (not pred) (funcall pred pos))
+ (setq files (cons (list (get-text-property pos 'svn-file)
+ pos)
+ files))))
+ (reverse positions))
(reverse files))))
(defun svn-action-files (&optional pred)
Modified: subversion/branches/compressed-pristines/contrib/server-side/fsfsfixer/fix-repo
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/contrib/server-side/fsfsfixer/fix-repo?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/contrib/server-side/fsfsfixer/fix-repo (original)
+++ subversion/branches/compressed-pristines/contrib/server-side/fsfsfixer/fix-repo Sat Nov 24 20:29:11 2012
@@ -5,6 +5,7 @@ Usage: $0 REPO-DIR START-REV
Backup your repository before running these scripts."
+THIS_DIR=`dirname "$0"`
REPO_DIR="$1"
START_REV="$2"
@@ -13,7 +14,7 @@ if [ ! -d "$REPO_DIR" ] || [ "$START_REV
exit 1
fi
-YOUNGEST="$(svnlook youngest "$REPO_DIR")"
+YOUNGEST=`svnlook youngest "$REPO_DIR"`
if [ "$YOUNGEST" = "" ]; then
echo "$0: error running 'svnlook youngest $REPO_DIR'"
@@ -25,6 +26,6 @@ echo "Verifying revisions $START_REV thr
REV=$START_REV
while [ $REV -le $YOUNGEST ]; do
echo "=== r$REV"
- ./fixer/fix-rev.py "$REPO_DIR" "$REV"
+ "$THIS_DIR"/fixer/fix-rev.py "$REPO_DIR" "$REV"
REV=`expr $REV + 1`
done
Modified: subversion/branches/compressed-pristines/notes/directory-index/dirindex.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/notes/directory-index/dirindex.py?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/notes/directory-index/dirindex.py (original)
+++ subversion/branches/compressed-pristines/notes/directory-index/dirindex.py Sat Nov 24 20:29:11 2012
@@ -42,7 +42,6 @@ class SQLclass(object):
def __init__(self):
import cStringIO
import pkgutil
- import re
comment_rx = re.compile(r"\s*--.*$")
header_rx = re.compile(r"^---(?P<kind>STATEMENT|SCRIPT)"
@@ -215,7 +214,6 @@ class Txn(SQLobject):
self.created = self._now()
super(Txn, self)._put(cursor)
if self.treeid is None:
- SQL.TXN_UPDATE_INITIAL_TREEID(cursor, id = self.id)
self.treeid = self.id
@classmethod
@@ -253,49 +251,6 @@ class Txn(SQLobject):
SQL.TXN_CLEANUP(cursor, id = self.id)
-class Branch(SQLobject):
- """O/R mapping for the "branch" table."""
-
- _columns = ("id", "treeid", "nodeid", "origin", "state")
- _put_statement = SQL.BRANCH_INSERT
- _get_statement = SQL.BRANCH_GET
-
- # state
- TRANSIENT = "T"
- PERMANENT = "P"
-
- def __init__(self, **kwargs):
- super(Branch, self).__init__(**kwargs)
- if self.state is None:
- self.state = self.TRANSIENT
-
- def _put(self, cursor):
- super(Branch, self)._put(cursor)
- if self.nodeid is None:
- SQL.BRANCH_UPDATE_INITIAL_NODEID(cursor, id = self.id)
- self.nodeid = self.id
-
- @classmethod
- def _update_treeid(cls, cursor, new_txn, old_txn):
- SQL.BRANCH_UPDATE_TREEID(cursor,
- new_treeid = new_txn.treeid,
- old_treeid = old_txn.treeid)
-
- @classmethod
- def _history(cls, cursor, nodeid):
- SQL.BRANCH_HISTORY(cursor, nodeid = nodeid)
- for row in cursor:
- yield cls._from_row(row)
-
- @classmethod
- def _commit(cls, cursor, txn):
- SQL.BRANCH_COMMIT(cursor, treeid = txn.treeid)
-
- @classmethod
- def _cleanup(cls, cursor, txn):
- SQL.BRANCH_CLEANUP(cursor, treeid = txn.treeid)
-
-
class NodeRev(SQLobject):
"""O/R mapping for the noderev/string/nodeview table."""
@@ -330,8 +285,8 @@ class NodeRev(SQLobject):
self.state = self.TRANSIENT
def __str__(self):
- return "%d %c %s%s" % (self.treeid, self.opcode, self.name,
- self._isdir and '/' or '')
+ return "%d(%d) %c %s%s" % (self.id, self.treeid, self.opcode,
+ self.name, self._isdir and '/' or '')
# Opcode names
__opnames = {ADD: "add",
@@ -384,6 +339,10 @@ class NodeRev(SQLobject):
assert self.dename is not None
self.denameid = self.__stringid(cursor, self.dename)
super(NodeRev, self)._put(cursor)
+ if self.nodeid is None:
+ self.nodeid = self.id
+ if self.branch is None:
+ self.branch = self.id
@classmethod
def _update_treeid(cls, cursor, new_txn, old_txn):
@@ -472,10 +431,6 @@ class NodeRev(SQLobject):
track.close(cls.__find(cursor, parent.branch, parts[-1], txn))
return track
- def _count_successors(self, cursor):
- SQL.NODEREV_COUNT_SUCCESSORS(cursor, origin = self.id)
- return int(cursor.fetchone()[0])
-
def _listdir(self, cursor, txn):
assert self._isdir
if txn.state != txn.PERMANENT:
@@ -501,17 +456,13 @@ class NodeRev(SQLobject):
def _branch(self, cursor, parent, txn, replaced=False):
assert txn._uncommitted
- branch = Branch(treeid = txn.treeid,
- nodeid = self.nodeid,
- origin = self.branch)
- branch._put(cursor)
if self._isdir:
opcode = replaced and self.LAZY_BREPLACE or self.LAZY
else:
opcode = replaced and self.BREPLACE or self.BRANCH
node = self._revise(opcode, txn)
node.parent = parent.id
- node.branch = branch.id
+ node.branch = None
node._put(cursor)
return node
@@ -519,7 +470,9 @@ class NodeRev(SQLobject):
assert txn._uncommitted
noderev = NodeRev._clone(self)
noderev.treeid = txn.treeid
+ noderev.origin = self.id
noderev.opcode = opcode
+ return noderev
__readonly = frozenset(("name",))
def __setitem__(self, key, value):
@@ -528,7 +481,10 @@ class NodeRev(SQLobject):
if key == "dename":
name = self.__normtext(value)
value = self.__text(value)
- super(NodeRev, self).__setitem__("name", name)
+ if name != self.name:
+ super(NodeRev, self).__setitem__("name", name)
+ super(NodeRev, self).__setitem__("nameid", None)
+ super(NodeRev, self).__setitem__("denameid", None)
super(NodeRev, self).__setitem__(key, value)
def __getitem__(self, key):
@@ -680,12 +636,10 @@ class Index(object):
def commit_txn(self, txn, revision):
txn._commit(self.cursor, revision)
NodeRev._commit(self.cursor, txn)
- Branch._commit(self.cursor, txn)
def abort_txn(self, txn):
txn._abort(self.cursor)
NodeRev._cleanup(self.cursor, txn)
- Branch._cleanup(self.cursor, txn)
txn._cleanup(self.cursor)
def listdir(self, txn, noderev):
@@ -743,11 +697,9 @@ class Index(object):
newnode = origin._branch(self.cursor, parent.id, txn,
replaced = (oldnode is not None))
else:
- branch = Branch(treeid = txn.treeid)
- branch._put(self.cursor)
newnode = NodeRev(treeid = txn.treeid,
- nodeid = branch.nodeid,
- branch = branch.id,
+ nodeid = None,
+ branch = None,
parent = parent.id,
kind = kind,
opcode = opcode)
@@ -777,6 +729,45 @@ class Tree(object):
index.rollback()
+__greek_tree = {
+ 'iota': 'file',
+ 'A': {
+ 'mu': 'file',
+ 'B': {
+ 'lambda': 'file',
+ 'E': {
+ 'alpha': 'file',
+ 'beta': 'file'},
+ 'F': 'dir'},
+ 'C': 'dir',
+ 'D': {
+ 'G': {
+ 'pi': 'file',
+ 'rho': 'file',
+ 'tau': 'file'},
+ 'H': {
+ 'chi': 'file',
+ 'psi': 'file',
+ 'omega': 'file'}
+ }
+ }
+ }
+def greektree(ix, tx):
+ def populate(track, items):
+ print 'Populating', track
+ for name, kind in items.iteritems():
+ if kind == 'file':
+ node = ix.add(tx, track, name, NodeRev.FILE)
+ else:
+ node = ix.add(tx, track, name, NodeRev.DIR)
+ print 'Added', node, 'node:', node.noderev
+ if isinstance(kind, dict):
+ populate(node, kind)
+
+ root = ix.lookup(tx)
+ populate(root, __greek_tree)
+
+
def simpletest(database):
ix = Index(database)
ix.initialize()
@@ -789,37 +780,34 @@ def simpletest(database):
print "root track:", root
print "root noderev", root.noderev
- print "Add A/foo"
+ print 'Create greek tree'
tx = ix.new_txn(0)
print "transaction:", tx
- parent = ix.add(tx, root, "A", NodeRev.DIR)
- print "A track:", parent
- print "A noderev", parent.noderev
-
- node = ix.add(tx, parent, "foo", NodeRev.FILE)
- print "foo track:", node
- print "foo noderev", node.noderev
+ greektree(ix, tx)
ix.commit_txn(tx, 1)
ix.commit()
+
+ def listdir(noderev, prefix):
+ for n in ix.listdir(tx, noderev):
+ print prefix, str(n)
+ if n._isdir:
+ listdir(n, prefix + " ")
+
print "List contents"
tx = ix.get_txn()
print "transaction:", tx
root = ix.lookup(tx)
print str(root.noderev)
- for n1 in ix.listdir(tx, root.noderev):
- print " ", str(n1)
- if n1._isdir:
- for n2 in ix.listdir(tx, n1):
- print " ", str(n2)
-
- print "Lookup A"
- track = ix.lookup(tx, None, "A")
- print str(track.noderev)
-
- print "Lookup A/foo"
- track = ix.lookup(tx, None, "A/foo")
- print str(track.noderev)
+ listdir(root.noderev, " ")
+
+ print "Lookup iota"
+ track = ix.lookup(tx, None, "iota")
+ print str(track), str(track.noderev)
+
+ print "Lookup A/D/H/psi"
+ track = ix.lookup(tx, None, "A/D/H/psi")
+ print str(track), str(track.noderev)
finally:
ix.close()
Modified: subversion/branches/compressed-pristines/notes/directory-index/schema.sql
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/notes/directory-index/schema.sql?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/notes/directory-index/schema.sql (original)
+++ subversion/branches/compressed-pristines/notes/directory-index/schema.sql Sat Nov 24 20:29:11 2012
@@ -22,7 +22,6 @@
DROP VIEW IF EXISTS nodeview;
DROP TABLE IF EXISTS noderev;
DROP TABLE IF EXISTS string;
-DROP TABLE IF EXISTS branch;
DROP TABLE IF EXISTS txn;
@@ -61,36 +60,10 @@ CREATE TABLE txn (
CREATE INDEX txn_revision_idx ON txn(revision);
-
--- Branches -- unique forks in the nodes' history
-CREATE TABLE branch (
- -- branch identifier
- id integer NOT NULL PRIMARY KEY,
-
- -- the transaction in which the branch was created
- treeid integer NOT NULL REFERENCES txn(id),
-
- -- the node to which this branch belongs; refers to the initial
- -- branch of the node
- nodeid integer NULL REFERENCES branch(id),
-
- -- the source branch from which this branch was forked
- origin integer NULL REFERENCES branch(id),
-
- -- mark branches in uncommitted transactions so that they can be
- -- ignored by branch traversals
- -- T = transient (uncommitted), P = permanent (committed)
- state character(1) NOT NULL DEFAULT 'T',
-
- -- sanity check: enumerated value validation
- CONSTRAINT enumeration_validation CHECK (state IN ('T', 'P')),
-
- -- sanity check: ye can't be yer own daddy
- CONSTRAINT genetic_diversity CHECK (id <> origin)
-);
-
-CREATE INDEX branch_txn_idx ON branch(treeid);
-CREATE INDEX branch_node_idx ON branch(nodeid);
+CREATE TRIGGER txn_ensure_treeid AFTER INSERT ON txn
+BEGIN
+ UPDATE txn SET treeid = NEW.id WHERE treeid IS NULL AND id = NEW.id;
+END;
-- File names -- lookup table of strings
@@ -108,18 +81,19 @@ CREATE TABLE noderev (
-- the transaction in which the node was changed
treeid integer NOT NULL REFERENCES txn(id),
- -- the node identifier; a new node will get the ID of its initial
- -- branch
- nodeid integer NOT NULL REFERENCES branch(id),
+ -- the node identifier
+ -- a new node will get the ID of its initial noderev.id
+ nodeid integer NULL REFERENCES noderev(id),
-- this node revision's immediate predecessor
origin integer NULL REFERENCES noderev(id),
-- the parent (directory) of this node revision -- tree graph
- parent integer NULL REFERENCES branch(id),
+ parent integer NULL REFERENCES noderev(id),
-- the branch that this node revision belongs to -- history graph
- branch integer NOT NULL REFERENCES branch(id),
+ -- a new branch will get the ID of its initial noderev.id
+ branch integer NULL REFERENCES noderev(id),
-- the indexable, NFC-normalized name of this noderev within its parent
nameid integer NOT NULL REFERENCES string(id),
@@ -171,8 +145,15 @@ CREATE TABLE noderev (
CREATE UNIQUE INDEX noderev_tree_idx ON noderev(parent,nameid,treeid,opcode);
CREATE INDEX noderev_txn_idx ON noderev(treeid);
CREATE INDEX nodefev_node_idx ON noderev(nodeid);
+CREATE INDEX noderev_branch_idx ON noderev(branch);
CREATE INDEX noderev_successor_idx ON noderev(origin);
+CREATE TRIGGER noderev_ensure_node_and_branch AFTER INSERT ON noderev
+BEGIN
+ UPDATE noderev SET nodeid = NEW.id WHERE nodeid IS NULL AND id = NEW.id;
+ UPDATE noderev SET branch = NEW.id WHERE branch IS NULL AND id = NEW.id;
+END;
+
CREATE VIEW nodeview AS
SELECT
@@ -188,7 +169,6 @@ CREATE VIEW nodeview AS
INSERT INTO txn (id, treeid, revision, created, state)
VALUES (0, 0, 0, 'EPOCH', 'P');
-INSERT INTO branch (id, treeid, nodeid, state) VALUES (0, 0, 0, 'P');
INSERT INTO string (id, val) VALUES (0, '');
INSERT INTO noderev (id, treeid, nodeid, branch,
nameid, denameid, kind, opcode, state)
@@ -199,9 +179,6 @@ INSERT INTO noderev (id, treeid, nodeid,
INSERT INTO txn (treeid, revision, created, author)
VALUES (:treeid, :revision, :created, :author);
----STATEMENT TXN_UPDATE_INITIAL_TREEID
-UPDATE txn SET treeid = :id WHERE id = :id;
-
---STATEMENT TXN_GET
SELECT * FROM txn WHERE id = :id;
@@ -230,28 +207,6 @@ UPDATE txn SET state = 'D' WHERE id = :i
---STATEMENT TXN_CLEANUP
DELETE FROM txn WHERE id = :id;
----STATEMENT BRANCH_INSERT
-INSERT INTO branch (nodeid, treeid, origin)
- VALUES (:nodeid, :treeid, :origin);
-
----STATEMENT BRANCH_UPDATE_INITIAL_NODEID
-UPDATE branch SET nodeid = :id WHERE id = :id;
-
----STATEMENT BRANCH_UPDATE_TREEID
-UPDATE branch SET treeid = :new_treeid WHERE treeid = :old_treeid;
-
----STATEMENT BRANCH_GET
-SELECT * FROM branch WHERE id = :id;
-
----STATEMENT BRANCH_HISTORY
-SELECT * from branch WHERE nodeid = :nodeid ORDER BY id ASC;
-
----STATEMENT BRANCH_COMMIT
-UPDATE branch SET state = 'P' WHERE treeid = :treeid;
-
----STATEMENT BRANCH_CLEANUP
-DELETE FROM branch WHERE treeid = :treeid;
-
---STATEMENT STRING_INSERT
INSERT INTO string (val) VALUES (:val);
@@ -273,9 +228,6 @@ UPDATE noderev SET opcode = :opcode WHER
---STATEMENT NODEVIEW_GET
SELECT * FROM nodeview WHERE id = :id;
----STATEMENT NODEREV_COUNT_SUCCESSORS
-SELECT COUNT(id) FROM noderev WHERE origin = :origin;
-
---STATEMENT NODEREV_COMMIT
UPDATE noderev SET state = 'P' WHERE treeid = :treeid;
@@ -309,7 +261,8 @@ ORDER BY treeid DESC LIMIT 1;
---STATEMENT NODEVIEW_LIST_DIRECTORY
SELECT * FROM nodeview
JOIN (SELECT nameid, MAX(treeid) AS treeid FROM noderev
- WHERE treeid <= :treeid AND state = 'P') AS filter
+ WHERE treeid <= :treeid AND state = 'P'
+ GROUP BY nameid) AS filter
ON nodeview.nameid = filter.nameid AND nodeview.treeid = filter.treeid
WHERE parent = :parent AND opcode <> 'D'
ORDER BY nodeview.name ASC;
@@ -317,7 +270,8 @@ ORDER BY nodeview.name ASC;
---STATEMENT NODEVIEW_LIST_TRANSIENT_DIRECTORY
SELECT * FROM nodeview
JOIN (SELECT nameid, MAX(treeid) AS treeid FROM noderev
- WHERE treeid < :treeid AND state = 'P' OR treeid = :treeid) AS filter
+ WHERE treeid < :treeid AND state = 'P' OR treeid = :treeid
+ GROUP BY nameid) AS filter
ON nodeview.nameid = filter.name AND nodeview.treeid = filter.treeid
WHERE parent = :parent AND opcode <> 'D'
ORDER BY nodeview.name ASC;
Modified: subversion/branches/compressed-pristines/notes/fsfs
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/notes/fsfs?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/notes/fsfs (original)
+++ subversion/branches/compressed-pristines/notes/fsfs Sat Nov 24 20:29:11 2012
@@ -234,6 +234,16 @@ repository. The backed-up "current" fil
new revision which wasn't copied, or which was only partially
populated when it was copied.
+[ Update: as of 1.6, FSFS uses an optional SQLite DB, rep-cache.db, when
+rep-sharing is enabled. SQLite provides no guarantee that copying live
+databases will result in copies that are uncorrupt, or that are corrupt but
+will raise an error when accessed. 'svnadmin hotcopy' avoids the problem by
+establishing an appropriate SQLite lock (see svn_sqlite__hotcopy()). User
+code should either use an atomic filesystem snapshot (as with zfs/LVM),
+refrain from copying rep-cache.db, or stop all access to that file before
+copying it (for example, by disabling commits, by establishing a lock a la
+svn_sqlite__hotcopy(), or by using 'svnadmin freeze'). ]
+
The "svnadmin hotcopy" command avoids this problem by copying the
"current" file before copying the revision files. But a backup using
the hotcopy command isn't as efficient as a straight incremental
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/BlameCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/BlameCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/BlameCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/BlameCallback.cpp Sat Nov 24 20:29:11 2012
@@ -61,11 +61,9 @@ BlameCallback::callback(void *baton,
apr_pool_t *pool)
{
if (baton)
- return ((BlameCallback *)baton)->singleLine(start_revnum, end_revnum,
- line_no, revision, rev_props,
- merged_revision,
- merged_rev_props, merged_path,
- line, local_change, pool);
+ return static_cast<BlameCallback *>(baton)->singleLine(start_revnum,
+ end_revnum, line_no, revision, rev_props, merged_revision,
+ merged_rev_props, merged_path, line, local_change, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ChangelistCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ChangelistCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ChangelistCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ChangelistCallback.cpp Sat Nov 24 20:29:11 2012
@@ -53,7 +53,8 @@ ChangelistCallback::callback(void *baton
apr_pool_t *pool)
{
if (baton)
- ((ChangelistCallback *)baton)->doChangelist(path, changelist, pool);
+ static_cast<ChangelistCallback *>(baton)->doChangelist(path, changelist,
+ pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ClientContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ClientContext.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ClientContext.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ClientContext.cpp Sat Nov 24 20:29:11 2012
@@ -71,7 +71,8 @@ ClientContext::ClientContext(jobject jsv
env->DeleteLocalRef(jctx);
- SVN_JNI_ERR(svn_client_create_context(&m_context, pool.getPool()),
+ SVN_JNI_ERR(svn_client_create_context2(&m_context, NULL,
+ pool.getPool()),
);
/* Clear the wc_ctx as we don't want to maintain this unconditionally
@@ -323,7 +324,7 @@ ClientContext::cancelOperation()
svn_error_t *
ClientContext::checkCancel(void *cancelBaton)
{
- ClientContext *that = (ClientContext *)cancelBaton;
+ ClientContext *that = static_cast<ClientContext *>(cancelBaton);
if (that->m_cancelOperation)
return svn_error_create(SVN_ERR_CANCELLED, NULL,
_("Operation cancelled"));
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitCallback.cpp Sat Nov 24 20:29:11 2012
@@ -57,7 +57,7 @@ CommitCallback::callback(const svn_commi
apr_pool_t *pool)
{
if (baton)
- return ((CommitCallback *)baton)->commitInfo(commit_info, pool);
+ return static_cast<CommitCallback *>(baton)->commitInfo(commit_info, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitMessage.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitMessage.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitMessage.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/CommitMessage.cpp Sat Nov 24 20:29:11 2012
@@ -50,9 +50,9 @@ CommitMessage::callback(const char **log
void *baton,
apr_pool_t *pool)
{
- if (baton && ((CommitMessage *)baton)->m_jcommitMessage)
- return ((CommitMessage *)baton)->getCommitMessage(log_msg, tmp_file,
- commit_items, pool);
+ if (baton && static_cast<CommitMessage *>(baton)->m_jcommitMessage)
+ return static_cast<CommitMessage *>(baton)->getCommitMessage(
+ log_msg, tmp_file, commit_items, pool);
*log_msg = NULL;
*tmp_file = NULL;
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp Sat Nov 24 20:29:11 2012
@@ -46,7 +46,7 @@ DiffSummaryReceiver::summarize(const svn
apr_pool_t *pool)
{
if (baton)
- return ((DiffSummaryReceiver *) baton)->onSummary(diff, pool);
+ return static_cast<DiffSummaryReceiver *>(baton)->onSummary(diff, pool);
return SVN_NO_ERROR;
}
Added: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.cpp?rev=1413258&view=auto
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.cpp (added)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.cpp Sat Nov 24 20:29:11 2012
@@ -0,0 +1,118 @@
+/**
+ * @copyright
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ * @endcopyright
+ *
+ * @file ImportFilterCallback.cpp
+ * @brief Implementation of the class ImportFilterCallback
+ */
+
+#include "ImportFilterCallback.h"
+#include "EnumMapper.h"
+#include "CreateJ.h"
+#include "JNIUtil.h"
+#include "svn_time.h"
+
+/**
+ * Create a ImportFilterCallback object
+ * @param jcallback the Java callback object.
+ */
+ImportFilterCallback::ImportFilterCallback(jobject jcallback)
+{
+ m_callback = jcallback;
+}
+
+/**
+ * Destroy a ImportFilterCallback object
+ */
+ImportFilterCallback::~ImportFilterCallback()
+{
+ // The m_callback does not need to be destroyed, because it is the passed
+ // in parameter to the Java SVNClient.list method.
+}
+
+svn_error_t *
+ImportFilterCallback::callback(void *baton,
+ svn_boolean_t *filtered,
+ const char *local_abspath,
+ const svn_io_dirent2_t *dirent,
+ apr_pool_t *pool)
+{
+ if (baton)
+ return static_cast<ImportFilterCallback *>(baton)->doImportFilter(
+ filtered, local_abspath, dirent, pool);
+
+ return SVN_NO_ERROR;
+}
+
+/**
+ * Callback called for each directory entry.
+ */
+svn_error_t *
+ImportFilterCallback::doImportFilter(svn_boolean_t *filtered,
+ const char *local_abspath,
+ const svn_io_dirent2_t *dirent,
+ apr_pool_t *pool)
+{
+ JNIEnv *env = JNIUtil::getEnv();
+
+ // Create a local frame for our references
+ env->PushLocalFrame(LOCAL_FRAME_SIZE);
+ if (JNIUtil::isJavaExceptionThrown())
+ return SVN_NO_ERROR;
+
+ // The method id will not change during the time this library is
+ // loaded, so it can be cached.
+ static jmethodID mid = 0;
+ if (mid == 0)
+ {
+ jclass clazz = env->FindClass(JAVA_PACKAGE"/callback/ImportFilterCallback");
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN(SVN_NO_ERROR);
+
+ mid = env->GetMethodID(clazz, "filter",
+ "(Ljava/lang/String;"
+ "L"JAVA_PACKAGE"/types/NodeKind;Z)Z");
+ if (JNIUtil::isJavaExceptionThrown() || mid == 0)
+ POP_AND_RETURN(SVN_NO_ERROR);
+ }
+
+ // convert the parameters to their Java relatives
+ jstring jpath = JNIUtil::makeJString(local_abspath);
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN(SVN_NO_ERROR);
+
+ jboolean jspecial = (dirent->special ? JNI_TRUE : JNI_FALSE);
+
+ jobject jkind = EnumMapper::mapNodeKind(dirent->kind);
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN(SVN_NO_ERROR);
+
+ // call the Java method
+ jboolean jfilter = env->CallBooleanMethod(m_callback, mid, jpath, jkind,
+ jspecial);
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN(SVN_NO_ERROR);
+
+ *filtered = jfilter ? TRUE : FALSE;
+
+ env->PopLocalFrame(NULL);
+ return SVN_NO_ERROR;
+}
Added: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.h
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.h?rev=1413258&view=auto
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.h (added)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ImportFilterCallback.h Sat Nov 24 20:29:11 2012
@@ -0,0 +1,62 @@
+/**
+ * @copyright
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ * @endcopyright
+ *
+ * @file ImportFilterCallback.h
+ * @brief Interface of the class ImportFilterCallback
+ */
+
+#ifndef IMPORT_FILTER_CALLBACK_H
+#define IMPORT_FILTER_CALLBACK_H
+
+#include <jni.h>
+#include "svn_client.h"
+
+/**
+ * This class holds a Java callback object, which will receive every
+ * directory entry for which the callback information is requested.
+ */
+class ImportFilterCallback
+{
+public:
+ ImportFilterCallback(jobject jcallback);
+ ~ImportFilterCallback();
+
+ static svn_error_t *callback(void *baton,
+ svn_boolean_t *filtered,
+ const char *local_abspath,
+ const svn_io_dirent2_t *dirent,
+ apr_pool_t *scratch_pool);
+
+protected:
+ svn_error_t *doImportFilter(svn_boolean_t *filtered,
+ const char *local_abspath,
+ const svn_io_dirent2_t *dirent,
+ apr_pool_t *pool);
+
+private:
+ /**
+ * This a local reference to the Java object.
+ */
+ jobject m_callback;
+};
+
+#endif // IMPORT_FILTER_CALLBACK_H
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InfoCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InfoCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InfoCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InfoCallback.cpp Sat Nov 24 20:29:11 2012
@@ -52,7 +52,7 @@ InfoCallback::callback(void *baton,
apr_pool_t *pool)
{
if (baton)
- return ((InfoCallback *)baton)->singleInfo(path, info, pool);
+ return static_cast<InfoCallback *>(baton)->singleInfo(path, info, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InputStream.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InputStream.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InputStream.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/InputStream.cpp Sat Nov 24 20:29:11 2012
@@ -70,7 +70,7 @@ svn_error_t *InputStream::read(void *bat
{
JNIEnv *env = JNIUtil::getEnv();
// An object of our class is passed in as the baton.
- InputStream *that = (InputStream*)baton;
+ InputStream *that = static_cast<InputStream *>(baton);
// The method id will not change during the time this library is
// loaded, so it can be cached.
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ListCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ListCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ListCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ListCallback.cpp Sat Nov 24 20:29:11 2012
@@ -57,8 +57,8 @@ ListCallback::callback(void *baton,
apr_pool_t *pool)
{
if (baton)
- return ((ListCallback *)baton)->doList(path, dirent, lock, abs_path,
- pool);
+ return static_cast<ListCallback *>(baton)->doList(
+ path, dirent, lock, abs_path, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/LogMessageCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/LogMessageCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/LogMessageCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/LogMessageCallback.cpp Sat Nov 24 20:29:11 2012
@@ -57,7 +57,8 @@ LogMessageCallback::callback(void *baton
apr_pool_t *pool)
{
if (baton)
- return ((LogMessageCallback *)baton)->singleMessage(log_entry, pool);
+ return static_cast<LogMessageCallback *>(baton)->singleMessage(
+ log_entry, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/OutputStream.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/OutputStream.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/OutputStream.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/OutputStream.cpp Sat Nov 24 20:29:11 2012
@@ -76,7 +76,7 @@ svn_error_t *OutputStream::write(void *b
JNIEnv *env = JNIUtil::getEnv();
// An object of our class is passed in as the baton.
- OutputStream *that = (OutputStream*)baton;
+ OutputStream *that = static_cast<OutputStream *>(baton);
// The method id will not change during the time this library is
// loaded, so it can be cached.
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/PatchCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/PatchCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/PatchCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/PatchCallback.cpp Sat Nov 24 20:29:11 2012
@@ -54,10 +54,9 @@ PatchCallback::callback(void *baton,
apr_pool_t *pool)
{
if (baton)
- return ((PatchCallback *)baton)->singlePatch(filtered,
- canon_path_from_patchfile,
- patch_abspath, reject_abspath,
- pool);
+ return static_cast<PatchCallback *>(baton)->singlePatch(
+ filtered, canon_path_from_patchfile, patch_abspath, reject_abspath,
+ pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/Prompter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/Prompter.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/Prompter.cpp Sat Nov 24 20:29:11 2012
@@ -427,7 +427,7 @@ svn_error_t *Prompter::simple_prompt(svn
svn_boolean_t may_save,
apr_pool_t *pool)
{
- Prompter *that = (Prompter*)baton;
+ Prompter *that = static_cast<Prompter *>(baton);
svn_auth_cred_simple_t *ret =
(svn_auth_cred_simple_t*)apr_pcalloc(pool, sizeof(*ret));
if (!that->prompt(realm, username, may_save ? true : false))
@@ -460,7 +460,7 @@ svn_error_t *Prompter::username_prompt(s
svn_boolean_t may_save,
apr_pool_t *pool)
{
- Prompter *that = (Prompter*)baton;
+ Prompter *that = static_cast<Prompter *>(baton);
svn_auth_cred_username_t *ret =
(svn_auth_cred_username_t*)apr_pcalloc(pool, sizeof(*ret));
const char *user = that->askQuestion(realm, _("Username: "), true,
@@ -484,7 +484,7 @@ Prompter::ssl_server_trust_prompt(svn_au
svn_boolean_t may_save,
apr_pool_t *pool)
{
- Prompter *that = (Prompter*)baton;
+ Prompter *that = static_cast<Prompter *>(baton);
svn_auth_cred_ssl_server_trust_t *ret =
(svn_auth_cred_ssl_server_trust_t*)apr_pcalloc(pool, sizeof(*ret));
@@ -550,7 +550,7 @@ Prompter::ssl_client_cert_prompt(svn_aut
svn_boolean_t may_save,
apr_pool_t *pool)
{
- Prompter *that = (Prompter*)baton;
+ Prompter *that = static_cast<Prompter *>(baton);
svn_auth_cred_ssl_client_cert_t *ret =
(svn_auth_cred_ssl_client_cert_t*)apr_pcalloc(pool, sizeof(*ret));
const char *cert_file =
@@ -572,7 +572,7 @@ Prompter::ssl_client_cert_pw_prompt(svn_
svn_boolean_t may_save,
apr_pool_t *pool)
{
- Prompter *that = (Prompter*)baton;
+ Prompter *that = static_cast<Prompter *>(baton);
svn_auth_cred_ssl_client_cert_pw_t *ret =
(svn_auth_cred_ssl_client_cert_pw_t*)apr_pcalloc(pool, sizeof(*ret));
const char *info = that->askQuestion(realm,
@@ -593,7 +593,7 @@ Prompter::plaintext_prompt(svn_boolean_t
void *baton,
apr_pool_t *pool)
{
- Prompter *that = (Prompter *) baton;
+ Prompter *that = static_cast<Prompter *>(baton);
bool result = that->askYesNo(realmstring,
_("Store password unencrypted?"),
@@ -610,7 +610,7 @@ Prompter::plaintext_passphrase_prompt(sv
void *baton,
apr_pool_t *pool)
{
- Prompter *that = (Prompter *) baton;
+ Prompter *that = static_cast<Prompter *>(baton);
bool result = that->askYesNo(realmstring,
_("Store passphrase unencrypted?"),
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ProplistCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ProplistCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ProplistCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ProplistCallback.cpp Sat Nov 24 20:29:11 2012
@@ -54,7 +54,8 @@ ProplistCallback::callback(void *baton,
apr_pool_t *pool)
{
if (baton)
- return ((ProplistCallback *)baton)->singlePath(path, prop_hash, pool);
+ return static_cast<ProplistCallback *>(baton)->singlePath(
+ path, prop_hash, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ReposNotifyCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ReposNotifyCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ReposNotifyCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/ReposNotifyCallback.cpp Sat Nov 24 20:29:11 2012
@@ -49,7 +49,7 @@ ReposNotifyCallback::notify(void *baton,
apr_pool_t *pool)
{
if (baton)
- ((ReposNotifyCallback *)baton)->onNotify(notify, pool);
+ static_cast<ReposNotifyCallback *>(baton)->onNotify(notify, pool);
}
/**
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.cpp Sat Nov 24 20:29:11 2012
@@ -44,6 +44,7 @@
#include "StatusCallback.h"
#include "ChangelistCallback.h"
#include "ListCallback.h"
+#include "ImportFilterCallback.h"
#include "JNIByteArray.h"
#include "CommitMessage.h"
#include "EnumMapper.h"
@@ -553,7 +554,9 @@ jlong SVNClient::doSwitch(const char *pa
void SVNClient::doImport(const char *path, const char *url,
CommitMessage *message, svn_depth_t depth,
bool noIgnore, bool ignoreUnknownNodeTypes,
- RevpropTable &revprops, CommitCallback *callback)
+ RevpropTable &revprops,
+ ImportFilterCallback *ifCallback,
+ CommitCallback *commitCallback)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
@@ -567,10 +570,11 @@ void SVNClient::doImport(const char *pat
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_import4(intPath.c_str(), intUrl.c_str(), depth,
+ SVN_JNI_ERR(svn_client_import5(intPath.c_str(), intUrl.c_str(), depth,
noIgnore, ignoreUnknownNodeTypes,
revprops.hash(subPool),
- CommitCallback::callback, callback,
+ ImportFilterCallback::callback, ifCallback,
+ CommitCallback::callback, commitCallback,
ctx, subPool.getPool()), );
}
@@ -816,7 +820,8 @@ void SVNClient::getMergeinfoLog(int type
* Get a property.
*/
jbyteArray SVNClient::propertyGet(const char *path, const char *name,
- Revision &revision, Revision &pegRevision)
+ Revision &revision, Revision &pegRevision,
+ StringArray &changelists)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", NULL);
@@ -829,11 +834,11 @@ jbyteArray SVNClient::propertyGet(const
return NULL;
apr_hash_t *props;
- SVN_JNI_ERR(svn_client_propget4(&props, name,
+ SVN_JNI_ERR(svn_client_propget5(&props, NULL, name,
intPath.c_str(), pegRevision.revision(),
revision.revision(), NULL, svn_depth_empty,
- NULL, ctx, subPool.getPool(),
- subPool.getPool()),
+ changelists.array(subPool), ctx,
+ subPool.getPool(), subPool.getPool()),
NULL);
apr_hash_index_t *hi;
@@ -1187,7 +1192,6 @@ void SVNClient::blame(const char *path,
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
- apr_pool_t *pool = subPool.getPool();
Path intPath(path, subPool);
SVN_JNI_ERR(intPath.error_occured(), );
@@ -1195,13 +1199,12 @@ void SVNClient::blame(const char *path,
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_blame5(intPath.c_str(), pegRevision.revision(),
- revisionStart.revision(),
- revisionEnd.revision(),
- svn_diff_file_options_create(pool),
- ignoreMimeType, includeMergedRevisions,
- BlameCallback::callback, callback, ctx,
- pool),
+ SVN_JNI_ERR(svn_client_blame5(
+ intPath.c_str(), pegRevision.revision(), revisionStart.revision(),
+ revisionEnd.revision(),
+ svn_diff_file_options_create(subPool.getPool()), ignoreMimeType,
+ includeMergedRevisions, BlameCallback::callback, callback, ctx,
+ subPool.getPool()),
);
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.h?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNClient.h Sat Nov 24 20:29:11 2012
@@ -46,6 +46,7 @@ class LogMessageCallback;
class InfoCallback;
class CommitCallback;
class ListCallback;
+class ImportFilterCallback;
class StatusCallback;
class OutputStream;
class PatchCallback;
@@ -107,7 +108,8 @@ class SVNClient :public SVNBase
const char *localPath, bool dryRun);
void doImport(const char *path, const char *url, CommitMessage *message,
svn_depth_t depth, bool noIgnore, bool ignoreUnknownNodeTypes,
- RevpropTable &revprops, CommitCallback *callback);
+ RevpropTable &revprops, ImportFilterCallback *ifCallback,
+ CommitCallback *commitCallback);
jlong doSwitch(const char *path, const char *url, Revision &revision,
Revision &pegRevision, svn_depth_t depth,
bool depthIsSticky, bool ignoreExternals,
@@ -171,7 +173,8 @@ class SVNClient :public SVNBase
bool lastChanged);
void upgrade(const char *path);
jbyteArray propertyGet(const char *path, const char *name,
- Revision &revision, Revision &pegRevision);
+ Revision &revision, Revision &pegRevision,
+ StringArray &changelists);
void diff(const char *target1, Revision &revision1,
const char *target2, Revision &revision2,
const char *relativeToDir, OutputStream &outputStream,
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.cpp Sat Nov 24 20:29:11 2012
@@ -68,7 +68,7 @@ void SVNRepos::cancelOperation()
svn_error_t *
SVNRepos::checkCancel(void *cancelBaton)
{
- SVNRepos *that = (SVNRepos *)cancelBaton;
+ SVNRepos *that = static_cast<SVNRepos *>(cancelBaton);
if (that->m_cancelOperation)
return svn_error_create(SVN_ERR_CANCELLED, NULL,
_("Operation cancelled"));
@@ -248,7 +248,7 @@ void SVNRepos::dump(File &path, OutputSt
}
void SVNRepos::hotcopy(File &path, File &targetPath,
- bool cleanLogs)
+ bool cleanLogs, bool incremental)
{
SVN::Pool requestPool;
@@ -264,9 +264,12 @@ void SVNRepos::hotcopy(File &path, File
return;
}
- SVN_JNI_ERR(svn_repos_hotcopy(path.getInternalStyle(requestPool),
- targetPath.getInternalStyle(requestPool),
- cleanLogs, requestPool.getPool()), );
+ SVN_JNI_ERR(svn_repos_hotcopy2(path.getInternalStyle(requestPool),
+ targetPath.getInternalStyle(requestPool),
+ cleanLogs, incremental,
+ checkCancel, this /* cancel callback/baton */,
+ requestPool.getPool()),
+ );
}
static void
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.h
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.h?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.h (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/SVNRepos.h Sat Nov 24 20:29:11 2012
@@ -58,7 +58,7 @@ class SVNRepos : public SVNBase
void listUnusedDBLogs(File &path,
MessageReceiver &messageReceiver);
void listDBLogs(File &path, MessageReceiver &messageReceiver);
- void hotcopy(File &path, File &targetPath, bool cleanLogs);
+ void hotcopy(File &path, File &targetPath, bool cleanLogs, bool incremental);
void dump(File &path, OutputStream &dataOut, Revision &revsionStart,
Revision &RevisionEnd, bool incremental, bool useDeltas,
ReposNotifyCallback *notifyCallback);
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/StatusCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/StatusCallback.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/StatusCallback.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/StatusCallback.cpp Sat Nov 24 20:29:11 2012
@@ -55,7 +55,8 @@ StatusCallback::callback(void *baton,
apr_pool_t *pool)
{
if (baton)
- return ((StatusCallback *)baton)->doStatus(local_abspath, status, pool);
+ return static_cast<StatusCallback *>(baton)->doStatus(
+ local_abspath, status, pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Sat Nov 24 20:29:11 2012
@@ -47,6 +47,7 @@
#include "InfoCallback.h"
#include "StatusCallback.h"
#include "ListCallback.h"
+#include "ImportFilterCallback.h"
#include "ChangelistCallback.h"
#include "StringArray.h"
#include "RevpropTable.h"
@@ -712,7 +713,7 @@ JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_doImport
(JNIEnv *env, jobject jthis, jstring jpath, jstring jurl, jobject jdepth,
jboolean jnoIgnore, jboolean jignoreUnknownNodeTypes, jobject jrevpropTable,
- jobject jmessage, jobject jcallback)
+ jobject jimportFilterCallback, jobject jmessage, jobject jcommitCallback)
{
JNIEntry(SVNClient, doImport);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -737,11 +738,14 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- CommitCallback callback(jcallback);
+ ImportFilterCallback importFilterCallback(jimportFilterCallback);
+ CommitCallback commitCallback(jcommitCallback);
+
cl->doImport(path, url, &message, EnumMapper::toDepth(jdepth),
jnoIgnore ? true : false,
jignoreUnknownNodeTypes ? true : false, revprops,
- jcallback ? &callback : NULL);
+ jimportFilterCallback ? &importFilterCallback : NULL,
+ jcommitCallback ? &commitCallback : NULL);
}
JNIEXPORT jobject JNICALL
@@ -1080,7 +1084,7 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT jbyteArray JNICALL
Java_org_apache_subversion_javahl_SVNClient_propertyGet
(JNIEnv *env, jobject jthis, jstring jpath, jstring jname, jobject jrevision,
- jobject jpegRevision)
+ jobject jpegRevision, jobject jchangelists)
{
JNIEntry(SVNClient, propertyGet);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1105,7 +1109,11 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return NULL;
- return cl->propertyGet(path, name, revision, pegRevision);
+ StringArray changelists(jchangelists);
+ if (JNIUtil::isExceptionThrown())
+ return NULL;
+
+ return cl->propertyGet(path, name, revision, pegRevision, changelists);
}
JNIEXPORT jobject JNICALL
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp Sat Nov 24 20:29:11 2012
@@ -170,7 +170,7 @@ Java_org_apache_subversion_javahl_SVNRep
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNRepos_hotcopy
(JNIEnv *env, jobject jthis, jobject jpath, jobject jtargetPath,
- jboolean jcleanLogs)
+ jboolean jcleanLogs, jboolean jincremental)
{
JNIEntry(SVNRepos, hotcopy);
SVNRepos *cl = SVNRepos::getCppObject(jthis);
@@ -188,7 +188,8 @@ Java_org_apache_subversion_javahl_SVNRep
if (JNIUtil::isExceptionThrown())
return;
- cl->hotcopy(path, targetPath, jcleanLogs ? true : false);
+ cl->hotcopy(path, targetPath, jcleanLogs ? true : false,
+ jincremental ? true : false);
}
JNIEXPORT void JNICALL
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java Sat Nov 24 20:29:11 2012
@@ -250,7 +250,19 @@ public class ConflictDescriptor
/**
* Object is already replaced.
*/
- replaced;
+ replaced,
+
+ /**
+ * Object is moved away.
+ * @since 1.8
+ */
+ moved_away,
+
+ /**
+ * Object is moved here.
+ * @since 1.8
+ */
+ moved_here;
}
public enum Operation
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Sat Nov 24 20:29:11 2012
@@ -406,6 +406,13 @@ public interface ISVNClient
void doImport(String path, String url, Depth depth,
boolean noIgnore, boolean ignoreUnknownNodeTypes,
Map<String, String> revpropTable,
+ ImportFilterCallback importFilterCallback,
+ CommitMessageCallback handler, CommitCallback commitCallback)
+ throws ClientException;
+
+ void doImport(String path, String url, Depth depth,
+ boolean noIgnore, boolean ignoreUnknownNodeTypes,
+ Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback callback)
throws ClientException;
@@ -719,6 +726,10 @@ public interface ISVNClient
* @throws ClientException
*/
byte[] propertyGet(String path, String name, Revision revision,
+ Revision pegRevision, Collection<String> changelists)
+ throws ClientException;
+
+ byte[] propertyGet(String path, String name, Revision revision,
Revision pegRevision)
throws ClientException;
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Sat Nov 24 20:29:11 2012
@@ -113,6 +113,9 @@ public interface ISVNRepos {
* @throws ClientException throw in case of problem
*/
public abstract void hotcopy(File path, File targetPath,
+ boolean cleanLogs, boolean incremental) throws ClientException;
+
+ public abstract void hotcopy(File path, File targetPath,
boolean cleanLogs) throws ClientException;
/**
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Sat Nov 24 20:29:11 2012
@@ -230,9 +230,22 @@ public class SVNClient implements ISVNCl
boolean noIgnore,
boolean ignoreUnknownNodeTypes,
Map<String, String> revpropTable,
- CommitMessageCallback handler, CommitCallback callback)
+ ImportFilterCallback importFilterCallback,
+ CommitMessageCallback handler,
+ CommitCallback commitCallback)
throws ClientException;
+ public void doImport(String path, String url, Depth depth, boolean noIgnore,
+ boolean ignoreUnknownNodeTypes,
+ Map<String, String> revpropTable,
+ CommitMessageCallback handler,
+ CommitCallback callback)
+ throws ClientException
+ {
+ doImport(path, url, depth, noIgnore, ignoreUnknownNodeTypes,
+ revpropTable, null, handler, callback);
+ }
+
public native Set<String> suggestMergeSources(String path,
Revision pegRevision)
throws SubversionException;
@@ -366,8 +379,16 @@ public class SVNClient implements ISVNCl
boolean force)
throws ClientException;
+ public byte[] propertyGet(String path, String name,
+ Revision revision, Revision pegRevision)
+ throws ClientException
+ {
+ return propertyGet(path, name, revision, pegRevision, null);
+ }
+
public native byte[] propertyGet(String path, String name,
- Revision revision, Revision pegRevision)
+ Revision revision, Revision pegRevision,
+ Collection<String> changelists)
throws ClientException;
public byte[] fileContent(String path, Revision revision,
Modified: subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java Sat Nov 24 20:29:11 2012
@@ -130,7 +130,14 @@ public class SVNRepos implements ISVNRep
* @throws ClientException throw in case of problem
*/
public native void hotcopy(File path, File targetPath,
- boolean cleanLogs) throws ClientException;
+ boolean cleanLogs, boolean incremental)
+ throws ClientException;
+
+ public void hotcopy(File path, File targetPath,
+ boolean cleanLogs) throws ClientException
+ {
+ hotcopy(path, targetPath, cleanLogs, false);
+ }
/**
* list all logfiles (BDB) in use or not)
Added: subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java?rev=1413258&view=auto
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java (added)
+++ subversion/branches/compressed-pristines/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java Sat Nov 24 20:29:11 2012
@@ -0,0 +1,40 @@
+/**
+ * @copyright
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+package org.apache.subversion.javahl.callback;
+
+import org.apache.subversion.javahl.ISVNClient;
+import org.apache.subversion.javahl.types.NodeKind;
+
+/**
+ * This interface is used to filter imported nodes in the
+ * {@link ISVNClient#import} call.
+ */
+public interface ImportFilterCallback
+{
+ /**
+ * This method will be called for each node. Returns true to filter the
+ * node (and its descendants) from the import.
+ */
+ public boolean filter(String path, NodeKind kind, boolean special);
+}
Modified: subversion/branches/compressed-pristines/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/swig/core.i?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/swig/core.i (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/swig/core.i Sat Nov 24 20:29:11 2012
@@ -658,14 +658,14 @@ svn_swig_pl_set_current_pool (apr_pool_t
)
#endif
-#ifdef SWIGRUBY
+#ifndef SWIGPERL
%callback_typemap(svn_config_enumerator2_t callback, void *baton,
- ,
+ svn_swig_py_config_enumerator2,
,
svn_swig_rb_config_enumerator)
%callback_typemap(svn_config_section_enumerator2_t callback, void *baton,
- ,
+ svn_swig_py_config_section_enumerator2,
,
svn_swig_rb_config_section_enumerator)
#endif
Modified: subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_containers.swg
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_containers.swg?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_containers.swg (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_containers.swg Sat Nov 24 20:29:11 2012
@@ -507,7 +507,11 @@
}
}
#endif
-
+#ifdef SWIGPERL
+%typemap(argout) apr_array_header_t **result_revs {
+ %append_output(svn_swig_pl_revnums_to_list(*$1));
+}
+#endif
#ifdef SWIGRUBY
%typemap(argout) apr_array_header_t **result_revs {
%append_output(svn_swig_rb_apr_array_to_array_svn_rev(*$1));
Modified: subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_types.swg?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/swig/include/svn_types.swg Sat Nov 24 20:29:11 2012
@@ -793,23 +793,38 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
Callback: svn_commit_callback2_t
svn_ra get_commit_editor2()
svn_repos_get_commit_editor4()
+ svn_client_mkdir4()
+ svn_client_delete4()
+ svn_client_import4()
+ svn_client_commit5()
+ svn_client_copy6()
+ svn_client_move6()
+ svn_client_propset_remote()
*/
+#ifdef SWIGPERL
+%typemap(in) (svn_commit_callback2_t commit_callback, void *commit_baton) {
+ $1 = svn_swig_pl_thunk_commit_callback2;
+ $2 = (void *)$input;
+ svn_swig_pl_hold_ref_in_pool (_global_pool, $input);
+};
+#endif
+
#ifdef SWIGRUBY
-%typemap(in) (svn_commit_callback2_t callback, void *callback_baton)
+%typemap(in) (svn_commit_callback2_t commit_callback, void *commit_baton)
{
$1 = svn_swig_rb_commit_callback2;
$2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
};
-%typemap(argout) (svn_commit_callback2_t callback, void *callback_baton)
+%typemap(argout) (svn_commit_callback2_t commit_callback, void *commit_baton)
{
svn_swig_rb_set_baton($result, (VALUE)$2);
};
#endif
#ifdef SWIGPYTHON
-%typemap(in) (svn_commit_callback2_t callback, void *callback_baton)
+%typemap(in) (svn_commit_callback2_t commit_callback, void *commit_baton)
{
$1 = svn_swig_py_commit_callback2;
$2 = (void *)$input;
Modified: subversion/branches/compressed-pristines/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/branches/compressed-pristines/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Sat Nov 24 20:29:11 2012
@@ -229,6 +229,12 @@ static SV *convert_int(int value, void *
return sv_2mortal(newSViv(value));
}
+static SV *convert_svn_revnum_t(svn_revnum_t revnum, void *dummy)
+{
+ return sv_2mortal(newSViv((long int)revnum));
+
+}
+
/* c -> perl hash convertors */
static SV *convert_hash(apr_hash_t *hash, element_converter_t converter_func,
void *ctx)
@@ -301,6 +307,12 @@ SV *svn_swig_pl_convert_array(const apr_
tinfo);
}
+SV *svn_swig_pl_revnums_to_list(const apr_array_header_t *array)
+{
+ return convert_array(array, (element_converter_t)convert_svn_revnum_t,
+ NULL);
+}
+
/* put the va_arg in stack and invoke caller_func with func.
fmt:
* O: perl object
@@ -907,6 +919,22 @@ svn_error_t *svn_swig_pl_thunk_commit_ca
return SVN_NO_ERROR;
}
+svn_error_t *svn_swig_pl_thunk_commit_callback2(const svn_commit_info_t *commit_info,
+ void *baton,
+ apr_pool_t *pool)
+{
+ if (!SvOK((SV *)baton))
+ return SVN_NO_ERROR;
+
+ svn_swig_pl_callback_thunk(CALL_SV, baton, NULL,
+ "SS",
+ commit_info, _SWIG_TYPE("svn_commit_info_t *"),
+ pool, POOLINFO);
+
+ return SVN_NO_ERROR;
+}
+
+
/* Wrap RA */
static svn_error_t * thunk_open_tmp_file(apr_file_t **fp,
@@ -1288,6 +1316,54 @@ void svn_swig_pl_status_func(void *baton
}
+/* Thunked version of svn_wc_status_func2_t callback type. */
+void svn_swig_pl_status_func2(void *baton,
+ const char *path,
+ svn_wc_status2_t *status)
+{
+ swig_type_info *statusinfo = _SWIG_TYPE("svn_wc_status2 _t *");
+
+ if (!SvOK((SV *)baton)) {
+ return;
+ }
+
+ svn_swig_pl_callback_thunk(CALL_SV, baton, NULL, "sS",
+ path, status, statusinfo);
+
+}
+
+/* Thunked version of svn_wc_status_func3_t callback type. */
+svn_error_t *svn_swig_pl_status_func3(void *baton,
+ const char *path,
+ svn_wc_status2_t *status,
+ apr_pool_t *pool)
+{
+ SV *result;
+ svn_error_t *ret_val = SVN_NO_ERROR;
+
+ swig_type_info *statusinfo = _SWIG_TYPE("svn_wc_status2 _t *");
+
+ if (!SvOK((SV *)baton)) {
+ return ret_val;
+ }
+
+ svn_swig_pl_callback_thunk(CALL_SV, baton, &result, "sSS",
+ path, status, statusinfo,
+ pool, POOLINFO);
+
+ if (sv_derived_from(result, "_p_svn_error_t")) {
+ swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
+ if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+ SvREFCNT_dec(result);
+ croak("Unable to convert from SWIG Type");
+ }
+ }
+
+ SvREFCNT_dec(result);
+ return ret_val;
+}
+
+
/* Thunked version of svn_client_blame_receiver_t callback type. */
svn_error_t *svn_swig_pl_blame_func(void *baton,
apr_int64_t line_no,