Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/CHANGES  view on Meta::CPAN

   * allow the pack tests to work with low file descriptor limits (r937610)
   * improve exception handling on Windows Vista and 7 (r878447, -910, -916)


Version 1.6.11
(19 Apr 2010, from /branches/1.6.x)
http://svn.apache.org/repos/asf/subversion/tags/1.6.11

 User-visible changes:
  * fix for repositories mounted via NFS (issue #3501)
  * enable TCP keep-alives in svnserve (r880552)
  * tighten restrictions on revprops for 'svnadmin verify' (r904594)
  * make ra_serf give better out-of-date information (issue #3561)
  * improve error message upon connection failure with svn+ssh:// (r922516)
  * allow 'svn log' on an uncommitted copy/move destination (r901752)
  * make 'svnadmin hotcopy' copy the fsfs config file (r905303)
  * mergeinfo improvements with non-inheritable mergeinfo (issue #3573)
  * make mergeinfo queries not require access to the repo root (issue #3242)
  * update URLs to refer the new apache.org repository (r904301, -94)
  * update relative externals during a switch (issue #3390)
  * fix 'merge --reintegrate' with self-referential mergeinfo (r892050, -85)

src/subversion/CHANGES  view on Meta::CPAN

  * make svnsync normalize svn:* props to LF line endings (issue #3404)
  * better integration with external merge tools (r36178)
  * return a friendly error message for 'svn diff' (r37735)
  * update dsvn.el for 1.6 (r37774)
  * don't allow setting of props on out-of-date dirs under neon (r37745)
  * improve BASH completion (r36450, -52, -70, -79, -538)
  * always show tree conflicts with 'svn st' (issue #3382)
  * improve correctness of 'svn mergeinfo' (issue #3126)
  * decrease the amount of memory needed for large commits (r37894, -6)
  * work around an APR buffer overflow seen by svnsync (r37622)
  * ra_svn clients now use TCP keep-alives if available (issue #3347)
  * improve 'svn merge' perf by reducing server contact (r37491, -593, -618)
  * stop propagating self-referential mergeinfo in reintegrate merges (r37931)
  * fix NLS detection where -liconv is required for bindtextdomain() (r37827)
  * don't delete unversioned files with 'rm --keep-local' (r38015, -17, -19)
  * bump apr and apr-util versions included in deps to latest. (r37941)
  * avoid temp file name collisions with ra_serf, ra_neon (r37972)
  * fixed: potential segfault with noop file merges (r37779)
  * fixed: incorrect output with 'svn blame -g' (r37719, -23, -41)
  * fixed: bindings don't load FS libs when module search enabled (issue #3413)
  * fixed: DAV RA layers not properly handling update/switch working copy

src/subversion/subversion/bindings/swig/core.i  view on Meta::CPAN


%ignore svn_opt_args_to_target_array2;
%ignore svn_opt_args_to_target_array3;
%ignore svn_opt_parse_num_args;
%ignore svn_opt_parse_all_args;
#endif

#ifdef SWIGPYTHON
# The auth baton depends on the providers, so we preserve a
# reference to them inside the wrapper. This way, if all external
# references to the providers are gone, they will still be alive,
# keeping the baton valid.
%feature("pythonappend") svn_auth_open %{
  val.__dict__["_deps"] = list(args[0])
%}
#endif

/* ----------------------------------------------------------------------- */

%include svn_error_codes_h.swg
%include svn_time_h.swg

src/subversion/subversion/libsvn_fs_base/fs.h  view on Meta::CPAN

  DB *strings;
  DB *transactions;
  DB *uuids;
  DB *locks;
  DB *lock_tokens;
  DB *node_origins;
  DB *miscellaneous;
  DB *checksum_reps;

  /* A boolean for tracking when we have a live Berkeley DB
     transaction trail alive. */
  svn_boolean_t in_txn_trail;

  /* The format number of this FS. */
  int format;

} base_fs_data_t;


/*** Filesystem Revision ***/
typedef struct revision_t

src/subversion/subversion/libsvn_fs_base/notes/TODO  view on Meta::CPAN

  As people update, we're going to be recomputing text deltas for the
  most recently changed files pretty often.  It might be worthwhile to
  cache the deltas for a little while.

- Handle Unicode canonicalization for directory and property names
  ourselves.  People should be able to hand us any valid UTF-8
  sequence, perhaps with precomposed characters or non-spacing marks
  in a non-canonical order, and find the appropriate matches, given
  the rules defined by the Unicode standard.

Keeping repositories alive in the long term: Berkeley DB is infamous
for changing its file format from one revision to the next.  If someone
saves a Subversion 1.0 repository on a CD somewhere, and then tries to
read it seven years later, their chance of being able to read it with
the latest revision of Subversion is nil.  The solution:

- Define a simply XML repository dump format for the complete
  repository data.  This should be the same format we use for CVS
  repository conversion.  We'll have an import function.

- Write a program that is simple and self-contained --- does not use

src/subversion/subversion/libsvn_fs_fs/fs_fs.c  view on Meta::CPAN

 * almost zero on most systems.
 *
 *
 * Tech aspects:
 * -------------
 *
 * A problem is that we need to provide a globally available file name to
 * back the SHM implementation on OSes that need it.  We can only assume
 * write access to some file within the respective repositories.  Because
 * a given server process may access thousands of repositories during its
 * lifetime, keeping the SHM data alive for all of them is also not an
 * option.
 *
 * So, we store the new revprop generation on disk as part of each
 * setrevprop call, i.e. this write will be serialized and the write order
 * be guaranteed by the repository write lock.
 *
 * The only racy situation occurs when the data is being read again by two
 * processes concurrently but in that situation, the first process to
 * finish that procedure is guaranteed to be the only one that initializes
 * the SHM data.  Since even writers will first go through that

src/subversion/subversion/libsvn_fs_fs/tree.c  view on Meta::CPAN

  /* pool used for all node allocation */
  apr_pool_t *pool;

  /* number of entries created from POOL since the last cleanup */
  apr_size_t insertions;

  /* Property lookups etc. have a very high locality (75% re-hit).
     Thus, remember the last hit location for optimistic lookup. */
  apr_size_t last_hit;

  /* List of receiving pools that are still alive. */
  cache_lock_t *first_lock;
};

/* Cleanup function to be called when a receiving pool gets cleared.
   Unlocks the cache once.
 */
static apr_status_t
unlock_cache(void *baton_void)
{
  cache_lock_t *lock = baton_void;

src/subversion/subversion/libsvn_ra_serf/README  view on Meta::CPAN

  high-level API; but the code in util.c can go a long way towards that.

- Commit parallellization/pipelining
  - Determine how to use HTTP pipelining and multiple connections for commit
  - May need response from CHECKOUT to issue PUT/PROPPATCH
  - ra_svn has a custom commit pipelining that may be worth investigating too

- Use PROPFIND Depth: 1 when we are adding a directory locally to skip
  fetching properties on files

- Discover server's keep-alive setting via OPTIONS requests and notify serf

- Fix bug in mod_dav_svn that omits remove-prop in the update-report when a
  lock is broken and send-all is false.
  (See upd_change_xxx_prop in mod_dav_svn/update.c)

- Fix bug in mod_dav_svn/mod_deflate that causes it to hold onto the entire
  REPORT response until it is completed.  (This is why ra_serf doesn't request
  gzip compression on the REPORT requests.)

- Remove remaining abort()s - ;-) aka add better debug logging

src/subversion/subversion/libsvn_ra_serf/util.c  view on Meta::CPAN

     the header values.  */
  serf_bucket_headers_setn(*hdrs_bkt, "User-Agent", session->useragent);

  if (content_type)
    {
      serf_bucket_headers_setn(*hdrs_bkt, "Content-Type", content_type);
    }

  if (session->http10)
    {
      serf_bucket_headers_setn(*hdrs_bkt, "Connection", "keep-alive");
    }

  if (accept_encoding)
    {
      serf_bucket_headers_setn(*hdrs_bkt, "Accept-Encoding", accept_encoding);
    }

  /* These headers need to be sent with every request; see issue #3255
     ("mod_dav_svn does not pass client capabilities to start-commit
     hooks") for why. */

src/subversion/subversion/libsvn_ra_svn/client.c  view on Meta::CPAN

            apr_socket_close(*sock);
        }
      sa = sa->next;
    }
  while (status != APR_SUCCESS && sa);

  if (status)
    return svn_error_wrap_apr(status, _("Can't connect to host '%s'"),
                              hostname);

  /* Enable TCP keep-alives on the socket so we time out when
   * the connection breaks due to network-layer problems.
   * If the peer has dropped the connection due to a network partition
   * or a crash, or if the peer no longer considers the connection
   * valid because we are behind a NAT and our public IP has changed,
   * it will respond to the keep-alive probe with a RST instead of an
   * acknowledgment segment, which will cause svn to abort the session
   * even while it is currently blocked waiting for data from the peer.
   * See issue #3347. */
  status = apr_socket_opt_set(*sock, APR_SO_KEEPALIVE, 1);
  if (status)
    {
      /* It's not a fatal error if we cannot enable keep-alives. */
    }

  return SVN_NO_ERROR;
}

/* Set *DIFFS to an array of svn_prop_t, allocated in POOL, based on the
   property diffs in LIST, received from the server. */
static svn_error_t *parse_prop_diffs(const apr_array_header_t *list,
                                     apr_pool_t *pool,
                                     apr_array_header_t **diffs)

src/subversion/subversion/libsvn_wc/entries.c  view on Meta::CPAN

                                           db, entry_abspath,
                                           scratch_pool, scratch_pool));

          if (work_del_abspath)
            entry->copied = TRUE;
        }

      /* If there is still a directory on-disk we keep it, if not it is
         already deleted. Simple, isn't it?

         Before single-db we had to keep the administative area alive until
         after the commit really deletes it. Setting keep alive stopped the
         commit processing from deleting the directory. We don't delete it
         any more, so all we have to do is provide some 'sane' value.
       */
      SVN_ERR(svn_io_check_path(entry_abspath, &path_kind, scratch_pool));
      entry->keep_local = (path_kind == svn_node_dir);
    }
  else if (status == svn_wc__db_status_added)
    {
      svn_wc__db_status_t work_status;
      const char *op_root_abspath;

src/subversion/subversion/svnserve/svnserve.c  view on Meta::CPAN

          svn_pool_destroy(connection_pool);
          continue;
        }
      if (status)
        {
          err = svn_error_wrap_apr
            (status, _("Can't accept client connection"));
          return svn_cmdline_handle_exit_error(err, pool, "svnserve: ");
        }

      /* Enable TCP keep-alives on the socket so we time out when
       * the connection breaks due to network-layer problems.
       * If the peer has dropped the connection due to a network partition
       * or a crash, or if the peer no longer considers the connection
       * valid because we are behind a NAT and our public IP has changed,
       * it will respond to the keep-alive probe with a RST instead of an
       * acknowledgment segment, which will cause svn to abort the session
       * even while it is currently blocked waiting for data from the peer. */
      status = apr_socket_opt_set(usock, APR_SO_KEEPALIVE, 1);
      if (status)
        {
          /* It's not a fatal error if we cannot enable keep-alives. */
        }

      conn = svn_ra_svn_create_conn3(usock, NULL, NULL,
                                     params.compression_level,
                                     params.zero_copy_limit,
                                     params.error_check_interval,
                                     connection_pool);

      if (run_mode == run_mode_listen_once)
        {

src/subversion/subversion/tests/cmdline/lock_tests.py  view on Meta::CPAN

  expected_output = svntest.verify.UnorderedOutput([
    '\'%s\' unlocked.\n' % os.path.join(wc_name, 'iota'),
    '\'%s\' unlocked.\n' % os.path.join(wc2_name, 'A', 'mu'),
  ])
  svntest.actions.run_and_verify_svn(None, expected_output, [],
                                     'unlock', sbox.ospath('iota'),
                                               sbox2.ospath('A/mu'))

@Issue(3378)
def locks_stick_over_switch(sbox):
  "locks are kept alive over switching"

  sbox.build()
  wc_dir = sbox.wc_dir
  repo_url = sbox.repo_url

  svntest.actions.run_and_verify_svn(None, None, [],
                                     'cp', sbox.ospath('A'), repo_url + '/AA',
                                     '-m', '')

  expected_output = svntest.verify.UnorderedOutput([

src/subversion/tools/server-side/svnpubsub/svnpubsub/client.py  view on Meta::CPAN

#
# ### usage...
#
#
# EVENTS
#
#   connected: a connection to the server has been opened (though not
#                 necessarily established)
#   closed:    the connection was closed. reconnect will be attempted.
#   error:     an error closed the connection. reconnect will be attempted.
#   ping:      the server has sent a keepalive
#   stale:     no activity has been seen, so the connection will be closed
#                 and reopened
#

import asyncore
import asynchat
import socket
import functools
import time
import json

src/subversion/tools/server-side/svnpubsub/svnpubsub/client.py  view on Meta::CPAN

    if 'svnpubsub' in obj:
      actual_version = obj['svnpubsub'].get('version')
      EXPECTED_VERSION = 1
      if actual_version != EXPECTED_VERSION:
        raise SvnpubsubClientException("Unknown svnpubsub format: %r != %d"
                                       % (actual_format, expected_format))
      self.event_callback('version', obj['svnpubsub']['version'])
    elif 'commit' in obj:
      commit = Commit(obj['commit'])
      self.commit_callback(commit)
    elif 'stillalive' in obj:
      self.event_callback('ping', obj['stillalive'])


class Commit(object):
  def __init__(self, commit):
    self.__dict__.update(commit)


class MultiClient(object):
  def __init__(self, urls, commit_callback, event_callback):
    self.commit_callback = commit_callback

src/subversion/tools/server-side/svnpubsub/svnpubsub/server.py  view on Meta::CPAN


HEARTBEAT_TIME = 15

class Client(object):
    def __init__(self, pubsub, r, type, repository):
        self.pubsub = pubsub
        r.notifyFinish().addErrback(self.finished)
        self.r = r
        self.type = type
        self.repository = repository
        self.alive = True
        log.msg("OPEN: %s:%d (%d clients online)"% (r.getClientIP(), r.client.port, pubsub.cc()+1))

    def finished(self, reason):
        self.alive = False
        log.msg("CLOSE: %s:%d (%d clients online)"% (self.r.getClientIP(), self.r.client.port, self.pubsub.cc()))
        try:
            self.pubsub.remove(self)
        except ValueError:
            pass

    def interested_in(self, commit):
        if self.type and self.type != commit.type:
            return False

src/subversion/tools/server-side/svnpubsub/svnpubsub/server.py  view on Meta::CPAN

        return True

    def notify(self, data):
        self.write(data)

    def start(self):
        self.write_start()
        reactor.callLater(HEARTBEAT_TIME, self.heartbeat, None)

    def heartbeat(self, args):
        if self.alive:
            self.write_heartbeat()
            reactor.callLater(HEARTBEAT_TIME, self.heartbeat, None)

    def write_data(self, data):
        self.write(data + "\n\0")

    """ "Data must not be unicode" is what the interfaces.ITransport says... grr. """
    def write(self, input):
        self.r.write(str(input))

    def write_start(self):
        self.r.setHeader('X-SVNPubSub-Version', '1')
        self.r.setHeader('content-type', 'application/vnd.apache.vc-notify+json')
        self.write('{"svnpubsub": {"version": 1}}\n\0')

    def write_heartbeat(self):
        self.write(json.dumps({"stillalive": time.time()}) + "\n\0")


class SvnPubSub(resource.Resource):
    isLeaf = True
    clients = []

    def cc(self):
        return len(self.clients)

    def remove(self, c):

src/subversion/tools/server-side/svnpubsub/svntweet.py  view on Meta::CPAN

    elif 'commit' in obj:
      commit = Commit(obj['commit'])
      if not hasattr(commit, 'type'):
        raise ValueException("Commit object is missing type field.")
      if not hasattr(commit, 'format'):
        raise ValueException("Commit object is missing format field.")
      if commit.type != 'svn' and commit.format != 1:
        raise ValueException("Unexpected type and/or format: %s:%s"
                             % (commit.type, commit.format))
      self.bdec.commit(commit)
    elif 'stillalive' in obj:
      self.bdec.stillalive()

class JSONHTTPStream(HTTPStream):
    def __init__(self, url, bdec):
        HTTPStream.__init__(self, url)
        self.bdec =  bdec
        self.ibuffer = []
        self.parser = JSONRecordHandler(bdec)

    def pageStart(self, partial):
        self.bdec.pageStart()

src/subversion/tools/server-side/svnpubsub/svntweet.py  view on Meta::CPAN



CHECKBEAT_TIME = 90

class BigDoEverythingClasss(object):
    def __init__(self, config):
        self.c = config
        self.c._load_config()
        self.url = str(self.c.config.get('stream'))
        self.failures = 0
        self.alive = time.time()
        self.checker = task.LoopingCall(self._checkalive)
        self.transport = None
        self.stream = None
        self._restartStream()
        self.watch = []
        self.twit = twitter.Twitter(self.c.config.get('username'), self.c.config.get('password'))

    def pageStart(self):
        log.msg("Stream Connection Established")
        self.failures = 0

    def _restartStream(self):
        (self.stream, self.transport) = connectTo(self.url, self)
        self.stream.deferred.addBoth(self.streamDead)
        self.alive = time.time()
        self.checker.start(CHECKBEAT_TIME)

    def _checkalive(self):
        n = time.time()
        if n - self.alive > CHECKBEAT_TIME:
            log.msg("Stream is dead, reconnecting")
            self.transport.disconnect()

    def stillalive(self):
        self.alive = time.time()

    def streamDead(self, v):
        BACKOFF_SECS = 5
        BACKOFF_MAX = 60
        self.checker.stop()

        self.stream = None
        self.failures += 1
        backoff = min(self.failures * BACKOFF_SECS, BACKOFF_MAX)
        log.msg("Stream disconnected, trying again in %d seconds.... %s" % (backoff, self.url))

src/subversion/tools/server-side/svnpubsub/testserver.py  view on Meta::CPAN


TEST_BODY = '{"svnpubsub": {"version": 1}}\n\0{"commit": {"type": "svn", "format": 1, "repository": "12345678-1234-1234-1234-123456789012", "id": "1234", "committer": "johndoe", "date": "2012-01-01 01:01:01 +0000 (Sun, 01 Jan 2012)", "log": "Frob the...

SEND_KEEPALIVE = True


class TestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
  def do_GET(self):
    self.send_response(200)
    self.send_header('Content-Length', str(len(TEST_BODY)))
    self.send_header('Connection', 'keep-alive')
    self.end_headers()
    self.wfile.write(TEST_BODY)


if __name__ == '__main__':
  server = BaseHTTPServer.HTTPServer(('', PORT), TestHandler)
  sys.stderr.write('Now listening on port %d...\n' % (PORT,))
  server.serve_forever()



( run in 2.135 seconds using v1.01-cache-2.11-cpan-df04353d9ac )