You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/07/20 01:06:07 UTC

svn commit: r1148581 [11/12] - in /subversion/branches/gpg-agent-password-store: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/ contrib/server-side/fsfsfi...

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/main.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/main.py Tue Jul 19 23:05:44 2011
@@ -164,6 +164,8 @@ entriesdump_binary = os.path.abspath('en
 atomic_ra_revprop_change_binary = os.path.abspath('atomic-ra-revprop-change' + \
                                                   _exe)
 wc_lock_tester_binary = os.path.abspath('../libsvn_wc/wc-lock-tester' + _exe)
+svnmucc_binary=os.path.abspath('../../../tools/client-side/svnmucc/svnmucc' + \
+                               _exe)
 
 # Location to the pristine repository, will be calculated from test_area_url
 # when we know what the user specified for --url.
@@ -579,6 +581,13 @@ def _with_auth(args):
   else:
     return args + ('--username', wc_author )
 
+def _with_log_message(args):
+
+  if '-m' in args or '--message' in args or '-F' in args:
+    return args
+  else:
+    return args + ('--message', 'default log message')
+
 # For running subversion and returning the output
 def run_svn(error_expected, *varargs):
   """Run svn with VARARGS; return exit code as int; stdout, stderr as
@@ -606,7 +615,7 @@ def run_svnrdump(stdin_input, *varargs):
   """Run svnrdump with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators).  Use binary mode for output."""
   if stdin_input:
-    return run_command_stdin(svnrdump_binary, 0, 1, 1, stdin_input,
+    return run_command_stdin(svnrdump_binary, 1, 1, 1, stdin_input,
                              *(_with_auth(_with_config_dir(varargs))))
   else:
     return run_command(svnrdump_binary, 1, 1,
@@ -622,6 +631,12 @@ def run_svnversion(*varargs):
   as list of lines (including line terminators)."""
   return run_command(svnversion_binary, 1, 0, *varargs)
 
+def run_svnmucc(*varargs):
+  """Run svnmucc with VARARGS, returns exit code as int; stdout, stderr as
+  list of lines (including line terminators).  Use binary mode for output."""
+  return run_command(svnmucc_binary, 1, 1,
+                     *(_with_auth(_with_config_dir(_with_log_message(varargs)))))
+
 def run_entriesdump(path):
   """Run the entries-dump helper, returning a dict of Entry objects."""
   # use spawn_process rather than run_command to avoid copying all the data
@@ -740,12 +755,12 @@ def create_repos(path):
     os.makedirs(path) # this creates all the intermediate dirs, if neccessary
 
   opts = ("--bdb-txn-nosync",)
-  if options.server_minor_version < 5:
+  if options.server_minor_version < 4:
+    opts += ("--pre-1.4-compatible",)
+  elif options.server_minor_version < 5:
     opts += ("--pre-1.5-compatible",)
   elif options.server_minor_version < 6:
     opts += ("--pre-1.6-compatible",)
-  elif options.server_minor_version < 7:
-    opts += ("--pre-1.7-compatible",)
   if options.fs_type is not None:
     opts += ("--fs-type=" + options.fs_type,)
   exit_code, stdout, stderr = run_command(svnadmin_binary, 1, 0, "create",
@@ -1111,6 +1126,9 @@ def server_gets_client_capabilities():
 def server_has_partial_replay():
   return options.server_minor_version >= 5
 
+def server_enforces_UTF8_fspaths_in_verify():
+  return options.server_minor_version >= 6
+
 def server_enforces_date_syntax():
   return options.server_minor_version >= 5
 
@@ -1519,8 +1537,11 @@ def _parse_options(arglist=sys.argv[1:])
     parser.error("'verbose' and 'quiet' are incompatible")
   if options.fsfs_packing and not options.fsfs_sharding:
     parser.error("--fsfs-packing requires --fsfs-sharding")
-  if options.server_minor_version < 4 or options.server_minor_version > 7:
-    parser.error("test harness only supports server minor versions 4-7")
+
+  # If you change the below condition then change
+  # ../../../../build/run_tests.py too.
+  if options.server_minor_version < 3 or options.server_minor_version > 7:
+    parser.error("test harness only supports server minor versions 3-7")
 
   if options.url:
     if options.url[-1:] == '/': # Normalize url to have no trailing slash
@@ -1600,6 +1621,7 @@ def execute_tests(test_list, serial_only
   global svnsync_binary
   global svndumpfilter_binary
   global svnversion_binary
+  global svnmucc_binary
   global options
 
   if test_name:
@@ -1675,6 +1697,7 @@ def execute_tests(test_list, serial_only
                                         'jsvndumpfilter' + _bat)
     svnversion_binary = os.path.join(options.svn_bin,
                                      'jsvnversion' + _bat)
+    svnversion_binary = os.path.join(options.svn_bin, 'jsvnmucc' + _bat)
   else:
     if options.svn_bin:
       svn_binary = os.path.join(options.svn_bin, 'svn' + _exe)
@@ -1684,6 +1707,7 @@ def execute_tests(test_list, serial_only
       svndumpfilter_binary = os.path.join(options.svn_bin,
                                           'svndumpfilter' + _exe)
       svnversion_binary = os.path.join(options.svn_bin, 'svnversion' + _exe)
+      svnmucc_binary = os.path.join(options.svn_bin, 'svnmucc' + _exe)
 
   ######################################################################
 

Propchange: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/objects.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/sandbox.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/sandbox.py Tue Jul 19 23:05:44 2011
@@ -204,16 +204,18 @@ class Sandbox:
       target = self.ospath(target)
     svntest.main.run_svn(False, 'switch', url, target, '--ignore-ancestry')
 
-  def simple_commit(self, target=None):
-    """Commit the WC or TARGET with a default log message.
+  def simple_commit(self, target=None, message=None):
+    """Commit the WC or TARGET, with a default or supplied log message.
+       Raise if the exit code is non-zero or there is output on stderr.
        TARGET is a relpath relative to the WC."""
     assert not self.read_only
     if target is None:
       target = self.wc_dir
     else:
       target = self.ospath(target)
-    svntest.main.run_svn(False, 'commit',
-                         '-m', svntest.main.make_log_msg(),
+    if message is None:
+      message = svntest.main.make_log_msg()
+    svntest.main.run_svn(False, 'commit', '-m', message,
                          target)
 
   def simple_rm(self, *targets):

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/wc.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svntest/wc.py Tue Jul 19 23:05:44 2011
@@ -135,10 +135,18 @@ class State:
       self.desc[path] = item
 
   def remove(self, *paths):
-    "Remove a path from the state (the path must exist)."
+    "Remove PATHS from the state (the paths must exist)."
     for path in paths:
       del self.desc[to_relpath(path)]
 
+  def remove_subtree(self, *paths):
+    "Remove PATHS recursively from the state (the paths must exist)."
+    for subtree_path in paths:
+      subtree_path = to_relpath(subtree_path)
+      for path, item in self.desc.items():
+        if path == subtree_path or path[:len(subtree_path) + 1] == subtree_path + '/':
+          del self.desc[path]
+
   def copy(self, new_root=None):
     """Make a deep copy of self.  If NEW_ROOT is not None, then set the
     copy's wc_dir NEW_ROOT instead of to self's wc_dir."""
@@ -180,13 +188,12 @@ class State:
 
   def subtree(self, subtree_path):
     """Return a State object which is a deep copy of the sub-tree
-    identified by SUBTREE_PATH (which is assumed to contain only one
-    element rooted at the tree of this State object's WC_DIR)."""
+    beneath SUBTREE_PATH (which is assumed to be rooted at the tree of
+    this State object's WC_DIR).  Exclude SUBTREE_PATH itself."""
     desc = { }
     for path, item in self.desc.items():
-      path_elements = path.split("/")
-      if len(path_elements) > 1 and path_elements[0] == subtree_path:
-        desc["/".join(path_elements[1:])] = item.copy()
+      if path[:len(subtree_path) + 1] == subtree_path + '/':
+        desc[path[len(subtree_path) + 1:]] = item.copy()
     return State(self.wc_dir, desc)
 
   def write_to_disk(self, target_dir):

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/switch_tests.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/switch_tests.py Tue Jul 19 23:05:44 2011
@@ -2856,6 +2856,56 @@ def up_to_old_rev_with_subtree_switched_
   # Now update the WC to r1.
   svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r1', wc_dir)
 
+def different_node_kind(sbox):
+  "switch to a different node kind"
+  sbox.build(read_only = True)
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+
+  pristine_disk = svntest.main.greek_state
+  pristine_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+  expected_disk = pristine_disk.copy()
+  expected_status = pristine_status.copy()
+
+  def switch_to_dir(sbox, rel_url, rel_path):
+    full_url = sbox.repo_url + '/' + rel_url
+    full_path = sbox.ospath(rel_path)
+    expected_disk.remove(rel_path)
+    expected_disk.add({ rel_path : pristine_disk.desc[rel_url] })
+    expected_disk.add_state(rel_path, pristine_disk.subtree(rel_url))
+    expected_status.tweak(rel_path, switched='S')
+    expected_status.add_state(rel_path, pristine_status.subtree(rel_url))
+    svntest.actions.run_and_verify_switch(sbox.wc_dir, full_path, full_url,
+                                          None, expected_disk, expected_status,
+                                          None, None, None, None, None, False,
+                                          '--ignore-ancestry')
+    svntest.actions.run_and_verify_svn(None, None, [], 'info', full_path)
+    if not os.path.isdir(full_path):
+      raise svntest.Failure
+
+  def switch_to_file(sbox, rel_url, rel_path):
+    full_url = sbox.repo_url + '/' + rel_url
+    full_path = sbox.ospath(rel_path)
+    expected_disk.remove_subtree(rel_path)
+    expected_disk.add({ rel_path : pristine_disk.desc[rel_url] })
+    expected_status.remove_subtree(rel_path)
+    expected_status.add({ rel_path : pristine_status.desc[rel_url] })
+    expected_status.tweak(rel_path, switched='S')
+    svntest.actions.run_and_verify_switch(sbox.wc_dir, full_path, full_url,
+                                          None, expected_disk, expected_status,
+                                          None, None, None, None, None, False,
+                                          '--ignore-ancestry')
+    svntest.actions.run_and_verify_svn(None, None, [], 'info', full_path)
+    if not os.path.isfile(full_path):
+      raise svntest.Failure
+
+  # Switch two files to dirs and two dirs to files.
+  # 'A/C' is an empty dir; 'A/D/G' is a non-empty dir.
+  switch_to_dir(sbox, 'A/C', 'iota')
+  switch_to_dir(sbox, 'A/D/G', 'A/D/gamma')
+  switch_to_file(sbox, 'iota', 'A/C')
+  switch_to_file(sbox, 'A/D/gamma', 'A/D/G')
+
 ########################################################################
 # Run the tests
 
@@ -2895,6 +2945,7 @@ test_list = [ None,
               tree_conflicts_on_switch_3,
               copy_with_switched_subdir,
               up_to_old_rev_with_subtree_switched_to_root,
+              different_node_kind,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/tree_conflict_tests.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/tree_conflict_tests.py Tue Jul 19 23:05:44 2011
@@ -479,7 +479,7 @@ def ensure_tree_conflict(sbox, operation
         incoming_right_rev = source_right_rev
       else:
         incoming_right_rev = head_rev
-      expected_info = { 'Tree conflict' : operation +
+      expected_info = { 'Tree conflict' : '.* upon ' + operation +
           r'.* \((none|(file|dir).*' +
             re.escape(victim_name + '@' + str(incoming_left_rev)) + r')' +
           r'.* \((none|(file|dir).*' +
@@ -1164,10 +1164,8 @@ def actual_only_node_behaviour(sbox):
   run_and_verify_svn(None, expected_stdout, expected_stderr,
                      "cat", "-r", "BASE", foo_path)
   # changelist (cl)
-  ### this does not error out -- needs review
-  ### the item does not end up in the changelist so this is a cosmetic problem
   expected_stdout = None
-  expected_stderr = []
+  expected_stderr = ".*svn: warning: W155010: The node '.*foo' was not found."
   run_and_verify_svn(None, expected_stdout, expected_stderr,
                      "changelist", "my_changelist", foo_path)
 
@@ -1226,8 +1224,6 @@ def actual_only_node_behaviour(sbox):
     'Name': 'foo',
     'Schedule': 'normal',
     'Node Kind': 'none',
-    'Depth': 'empty', ### is this right?
-    'Copied From Rev': '0',
     'Path': re.escape(sbox.ospath('A/foo')),
   }
   run_and_verify_info([expected_info], foo_path)
@@ -1303,11 +1299,10 @@ def actual_only_node_behaviour(sbox):
                      "propget", "svn:eol-style", foo_path)
 
   # proplist (plist, pl)
-  ### proplist does exit(0) -- is that expected?
   expected_stdout = None
   expected_stderr = ".*foo.*is not under version control.*"
-  svntest.actions.run_and_verify_svn2(None, expected_stdout, expected_stderr,
-                                      0, "proplist", foo_path)
+  svntest.actions.run_and_verify_svn(None, expected_stdout, expected_stderr,
+                                     "proplist", foo_path)
 
   # propset (pset, ps)
   expected_stdout = None
@@ -1365,7 +1360,7 @@ def actual_only_node_behaviour(sbox):
 
   # update (up)
   expected_stdout = [
-   "Skipped '%s'\n" % sbox.ospath('A/foo'),
+   "Skipped '%s' -- Node remains in conflict\n" % sbox.ospath('A/foo'),
    "Summary of conflicts:\n",
    "  Skipped paths: 1\n",
   ]

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/update_tests.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/update_tests.py Tue Jul 19 23:05:44 2011
@@ -5342,6 +5342,68 @@ def revive_children_of_copy(sbox):
   if not os.path.exists(psi2_path):
     raise svntest.Failure('psi unexpectedly non-existent')
 
+@SkipUnless(svntest.main.is_os_windows)
+def skip_access_denied(sbox):
+  """access denied paths should be skipped"""
+
+  # We need something to lock the file. 'msvcrt' looks common on Windows
+  try:
+    import msvcrt
+  except ImportError:
+    raise svntest.Skip
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  iota = sbox.ospath('iota')
+
+  svntest.main.file_write(iota, 'Q')
+  sbox.simple_commit()
+  sbox.simple_update() # Update to r2
+
+  # Open iota for writing to keep an handle open
+  f = open(iota, 'w')
+
+  # Write new text of exactly the same size to avoid the early out
+  # on a different size without properties.
+  f.write('R')
+  f.flush()
+
+  # And lock the first byte of the file
+  msvcrt.locking(f.fileno(), 1, 1)
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'iota' : Item(verb='Skipped'),
+    })
+
+  # Create expected status tree: iota isn't updated
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('iota', status='M ', wc_rev=2)
+
+  # And now check that update skips the path
+  # *and* status shows the path as modified.
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        None,
+                                        expected_status,
+                                        None,
+                                        None, None,
+                                        None, None, None, wc_dir, '-r', '1')
+
+  f.close()
+
+def update_to_HEAD_plus_1(sbox):
+  "updating to HEAD+1 should fail"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None, None, None,
+                                        ".*No such revision",
+                                        None, None,
+                                        None, None, None, wc_dir, '-r', '2')
+
 
 #######################################################################
 # Run the tests
@@ -5407,6 +5469,8 @@ test_list = [ None,
               update_with_file_lock_and_keywords_property_set,
               update_nonexistent_child_of_copy,
               revive_children_of_copy,
+              skip_access_denied,
+              update_to_HEAD_plus_1,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/upgrade_tests.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/upgrade_tests.py Tue Jul 19 23:05:44 2011
@@ -382,6 +382,25 @@ def xml_entries_relocate(path, from_url,
     if os.path.isdir(os.path.join(item_path, adm_name)):
       xml_entries_relocate(item_path, from_url, to_url)
 
+# Poor mans relocate to fix up an working copy to refer to a
+# valid repository, so svn upgrade can do its work on it
+def simple_entries_replace(path, from_url, to_url):
+  adm_name = svntest.main.get_admin_name()
+  entries = os.path.join(path, adm_name, 'entries')
+  txt = open(entries).read().replace(from_url, to_url)
+  os.chmod(entries, 0777)
+  open(entries, 'wb').write(txt)
+
+  for dirent in os.listdir(path):
+    item_path = os.path.join(path, dirent)
+
+    if dirent == svntest.main.get_admin_name():
+      continue
+
+    if os.path.isdir(os.path.join(item_path, adm_name)):
+      simple_entries_replace(item_path, from_url, to_url)
+
+
 def basic_upgrade_1_0(sbox):
   "test upgrading a working copy created with 1.0.0"
 
@@ -630,10 +649,10 @@ def missing_dirs(sbox):
       'A'                 : Item(status='  ', wc_rev='1'),
       'A/mu'              : Item(status='  ', wc_rev='1'),
       'A/C'               : Item(status='  ', wc_rev='1'),
-      'A/D'               : Item(status='! ', wc_rev='-'),
+      'A/D'               : Item(status='! ', wc_rev='1'),
       'A/B'               : Item(status='  ', wc_rev='1'),
       'A/B/F'             : Item(status='  ', wc_rev='1'),
-      'A/B/E'             : Item(status='! ', wc_rev='-'),
+      'A/B/E'             : Item(status='! ', wc_rev='1'),
       'A/B/lambda'        : Item(status='  ', wc_rev='1'),
       'iota'              : Item(status='  ', wc_rev='1'),
       'A/B_new'           : Item(status='A ', wc_rev='-', copied='+'),
@@ -659,10 +678,10 @@ def missing_dirs2(sbox):
       'A'                 : Item(status='  ', wc_rev='1'),
       'A/mu'              : Item(status='  ', wc_rev='1'),
       'A/C'               : Item(status='  ', wc_rev='1'),
-      'A/D'               : Item(status='! ', wc_rev='-'),
+      'A/D'               : Item(status='! ', wc_rev='1'),
       'A/B'               : Item(status='  ', wc_rev='1'),
       'A/B/F'             : Item(status='  ', wc_rev='1'),
-      'A/B/E'             : Item(status='! ', wc_rev='-'),
+      'A/B/E'             : Item(status='! ', wc_rev='1'),
       'A/B/lambda'        : Item(status='  ', wc_rev='1'),
       'iota'              : Item(status='  ', wc_rev='1'),
       'A/B_new'           : Item(status='A ', wc_rev='-', copied='+'),
@@ -706,8 +725,8 @@ def dirs_only_upgrade(sbox):
 
   replace_sbox_with_tarfile(sbox, 'dirs-only.tar.bz2')
 
-  expected_output = ["Upgraded '%s'.\n" % (sbox.ospath('').rstrip(os.path.sep)),
-                     "Upgraded '%s'.\n" % (sbox.ospath('A'))]
+  expected_output = ["Upgraded '%s'\n" % (sbox.ospath('').rstrip(os.path.sep)),
+                     "Upgraded '%s'\n" % (sbox.ospath('A'))]
 
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'upgrade', sbox.wc_dir)
@@ -1017,6 +1036,64 @@ def add_add_x2(sbox):
     })
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
+@Issue(3940)
+def upgrade_with_missing_subdir(sbox):
+  "test upgrading a working copy with missing subdir"
+
+  sbox.build(create_wc = False)
+  replace_sbox_with_tarfile(sbox, 'basic_upgrade.tar.bz2')
+
+  simple_entries_replace(sbox.wc_dir,
+                         'file:///Users/Hyrum/dev/test/greek-1.6.repo',
+                         sbox.repo_url)
+
+  svntest.main.run_svnadmin('setuuid', sbox.repo_dir,
+                            'cafefeed-babe-face-dead-beeff00dfade')
+
+  url = sbox.repo_url
+  wc_dir = sbox.wc_dir
+
+  # Attempt to use the working copy, this should give an error
+  expected_stderr = wc_is_too_old_regex
+  svntest.actions.run_and_verify_svn(None, None, expected_stderr,
+                                     'info', sbox.wc_dir)
+
+  # Now remove a subdirectory
+  svntest.main.safe_rmtree(sbox.ospath('A/B'))
+
+  # Now upgrade the working copy and expect a missing subdir
+  expected_output = [
+    "Upgraded '%s'\n" % sbox.wc_dir,
+    "Upgraded '%s'\n" % sbox.ospath('A'),
+    "Skipped '%s'\n" % sbox.ospath('A/B'),
+    "Upgraded '%s'\n" % sbox.ospath('A/C'),
+    "Upgraded '%s'\n" % sbox.ospath('A/D'),
+    "Upgraded '%s'\n" % sbox.ospath('A/D/G'),
+    "Upgraded '%s'\n" % sbox.ospath('A/D/H'),
+  ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'upgrade', sbox.wc_dir)
+
+  # And now perform an update. (This used to fail with an assertion)
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/B'               : Item(verb='Restored'),
+    'A/B/E'             : Item(status='A '),
+    'A/B/E/alpha'       : Item(status='A '),
+    'A/B/E/beta'        : Item(status='A '),
+    'A/B/lambda'        : Item(status='A '),
+    'A/B/F'             : Item(status='A '),
+  })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+
+  # Do the update and check the results in three ways.
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status)
+
+
 ########################################################################
 # Run the tests
 
@@ -1063,6 +1140,7 @@ test_list = [ None,
               depth_exclude_2,
               add_add_del_del_tc,
               add_add_x2,
+              upgrade_with_missing_subdir,
              ]
 
 

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_fs_base/fs-base-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_fs_base/fs-base-test.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_fs_base/fs-base-test.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_fs_base/fs-base-test.c Tue Jul 19 23:05:44 2011
@@ -1087,13 +1087,6 @@ delete(const svn_test_opts_t *opts,
 }
 
 
-
-struct node_created_rev_args {
-  const char *path;
-  svn_revnum_t rev;
-};
-
-
 static svn_error_t *
 canonicalize_abspath(const svn_test_opts_t *opts,
                      apr_pool_t *pool)
@@ -1155,7 +1148,6 @@ create_within_copy(const svn_test_opts_t
   svn_fs_t *fs;
   svn_fs_txn_t *txn;
   svn_fs_root_t *txn_root, *rev_root;
-  int i;
   svn_revnum_t youngest_rev = 0;
 
   /* Create a filesystem and repository. */
@@ -1230,6 +1222,7 @@ create_within_copy(const svn_test_opts_t
           "A/D3/down",
           "A/D3/J" }
       };
+    int i;
 
     SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
 

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/dirent_uri-test.c Tue Jul 19 23:05:44 2011
@@ -2492,7 +2492,7 @@ test_file_url_from_dirent(apr_pool_t *po
 #else
     { "/a/b",                      "file:///a/b" },
     { "/a",                        "file:///a" },
-    { "/",                         "file:///" },
+    { "/",                         "file://" },
     { "/File#$",                   "file:///File%23$" },
 #endif
   };

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/opt-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/opt-test.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/opt-test.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_subr/opt-test.c Tue Jul 19 23:05:44 2011
@@ -44,14 +44,19 @@ test_parse_peg_rev(apr_pool_t *pool)
     { "foo/bar@{1999-12-31}", "foo/bar",      {svn_opt_revision_date, {0}} },
     { "http://a/b@27",        "http://a/b",   {svn_opt_revision_number, {27}} },
     { "http://a/b@COMMITTED", "http://a/b",   {svn_opt_revision_committed} },
-    { "foo/bar@1:2",          NULL,           {svn_opt_revision_unspecified} },
-    { "foo/bar@baz",          NULL,           {svn_opt_revision_unspecified} },
+    { "http://a/b@{1999-12-31}",    "http://a/b",{svn_opt_revision_date, {0}} },
+    { "http://a/b@%7B1999-12-31%7D","http://a/b",{svn_opt_revision_date, {0}} },
+    { "foo/bar@1:2",          NULL,           {-1} },
+    { "foo/bar@baz",          NULL,           {-1} },
     { "foo/bar@",             "foo/bar",      {svn_opt_revision_unspecified} },
+    { "foo/@bar@",            "foo/@bar",     {svn_opt_revision_unspecified} },
     { "foo/bar/@13",          "foo/bar/",     {svn_opt_revision_number, {13}} },
     { "foo/bar@@13",          "foo/bar@",     {svn_opt_revision_number, {13}} },
     { "foo/@bar@HEAD",        "foo/@bar",     {svn_opt_revision_head} },
     { "foo@/bar",             "foo@/bar",     {svn_opt_revision_unspecified} },
     { "foo@HEAD/bar",         "foo@HEAD/bar", {svn_opt_revision_unspecified} },
+    { "@foo/bar",             "@foo/bar",     {svn_opt_revision_unspecified} },
+    { "@foo/bar@",            "@foo/bar",     {svn_opt_revision_unspecified} },
   };
 
   for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/db-test.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/db-test.c Tue Jul 19 23:05:44 2011
@@ -656,7 +656,7 @@ test_inserting_nodes(apr_pool_t *pool)
             pool));
 
   /* Replace an incomplete node with an absent file node. */
-  SVN_ERR(svn_wc__db_base_add_absent_node(
+  SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "N/N-b", pool),
             "N/N-b", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_file, svn_wc__db_status_server_excluded,
@@ -664,7 +664,7 @@ test_inserting_nodes(apr_pool_t *pool)
             pool));
 
   /* Create a new excluded directory node. */
-  SVN_ERR(svn_wc__db_base_add_absent_node(
+  SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "P", pool),
             "P", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_dir, svn_wc__db_status_excluded,
@@ -680,7 +680,7 @@ test_inserting_nodes(apr_pool_t *pool)
             pool));
 
   /* Create a new absent unknown-kind node. */
-  SVN_ERR(svn_wc__db_base_add_absent_node(
+  SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "R", pool),
             "R", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_unknown, svn_wc__db_status_server_excluded,
@@ -856,14 +856,14 @@ test_pdh(apr_pool_t *pool)
      some internal functionality of wc_db.  This is a handy driver for
      debugging wc_db to ensure it manages per-directory handles properly.  */
 
-  SVN_ERR(svn_wc__db_base_add_absent_node(
+  SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "sub", pool),
             "sub", ROOT_ONE, UUID_ONE, 1,
             svn_wc__db_kind_file, svn_wc__db_status_server_excluded,
             NULL, NULL,
             pool));
 
-  SVN_ERR(svn_wc__db_base_add_absent_node(
+  SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "sub/A", pool),
             "sub/A", ROOT_ONE, UUID_ONE, 1,
             svn_wc__db_kind_file, svn_wc__db_status_server_excluded,

Propchange: subversion/branches/gpg-agent-password-store/subversion/tests/manual/tree-conflicts-add-vs-add.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_fs.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_fs.c Tue Jul 19 23:05:44 2011
@@ -82,8 +82,7 @@ make_fs_config(const char *fs_type,
   if (server_minor_version)
     {
       if (server_minor_version == 6)
-        apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE,
-                     APR_HASH_KEY_STRING, "1");
+        /* no SVN_FS_CONFIG_PRE_1_7_COMPATIBLE */;
       else if (server_minor_version == 5)
         apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
                      APR_HASH_KEY_STRING, "1");

Propchange: subversion/branches/gpg-agent-password-store/tools/buildbot/master/Feeder.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/buildbot/master/SVNMailNotifier.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/buildbot/master/private-sample.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svncheck.sh?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svncheck.sh (original)
+++ subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svncheck.sh Tue Jul 19 23:05:44 2011
@@ -29,9 +29,9 @@ if test -z "$1" ; then
 fi
 
 echo "========= mount RAM disc"
-# ignore the result: if it fails, the test will just take longer...
-mkdir -p subversion/tests/cmdline/svn-test-work
-test -e ../mount-ramdrive && ../mount-ramdrive
+test ! -e /dev/shm/svn-test-work && mkdir /dev/shm/svn-test-work
+test -e subversion/tests/cmdline/svn-test-work && rm -rf subversion/tests/cmdline/svn-test-work
+ln -s /dev/shm/svn-test-work subversion/tests/cmdline/
 
 echo "========= make check"
 make check FS_TYPE=$1 CLEANUP=1 || exit $?

Modified: subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svnclean.sh
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svnclean.sh?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svnclean.sh (original)
+++ subversion/branches/gpg-agent-password-store/tools/buildbot/slaves/ubuntu-x64/svnclean.sh Tue Jul 19 23:05:44 2011
@@ -22,10 +22,6 @@
 
 set -x
 
-echo "========= unmount RAM disc"
-# ignore the result: if there was no ramdisc, that's fine
-test -e ../unmount-ramdrive && ../unmount-ramdrive
-
 echo "========= make extraclean"
 cd build
 test -e Makefile && (make extraclean || exit $?)

Modified: subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c Tue Jul 19 23:05:44 2011
@@ -1,21 +1,24 @@
 /*
+ * svnmucc.c: Subversion Multiple URL Client
  *
- * 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
+ * ====================================================================
+ *    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
+ *      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.
+ *    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.
+ * ====================================================================
  *
  */
 
@@ -23,10 +26,6 @@
 
     Combine a list of mv, cp and rm commands on URLs into a single commit.
 
-    Copyright 2005 Philip Martin <ph...@codematters.co.uk>
-
-    Licenced under the same terms as Subversion.
-
     How it works: the command line arguments are parsed into an array of
     action structures.  The action structures are interpreted to build a
     tree of operation structures.  The tree of operation structures is
@@ -110,13 +109,14 @@ create_ra_callbacks(svn_ra_callbacks2_t 
                     const char *username,
                     const char *password,
                     svn_boolean_t non_interactive,
+                    svn_boolean_t no_auth_cache,
                     apr_pool_t *pool)
 {
   SVN_ERR(svn_ra_create_callbacks(callbacks, pool));
 
   SVN_ERR(svn_cmdline_create_auth_baton(&(*callbacks)->auth_baton,
                                         non_interactive,
-                                        username, password, NULL, FALSE,
+                                        username, password, NULL, no_auth_cache,
                                         FALSE, NULL, NULL, NULL, pool));
 
   (*callbacks)->open_tmp_file = open_tmp_file;
@@ -618,6 +618,7 @@ execute(const apr_array_header_t *action
         const char *config_dir,
         const apr_array_header_t *config_options,
         svn_boolean_t non_interactive,
+        svn_boolean_t no_auth_cache,
         svn_revnum_t base_revision,
         apr_pool_t *pool)
 {
@@ -635,7 +636,7 @@ execute(const apr_array_header_t *action
   SVN_ERR(svn_cmdline__apply_config_options(config, config_options,
                                             "svnmucc: ", "--config-option"));
   SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password,
-                              non_interactive, pool));
+                              non_interactive, no_auth_cache, pool));
   SVN_ERR(svn_ra_open4(&session, NULL, anchor, NULL, ra_callbacks,
                        NULL, config, pool));
 
@@ -780,7 +781,9 @@ usage(apr_pool_t *pool, int exit_val)
     "  -X, --extra-args ARG  append arguments from file ARG (one per line;\n"
     "                        use \"-\" to read from standard input)\n"
     "  --config-dir ARG      use ARG to override the config directory\n"
-    "  --config-option ARG   use ARG so override a configuration option\n";
+    "  --config-option ARG   use ARG so override a configuration option\n"
+    "  --no-auth-cache       do not cache authentication tokens\n"
+    "  --version             print version information\n";
   svn_error_clear(svn_cmdline_fputs(msg, stream, pool));
   apr_pool_destroy(pool);
   exit(exit_val);
@@ -794,6 +797,22 @@ insufficient(apr_pool_t *pool)
                pool);
 }
 
+static svn_error_t *
+display_version(apr_getopt_t *os, apr_pool_t *pool)
+{
+  const char *ra_desc_start
+    = "The following repository access (RA) modules are available:\n\n";
+  svn_stringbuf_t *version_footer;
+
+  version_footer = svn_stringbuf_create(ra_desc_start, pool);
+  SVN_ERR(svn_ra_print_modules(version_footer, pool));
+
+  SVN_ERR(svn_opt_print_help3(os, "svnmucc", TRUE, FALSE, version_footer->data,
+                              NULL, NULL, NULL, NULL, NULL, pool));
+
+  return SVN_NO_ERROR;
+}
+
 int
 main(int argc, const char **argv)
 {
@@ -806,6 +825,8 @@ main(int argc, const char **argv)
   enum {
     config_dir_opt = SVN_OPT_FIRST_LONGOPT_ID,
     config_inline_opt,
+    no_auth_cache_opt,
+    version_opt,
     with_revprop_opt
   };
   const apr_getopt_option_t options[] = {
@@ -821,6 +842,8 @@ main(int argc, const char **argv)
     {"non-interactive", 'n', 0, ""},
     {"config-dir", config_dir_opt, 1, ""},
     {"config-option",  config_inline_opt, 1, ""},
+    {"no-auth-cache",  no_auth_cache_opt, 0, ""},
+    {"version", version_opt, 0, ""},
     {NULL, 0, 0, NULL}
   };
   const char *message = NULL;
@@ -829,6 +852,7 @@ main(int argc, const char **argv)
   const char *config_dir = NULL;
   apr_array_header_t *config_options;
   svn_boolean_t non_interactive = FALSE;
+  svn_boolean_t no_auth_cache = FALSE;
   svn_revnum_t base_revision = SVN_INVALID_REVNUM;
   apr_array_header_t *action_args;
   apr_hash_t *revprops = apr_hash_make(pool);
@@ -924,6 +948,13 @@ main(int argc, const char **argv)
           if (err)
             handle_error(err, pool);
           break;
+        case no_auth_cache_opt:
+          no_auth_cache = TRUE;
+          break;
+        case version_opt:
+          SVN_INT_ERR(display_version(getopt, pool));
+          exit(EXIT_SUCCESS);
+          break;
         case 'h':
           usage(pool, EXIT_SUCCESS);
           break;
@@ -1159,7 +1190,7 @@ main(int argc, const char **argv)
 
   if ((err = execute(actions, anchor, revprops, username, password,
                      config_dir, config_options, non_interactive,
-                     base_revision, pool)))
+                     no_auth_cache, base_revision, pool)))
     handle_error(err, pool);
 
   svn_pool_destroy(pool);

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/benchmarks/suite1/benchmark.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/gen-py-errors.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/gen_junit_report.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/log_revnum_change_asf.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/mklog.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn Tue Jul 19 23:05:44 2011
@@ -19,14 +19,16 @@
 #
 # WARNING: This may or may not work on your system. This Makefile is
 # an example, rather than a ready-made universal solution.
-#
-# Note to Subversion committers:
-# This Makefile is used by the bb-openbsd buildbot
-# (http://ci.apache.org/builders/bb-openbsd).
-# Please check the bot's health after making changes to this file.
 
-ENABLE_PYTHON_BINDINGS ?= yes
-ENABLE_RUBY_BINDINGS ?= yes
+#   ****************************************************************
+#   **       IMPORTANT NOTE FOR SVN COMMITTERS:  READ THIS.       **
+#   **                                                            **
+#   ****************************************************************
+#   | This Makefile is used by the bb-openbsd buildbot             |
+#   | (http://ci.apache.org/builders/bb-openbsd). Please check     |
+#   | the bot's health after making changes to this file.          |
+#   |______________________________________________________________|
+
 ENABLE_PERL_BINDINGS ?= yes
 ENABLE_JAVA_BINDINGS ?= no # they don't build with thread-less APR...
 USE_APR_ICONV ?= no # set to yes to use APR iconv instead of GNU iconv
@@ -64,11 +66,14 @@ GNU_ICONV_VER	= 1.13.1
 APR_UTIL_VER	= 1.3.12
 HTTPD_VER	= 2.2.19
 NEON_VER	= 0.29.6
-SERF_VER	= 0.7.x
+SERF_VER	= 1.0.0
 SERF_OLD_VER	= 0.3.1
 CYRUS_SASL_VER	= 2.1.23
 SQLITE_VER	= 3070603
 LIBMAGIC_VER	= 5.07
+RUBY_VER	= 1.8.7-p334
+BZ2_VER	= 1.0.6
+PYTHON_VER	= 2.7.2
 
 BDB_DIST	= db-$(BDB_VER).tar.gz
 APR_ICONV_DIST	= apr-iconv-$(APR_ICONV_VER).tar.gz
@@ -78,6 +83,9 @@ SQLITE_DIST	= sqlite-autoconf-$(SQLITE_V
 CYRUS_SASL_DIST	= cyrus-sasl-$(CYRUS_SASL_VER).tar.gz
 HTTPD_DIST	= httpd-$(HTTPD_VER).tar.bz2
 LIBMAGIC_DIST	= file-$(LIBMAGIC_VER).tar.gz
+RUBY_DIST	= ruby-$(RUBY_VER).tar.gz
+BZ2_DIST	= bzip2-$(BZ2_VER).tar.gz
+PYTHON_DIST	= Python-$(PYTHON_VER).tgz
 
 DISTFILES	= $(DISTDIR)/$(NEON_DIST) \
 		$(DISTDIR)/$(SERF_DIST) \
@@ -86,7 +94,10 @@ DISTFILES	= $(DISTDIR)/$(NEON_DIST) \
 		$(DISTDIR)/$(APR_ICONV_DIST) \
 		$(DISTDIR)/$(GNU_ICONV_DIST) \
 		$(DISTDIR)/$(CYRUS_SASL_DIST) \
-		$(DISTDIR)/$(LIBMAGIC_DIST)
+		$(DISTDIR)/$(LIBMAGIC_DIST) \
+		$(DISTDIR)/$(RUBY_DIST) \
+		$(DISTDIR)/$(BZ2_DIST) \
+		$(DISTDIR)/$(PYTHON_DIST)
 
 FETCH_CMD	= wget -c
 
@@ -99,11 +110,14 @@ APR_UTIL_URL	= http://svn.apache.org/rep
 HTTPD_URL	= http://archive.apache.org/dist/httpd/$(HTTPD_DIST)
 NEON_URL	= http://webdav.org/neon/$(NEON_DIST)
 #SERF_URL	= http://serf.googlecode.com/files/$(SERF_DIST)
-SERF_URL	= http://serf.googlecode.com/svn/branches/$(SERF_VER)
+SERF_URL	= http://serf.googlecode.com/svn/tags/$(SERF_VER)
 SERF_OLD_URL	= http://serf.googlecode.com/svn/tags/$(SERF_OLD_VER)
 SQLITE_URL	= http://www.sqlite.org/$(SQLITE_DIST)
 CYRUS_SASL_URL	= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST)
 LIBMAGIC_URL	= ftp://ftp.astron.com/pub/file/$(LIBMAGIC_DIST)
+RUBY_URL	= http://ftp.ruby-lang.org/pub/ruby/1.8/$(RUBY_DIST)
+BZ2_URL		= http://bzip.org/$(BZ2_VER)/$(BZ2_DIST)
+PYTHON_URL	= http://python.org/ftp/python/2.7.2/$(PYTHON_DIST)
 
 BDB_SRCDIR	= $(SRCDIR)/db-$(BDB_VER)
 APR_SRCDIR	= $(SRCDIR)/apr-$(APR_VER)
@@ -117,6 +131,9 @@ SERF_OLD_SRCDIR	= $(SRCDIR)/serf-$(SERF_
 SQLITE_SRCDIR	= $(SRCDIR)/sqlite-autoconf-$(SQLITE_VER)
 CYRUS_SASL_SRCDIR	= $(SRCDIR)/cyrus-sasl-$(CYRUS_SASL_VER)
 LIBMAGIC_SRCDIR	= $(SRCDIR)/file-$(LIBMAGIC_VER)
+RUBY_SRCDIR	= $(SRCDIR)/ruby-$(RUBY_VER)
+BZ2_SRCDIR	= $(SRCDIR)/bzip2-$(BZ2_VER)
+PYTHON_SRCDIR	= $(SRCDIR)/Python-$(PYTHON_VER)
 SVN_SRCDIR	= $(SVN_WC)
 
 BDB_OBJDIR	= $(OBJDIR)/db-$(BDB_VER)
@@ -131,6 +148,9 @@ SERF_OLD_OBJDIR	= $(OBJDIR)/serf-$(SERF_
 SQLITE_OBJDIR	= $(OBJDIR)/sqlite-$(SQLITE_VER)
 CYRUS_SASL_OBJDIR	= $(OBJDIR)/cyrus-sasl-$(CYRUS_SASL_VER)
 LIBMAGIC_OBJDIR	= $(OBJDIR)/file-$(LIBMAGIC_VER)
+RUBY_OBJDIR	= $(OBJDIR)/ruby-$(RUBY_VER)
+BZ2_OBJDIR	= $(OBJDIR)/bzip2-$(BZ2_VER)
+PYTHON_OBJDIR	= $(OBJDIR)/python-$(PYTHON_VER)
 SVN_OBJDIR	= $(OBJDIR)/$(SVN_REL_WC)
 
 # Tweak this for out-of-tree builds. Note that running individual
@@ -142,6 +162,9 @@ ifdef PROFILE
 PROFILE_CFLAGS=-pg
 endif
 
+# We need this to make sure some targets below pick up the right libraries
+LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/python/lib:$(PREFIX)/svn-$(WC)/lib
+
 #######################################################################
 # Main targets.
 #######################################################################
@@ -151,17 +174,19 @@ endif
 all: dirs-create bdb-install apr-install iconv-install apr-util-install \
 	httpd-install neon-install serf-install serf-old-install \
 	sqlite-install cyrus-sasl-install libmagic-install \
+	ruby-install bz2-install python-install \
 	svn-install svn-bindings-install
 
 # Use these to start a build from the beginning.
 reset: dirs-reset bdb-reset apr-reset iconv-reset apr-util-reset \
 	httpd-reset neon-reset serf-reset serf-old-reset sqlite-reset \
-	cyrus-sasl-reset libmagic-reset svn-reset
+	cyrus-sasl-reset libmagic-reset ruby-reset python-reset \
+	bz2-install svn-reset
 
 # Use to save disk space.
 clean: bdb-clean apr-clean iconv-clean apr-util-clean httpd-clean \
 	neon-clean serf-clean serf-old-clean sqlite-clean cyrus-sasl-clean \
-	libmagic-clean svn-clean
+	libmagic-clean ruby-clean bz2-clean python-clean svn-clean
 
 # Nukes everything (including installed binaries!)
 # Use this to start ALL OVER AGAIN! Use with caution!
@@ -366,30 +391,32 @@ $(DISTDIR)/$(GNU_ICONV_DIST):
 	cd $(DISTDIR) && $(FETCH_CMD) $(GNU_ICONV_URL)
 
 $(GNU_ICONV_OBJDIR)/lib_encodings.def.diff:
-	[ -d $(GNU_ICONV_OBJDIR) ] || mkdir -p $(GNU_ICONV_OBJDIR)
-	echo "--- lib/encodings.def.orig	Wed Oct 24 23:41:41 2007" > $@
-	echo "+++ lib/encodings.def	Wed Oct 24 23:43:47 2007" >> $@
-	echo "@@ -37,6 +37,7 @@" >> $@
-	echo " " >> $@
-	echo " " >> $@
-	echo " DEFENCODING(( \"US-ASCII\",               /* IANA */" >> $@
-	echo "+              \"646\"," >> $@
-	echo "               \"ASCII\",                  /* IANA, JDK 1.1 */" >> $@
-	echo "               \"ISO646-US\",              /* IANA */" >> $@
-	echo "               \"ISO_646.IRV:1991\",       /* IANA */" >> $@
+	mkdir -p $(dir $@)
+	echo > $@.tmp '--- lib/encodings.def.orig	Wed Oct 24 23:41:41 2007'
+	echo >>$@.tmp '+++ lib/encodings.def	Wed Oct 24 23:43:47 2007'
+	echo >>$@.tmp '@@ -37,6 +37,7 @@'
+	echo >>$@.tmp ' '
+	echo >>$@.tmp ' '
+	echo >>$@.tmp ' DEFENCODING(( "US-ASCII",               /* IANA */'
+	echo >>$@.tmp '+              "646",'
+	echo >>$@.tmp '               "ASCII",                  /* IANA, JDK 1.1 */'
+	echo >>$@.tmp '               "ISO646-US",              /* IANA */'
+	echo >>$@.tmp '               "ISO_646.IRV:1991",       /* IANA */'
+	mv -f $@.tmp $@
 
 $(GNU_ICONV_OBJDIR)/lib_aliases.gperf.diff:
-	[ -d $(GNU_ICONV_OBJDIR) ] || mkdir -p $(GNU_ICONV_OBJDIR)
-	echo "--- lib/aliases.gperf.orig	Wed Oct 24 23:41:32 2007" > $@
-	echo "+++ lib/aliases.gperf	Wed Oct 24 23:47:38 2007" >> $@
-	echo "@@ -10,6 +10,7 @@ struct alias { int name; unsigned int encoding_index; " >> $@
-	echo " %pic" >> $@
-	echo " %%" >> $@
-	echo " US-ASCII, ei_ascii" >> $@
-	echo "+646, ei_ascii" >> $@
-	echo " ASCII, ei_ascii" >> $@
-	echo " ISO646-US, ei_ascii" >> $@
-	echo " ISO_646.IRV:1991, ei_ascii" >> $@
+	mkdir -p $(dir $@)
+	echo > $@.tmp '--- lib/aliases.gperf.orig	Wed Oct 24 23:41:32 2007'
+	echo >>$@.tmp '+++ lib/aliases.gperf	Wed Oct 24 23:47:38 2007'
+	echo >>$@.tmp '@@ -10,6 +10,7 @@ struct alias { int name; unsigned int encoding_index; '
+	echo >>$@.tmp ' %pic'
+	echo >>$@.tmp ' %%'
+	echo >>$@.tmp ' US-ASCII, ei_ascii'
+	echo >>$@.tmp '+646, ei_ascii'
+	echo >>$@.tmp ' ASCII, ei_ascii'
+	echo >>$@.tmp ' ISO646-US, ei_ascii'
+	echo >>$@.tmp ' ISO_646.IRV:1991, ei_ascii'
+	mv -f $@.tmp $@
 
 # retrieve gnu-iconv
 # Add 646 as an alias for ASCII to fix prop_test 22 on OpenBSD
@@ -546,24 +573,26 @@ $(HTTPD_OBJDIR)/.installed: $(HTTPD_OBJD
 	touch $@
 
 # create a httpd.conf for mod_dav_svn
-$(PREFIX)/httpd/conf/httpd-$(SVN_REL_WC).conf: $(HTTPD_OBJDIR)/.installed
-	echo "# httpd config for use with mod_dav_svn" > $@
-	echo "ServerRoot \"$(PREFIX)/httpd\"" >> $@
-	echo "Listen localhost:8080" >> $@
-	echo "LoadModule dav_svn_module modules/svn-$(WC)/mod_dav_svn.so" >> $@
-	echo "LoadModule authz_svn_module modules/svn-$(WC)/mod_authz_svn.so" >> $@
-	echo "DocumentRoot "$(PREFIX)/httpd/htdocs"" >> $@
-	echo "<Directory />" >> $@
-	echo "    Options FollowSymLinks" >> $@
-	echo "    AllowOverride None" >> $@
-	echo "    Order deny,allow" >> $@
-	echo "    Deny from all" >> $@
-	echo "</Directory>" >> $@
-	echo "<Location /repos>" >> $@
-	echo "    DAV svn" >> $@
-	echo "    SVNPath /tmp/svn-sandbox/repos" >> $@
-	echo "    Allow from localhost" >> $@
-	echo "</Location>" >> $@
+$(HTTPD_CONF):
+	mkdir -p $(dir $@)
+	echo > $@.tmp '# httpd config for use with mod_dav_svn'
+	echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"'
+	echo >>$@.tmp 'Listen localhost:8080'
+	echo >>$@.tmp 'LoadModule dav_svn_module modules/svn-$(WC)/mod_dav_svn.so'
+	echo >>$@.tmp 'LoadModule authz_svn_module modules/svn-$(WC)/mod_authz_svn.so'
+	echo >>$@.tmp 'DocumentRoot "$(PREFIX)/httpd/htdocs"'
+	echo >>$@.tmp '<Directory />'
+	echo >>$@.tmp '    Options FollowSymLinks'
+	echo >>$@.tmp '    AllowOverride None'
+	echo >>$@.tmp '    Order deny,allow'
+	echo >>$@.tmp '    Deny from all'
+	echo >>$@.tmp '</Directory>'
+	echo >>$@.tmp '<Location /repos>'
+	echo >>$@.tmp '    DAV svn'
+	echo >>$@.tmp '    SVNPath /tmp/svn-sandbox/repos'
+	echo >>$@.tmp '    Allow from localhost'
+	echo >>$@.tmp '</Location>'
+	mv -f $@.tmp $@
 
 #######################################################################
 # neon
@@ -807,6 +836,12 @@ ifeq ($(UNAME),OpenBSD)
 	done
 	chmod +x $(CYRUS_SASL_SRCDIR)/configure
 endif
+	# Fixes excessive auth log spam from sasl if broken .la files exist
+	sed 's/SASL_LOG_WARN/SASL_LOG_DEBUG/' \
+		< $(CYRUS_SASL_SRCDIR)/lib/dlopen.c \
+		> $(CYRUS_SASL_SRCDIR)/lib/dlopen.c.patched
+	mv $(CYRUS_SASL_SRCDIR)/lib/dlopen.c.patched \
+		$(CYRUS_SASL_SRCDIR)/lib/dlopen.c
 	touch $@
 
 # configure cyrus-sasl
@@ -880,6 +915,157 @@ $(LIBMAGIC_OBJDIR)/.installed: $(LIBMAGI
 	(cd $(LIBMAGIC_OBJDIR) && make install)
 	touch $@
 
+#######################################################################
+# ruby
+#######################################################################
+
+ruby-retrieve:	$(RUBY_OBJDIR)/.retrieved
+ruby-configure:	$(RUBY_OBJDIR)/.configured
+ruby-compile:	$(RUBY_OBJDIR)/.compiled
+ruby-install:	$(RUBY_OBJDIR)/.installed
+ruby-reset:
+	$(foreach f, .retrieved .configured .compiled .installed, \
+		rm -f $(RUBY_OBJDIR)/$(f);)
+
+ruby-clean:
+	-(cd $(RUBY_OBJDIR) && make distclean)
+
+# fetch distfile for ruby
+$(DISTDIR)/$(RUBY_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(RUBY_URL)
+
+# retrieve ruby
+#
+$(RUBY_OBJDIR)/.retrieved: $(DISTDIR)/$(RUBY_DIST)
+	[ -d $(RUBY_OBJDIR) ] || mkdir -p $(RUBY_OBJDIR)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(RUBY_DIST)
+	touch $@
+
+# configure ruby
+$(RUBY_OBJDIR)/.configured: $(RUBY_OBJDIR)/.retrieved
+	cd $(RUBY_OBJDIR) \
+		&& env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\
+		$(RUBY_SRCDIR)/configure \
+		--prefix=$(PREFIX)/ruby \
+		--enable-shared \
+		--disable-pthread
+	touch $@
+
+# compile ruby
+$(RUBY_OBJDIR)/.compiled: $(RUBY_OBJDIR)/.configured
+	(cd $(RUBY_OBJDIR) && make)
+	touch $@
+
+# install ruby
+$(RUBY_OBJDIR)/.installed: $(RUBY_OBJDIR)/.compiled
+	(cd $(RUBY_OBJDIR) && make install)
+	touch $@
+
+#######################################################################
+# bz2
+#######################################################################
+
+bz2-retrieve:	$(BZ2_OBJDIR)/.retrieved
+bz2-compile:	$(BZ2_OBJDIR)/.compiled
+bz2-install:	$(BZ2_OBJDIR)/.installed
+bz2-reset:
+	$(foreach f, .retrieved .configured .compiled .installed, \
+		rm -f $(BZ2_OBJDIR)/$(f);)
+
+bz2-clean:
+	-(cd $(BZ2_SRCDIR) && make distclean)
+
+# fetch distfile for bz2
+$(DISTDIR)/$(BZ2_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(BZ2_URL)
+
+# retrieve bz2
+$(BZ2_OBJDIR)/.retrieved: $(DISTDIR)/$(BZ2_DIST)
+	[ -d $(BZ2_OBJDIR) ] || mkdir -p $(BZ2_OBJDIR)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(BZ2_DIST)
+	touch $@
+
+# compile bz2
+$(BZ2_OBJDIR)/.compiled: $(BZ2_OBJDIR)/.retrieved
+	(cd $(BZ2_SRCDIR) && make CFLAGS="-g $(PROFILE_CFLAGS) -fPIC")
+	touch $@
+
+# install bz2
+$(BZ2_OBJDIR)/.installed: $(BZ2_OBJDIR)/.compiled
+	(cd $(BZ2_SRCDIR) && make install PREFIX=$(PREFIX)/bz2)
+	touch $@
+
+
+#######################################################################
+# python
+#######################################################################
+
+python-retrieve:	$(PYTHON_OBJDIR)/.retrieved
+python-configure:	$(PYTHON_OBJDIR)/.configured
+python-compile:	$(PYTHON_OBJDIR)/.compiled
+python-install:	$(PYTHON_OBJDIR)/.installed
+python-reset:
+	$(foreach f, .retrieved .configured .compiled .installed, \
+		rm -f $(PYTHON_OBJDIR)/$(f);)
+
+python-clean:
+	-(cd $(PYTHON_OBJDIR) && make distclean)
+
+# fetch distfile for python
+$(DISTDIR)/$(PYTHON_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(PYTHON_URL)
+
+# retrieve python
+#
+$(PYTHON_OBJDIR)/.retrieved: $(DISTDIR)/$(PYTHON_DIST)
+	[ -d $(PYTHON_OBJDIR) ] || mkdir -p $(PYTHON_OBJDIR)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(PYTHON_DIST)
+	# Make setup.py use our own dependencies instead of system ones
+	sed -e "s#sqlite_inc_paths = \[ '/usr/include',#sqlite_inc_paths = [ '$(PREFIX)/sqlite/include',#" \
+		-e "s#'/usr/include/db4'#'$(PREFIX)/bdb/include'#" \
+		-e "s|\(add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')\)|#\1|" \
+		-e "s|\(add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')\)|#\1|" \
+		-e "s#find_library_file(lib_dirs, 'bz2'#find_library_file(['$(PREFIX)/bz2/lib'] + lib_dirs, 'bz2'#" \
+		< $(PYTHON_SRCDIR)/setup.py \
+		> $(PYTHON_SRCDIR)/setup.py.patched
+	mv $(PYTHON_SRCDIR)/setup.py.patched $(PYTHON_SRCDIR)/setup.py
+	chmod +x $(PYTHON_SRCDIR)/setup.py
+	# Fixes shared library linking on OpenBSD
+	# http://bugs.python.org/issue12560
+	sed -e '4930s#NetBSD\*|#NetBSD*|OpenBSD*|#' \
+		< $(PYTHON_SRCDIR)/configure \
+		> $(PYTHON_SRCDIR)/configure.patched
+	mv $(PYTHON_SRCDIR)/configure.patched $(PYTHON_SRCDIR)/configure
+	chmod +x $(PYTHON_SRCDIR)/configure
+	touch $@
+
+# configure python
+ifdef PROFILE
+PYTHON_PROFILING=--enable-profiling
+endif
+$(PYTHON_OBJDIR)/.configured: $(PYTHON_OBJDIR)/.retrieved
+	cd $(PYTHON_OBJDIR) \
+		&& env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+		CPPFLAGS="-I$(PREFIX)/bz2/include" \
+		LDFLAGS="-Wl,-rpath=$(PREFIX)/python/lib -L$(PREFIX)/bz2/lib" \
+		$(PYTHON_SRCDIR)/configure \
+		--prefix=$(PREFIX)/python \
+		--enable-shared \
+		--with-system-expat \
+		--with-dbmliborder=bdb \
+		$(PYTHON_PROFILING)
+	touch $@
+
+# compile python
+$(PYTHON_OBJDIR)/.compiled: $(PYTHON_OBJDIR)/.configured
+	(cd $(PYTHON_OBJDIR) && make)
+	touch $@
+
+# install python
+$(PYTHON_OBJDIR)/.installed: $(PYTHON_OBJDIR)/.compiled
+	(cd $(PYTHON_OBJDIR) && make install)
+	touch $@
+
 
 #######################################################################
 # svn
@@ -1002,8 +1188,9 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
 	cd $(SVN_SRCDIR) && ./autogen.sh
 	cd $(svn_builddir) && \
 		env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib" \
-			LD_LIBRARY_PATH="$(PREFIX)/bdb/lib:$(PREFIX)/iconv/lib:$$LD_LIBRARY_PATH" \
+			LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
 			GREP="`which grep`" \
+			PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$$PATH \
 			$(SVN_SRCDIR)/configure \
 			--enable-maintainer-mode \
 			--with-ssl \
@@ -1037,17 +1224,16 @@ $(SVN_OBJDIR)/.installed: $(SVN_OBJDIR)/
 	touch $@
 
 $(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed
-	if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
-		cd $(svn_builddir) \
-			&& make swig-py; \
-	fi
-	if [ $(ENABLE_RUBY_BINDINGS) = yes ]; then \
-		cd $(svn_builddir) \
-			&& make swig-rb; \
-	fi
+	cd $(svn_builddir) \
+		&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+			make swig-py
+	cd $(svn_builddir) && \
+		env PATH=$(PREFIX)/ruby/bin:$$PATH \
+		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) make swig-rb
 	if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
-			&& make swig-pl; \
+			&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+				make swig-pl; \
 	fi
 	if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
@@ -1056,14 +1242,12 @@ $(SVN_OBJDIR)/.bindings-compiled: $(SVN_
 	touch $@
 
 $(SVN_OBJDIR)/.bindings-installed: $(SVN_OBJDIR)/.bindings-compiled
-	if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
-		cd $(svn_builddir) \
-		  && make install-swig-py; \
-	fi
-	if [ $(ENABLE_RUBY_BINDINGS) = yes ]; then \
-		cd $(svn_builddir) \
-			&& make install-swig-rb; \
-	fi
+	cd $(svn_builddir) \
+	  && env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+		make install-swig-py
+	cd $(svn_builddir) && \
+		env PATH=$(PREFIX)/ruby/bin:$$PATH \
+		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) make install-swig-rb
 	if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
 	    && make install-swig-pl-lib; \
@@ -1081,69 +1265,72 @@ $(SVN_OBJDIR)/.bindings-installed: $(SVN
 HTTPD_CHECK_CONF=$(PREFIX)/httpd/conf/httpd-svn-check-$(WC).conf
 HTTPD_CHECK_USERS=$(PREFIX)/httpd/conf/httpd-svn-check-users
 HTTPD_CHECK_PORT=8081
-httpd-conf:
-	echo "jrandom:xCGl35kV9oWCY" > $(HTTPD_CHECK_USERS)
-	echo "jconstant:xCGl35kV9oWCY" >> $(HTTPD_CHECK_USERS)
-	echo "# httpd config for make check" > $(HTTPD_CHECK_CONF)
-	echo "ServerRoot \"$(PREFIX)/httpd\"" >> $(HTTPD_CHECK_CONF)
-	echo "Listen localhost:$(HTTPD_CHECK_PORT)" >> $(HTTPD_CHECK_CONF)
-	echo "LoadModule dav_svn_module $(MOD_DAV_SVN)" >> $(HTTPD_CHECK_CONF)
-	echo "LoadModule authz_svn_module $(MOD_AUTHZ_SVN)" >> $(HTTPD_CHECK_CONF)
-	echo "DocumentRoot "$(PREFIX)/httpd/htdocs"" >> $(HTTPD_CHECK_CONF)
-	echo "# These two Locations are used for 'make check'" >> $(HTTPD_CHECK_CONF)
-	echo "<Directory />" >> $(HTTPD_CHECK_CONF)
-	echo "    Options FollowSymLinks" >> $(HTTPD_CHECK_CONF)
-	echo "    AllowOverride None" >> $(HTTPD_CHECK_CONF)
-	echo "    Order deny,allow" >> $(HTTPD_CHECK_CONF)
-	echo "    Allow from all" >> $(HTTPD_CHECK_CONF)
-	echo "</Directory>" >> $(HTTPD_CHECK_CONF)
-	echo "<Location /svn-test-work/repositories>" >> $(HTTPD_CHECK_CONF)
-	echo "    DAV svn" >> $(HTTPD_CHECK_CONF)
-	echo "    SVNParentPath $(SVN_WC)/subversion/tests/cmdline/svn-test-work/repositories" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthType Basic" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthName \"Subversion Repository\"" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthUserFile $(HTTPD_CHECK_USERS)" >> $(HTTPD_CHECK_CONF)
-	echo "    Require valid-user" >> $(HTTPD_CHECK_CONF)
+
+$(HTTPD_CHECK_USERS):
+	mkdir -p $(dir $@)
+	echo > $@.tmp 'jrandom:xCGl35kV9oWCY'
+	echo >>$@.tmp 'jconstant:xCGl35kV9oWCY'
+	mv -f $@.tmp $@
+
+$(HTTPD_CHECK_CONF): $(HTTPD_CHECK_USERS)
+	echo > $@.tmp '# httpd config for make check'
+	echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"'
+	echo >>$@.tmp 'Listen localhost:$(HTTPD_CHECK_PORT)'
+	echo >>$@.tmp 'LoadModule dav_svn_module $(MOD_DAV_SVN)'
+	echo >>$@.tmp 'LoadModule authz_svn_module $(MOD_AUTHZ_SVN)'
+	echo >>$@.tmp 'DocumentRoot "$(PREFIX)/httpd/htdocs"'
+	echo >>$@.tmp '# These two Locations are used for "make check"'
+	echo >>$@.tmp '<Directory />'
+	echo >>$@.tmp '    Options FollowSymLinks'
+	echo >>$@.tmp '    AllowOverride None'
+	echo >>$@.tmp '    Order deny,allow'
+	echo >>$@.tmp '    Allow from all'
+	echo >>$@.tmp '</Directory>'
+	echo >>$@.tmp '<Location /svn-test-work/repositories>'
+	echo >>$@.tmp '    DAV svn'
+	echo >>$@.tmp '    SVNParentPath $(SVN_WC)/subversion/tests/cmdline/svn-test-work/repositories'
+	echo >>$@.tmp '    AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+	echo >>$@.tmp '    AuthType Basic'
+	echo >>$@.tmp '    AuthName "Subversion Repository"'
+	echo >>$@.tmp '    AuthUserFile $(HTTPD_CHECK_USERS)'
+	echo >>$@.tmp '    Require valid-user'
 ifeq ($(USE_HTTPV1),yes)
-	echo "    SVNAdvertiseV2Protocol off" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '    SVNAdvertiseV2Protocol off'
 endif
 ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
-	echo "    SVNPathAuthz short_circuit" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '    SVNPathAuthz short_circuit'
 endif
-	echo "</Location>" >> $(HTTPD_CHECK_CONF)
-	echo "<Location /svn-test-work/local_tmp/repos>" >> $(HTTPD_CHECK_CONF)
-	echo "    DAV svn" >> $(HTTPD_CHECK_CONF)
-	echo "    SVNPath $(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp/repos" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthType Basic" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthName \"Subversion Repository\"" >> $(HTTPD_CHECK_CONF)
-	echo "    AuthUserFile $(HTTPD_CHECK_USERS)" >> $(HTTPD_CHECK_CONF)
-	echo "    Require valid-user" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '</Location>'
+	echo >>$@.tmp '<Location /svn-test-work/local_tmp/repos>'
+	echo >>$@.tmp '    DAV svn'
+	echo >>$@.tmp '    SVNPath $(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp/repos'
+	echo >>$@.tmp '    AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+	echo >>$@.tmp '    AuthType Basic'
+	echo >>$@.tmp '    AuthName "Subversion Repository"'
+	echo >>$@.tmp '    AuthUserFile $(HTTPD_CHECK_USERS)'
+	echo >>$@.tmp '    Require valid-user'
 ifeq ($(USE_HTTPV1),yes)
-	echo "    SVNAdvertiseV2Protocol off" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '    SVNAdvertiseV2Protocol off'
 endif
 ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
-	echo "    SVNPathAuthz short_circuit" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '    SVNPathAuthz short_circuit'
 endif
-	echo "</Location>" >> $(HTTPD_CHECK_CONF)
-	echo "# This Location lets you access repositories dropped in /tmp/" >> $(HTTPD_CHECK_CONF)
-	echo "<Location /svn>" >> $(HTTPD_CHECK_CONF)
-	echo "    DAV svn" >> $(HTTPD_CHECK_CONF)
-	echo "    SVNParentPath /tmp" >> $(HTTPD_CHECK_CONF)
-	echo "    Allow from all" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '</Location>'
+	echo >>$@.tmp '# This Location lets you access repositories dropped in /tmp/'
+	echo >>$@.tmp '<Location /svn>'
+	echo >>$@.tmp '    DAV svn'
+	echo >>$@.tmp '    SVNParentPath /tmp'
+	echo >>$@.tmp '    Allow from all'
 ifeq ($(USE_HTTPV1),yes)
-	echo "    SVNAdvertiseV2Protocol off" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '    SVNAdvertiseV2Protocol off'
 endif
 ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
-	echo "    SVNPathAuthz short_circuit" >> $(HTTPD_CHECK_CONF)
+	echo >>$@.tmp '    SVNPathAuthz short_circuit'
 endif
-	echo "</Location>" >> $(HTTPD_CHECK_CONF)
-	echo 'RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ /svn-test-work/repositories/$$1' >> $(HTTPD_CHECK_CONF)
-	echo 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ /svn-test-work/repositories/$$1' >> $(HTTPD_CHECK_CONF)
-
-# We need this to make sure some targets below pick up the right libraries
-LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/svn-$(WC)/lib
+	echo >>$@.tmp '</Location>'
+	echo >>$@.tmp 'RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ /svn-test-work/repositories/$$1'
+	echo >>$@.tmp 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ /svn-test-work/repositories/$$1'
+	mv -f $@.tmp $@
 
 .PHONY: libpath
 libpath:
@@ -1152,27 +1339,30 @@ libpath:
 .PHONY: start-svnserve stop-svnserve start-httpd stop-httpd
 
 HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
-			$(PREFIX)/httpd/bin/apachectl \
-			-f conf/httpd-svn-check-$(WC).conf
+		$(PREFIX)/httpd/bin/apachectl -f $(HTTPD_CHECK_CONF)
 HTTPD_START_CMD = $(HTTPD_CMD) -k start
 HTTPD_START_CMD_DEBUG = $(HTTPD_START_CMD) -X
 HTTPD_STOP_CMD = $(HTTPD_CMD) -k stop; sleep 3
 
-SVNSERVE_START_CMD = $(SVN_PREFIX)/bin/svnserve \
+SVNSERVE_START_CMD = (ls $(PWD)/svnserve-*.pid | while read pidfile; do \
+				kill `cat "$$pidfile"`; sleep 3; \
+				rm -f $$pidfile; \
+			done); \
+			$(SVN_PREFIX)/bin/svnserve \
 			--listen-host 127.0.0.1 \
 			--pid-file $(PWD)/svnserve-$(WC).pid \
 			-d -r $(svn_builddir)/subversion/tests/cmdline
 SVNSERVE_STOP_CMD = kill `cat $(PWD)/svnserve-$(WC).pid`; sleep 3; \
 			rm -f $(PWD)/svnserve-$(WC).pid
 
-start-httpd: httpd-conf
+start-httpd: $(HTTPD_CHECK_CONF)
 	$(HTTPD_START_CMD)
 	@echo "To run tests over http, run:"
 	@echo "    make check BASE_URL=http://localhost:$(HTTPD_CHECK_PORT)"
 	@echo "The URL http://localhost:$(HTTPD_CHECK_PORT)/svn/"
 	@echo "lets you access repositories dropped into /tmp"
 
-start-httpd-debug: httpd-conf
+start-httpd-debug: $(HTTPD_CHECK_CONF)
 	$(HTTPD_START_CMD_DEBUG) &
 	@echo "To run tests over http, run:"
 	@echo "    make check BASE_URL=http://localhost:$(HTTPD_CHECK_PORT)"
@@ -1186,10 +1376,6 @@ stop-httpd:
 	$(HTTPD_STOP_CMD)
 
 start-svnserve: $(SVN_OBJDIR)/.compiled
-	-ls $(PWD)/svnserve-*.pid | while read pidfile; do \
-		kill `cat "$$pidfile"`; sleep 3; \
-		rm -f $$pidfile; \
-	done
 	$(SVNSERVE_START_CMD)
 
 stop-svnserve:
@@ -1199,7 +1385,8 @@ define do_check
 -cd $(svn_builddir) && for fs in fsfs bdb; do \
     echo "Begin test: $(subst svn-check-,,$@) x $$fs"; \
     test -d "$(RAMDISK)/tmp" && export TMPDIR="$(RAMDISK)/tmp"; \
-    make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) $1 FS_TYPE=$$fs; \
+    env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+        make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) $1 FS_TYPE=$$fs; \
     for log in tests.log fails.log; do \
         test -f $$log && mv -f $$log $$log.$@-$$fs; \
     done; \
@@ -1217,12 +1404,12 @@ svn-check-prepare-ramdisk:
 			mkdir -p "$(RAMDISK)/tmp"; \
 	fi
 
-svn-check-neon: httpd-conf $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled svn-check-prepare-ramdisk
+svn-check-neon: $(HTTPD_CHECK_CONF) $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled svn-check-prepare-ramdisk
 	$(HTTPD_START_CMD)
 	$(call do_check,BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=neon)
 	$(HTTPD_STOP_CMD)
 
-svn-check-serf: httpd-conf $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled svn-check-prepare-ramdisk
+svn-check-serf: $(HTTPD_CHECK_CONF) $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled svn-check-prepare-ramdisk
 	$(HTTPD_START_CMD)
 	$(call do_check,BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=serf)
 	$(HTTPD_STOP_CMD)
@@ -1253,24 +1440,21 @@ svn-check-swig-pl:
 	fi
 
 svn-check-swig-py:
-	-if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
-		(cd $(svn_builddir) && \
-			env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
-			make check-swig-py 2>&1) | \
-				tee $(svn_builddir)/tests.log.bindings.py; \
-	fi
+	-(cd $(svn_builddir) && \
+		env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+		make check-swig-py 2>&1) | \
+			tee $(svn_builddir)/tests.log.bindings.py
 
 # We add the svn prefix to PATH here because the ruby tests
 # attempt to start an svnserve binary found in PATH.
 svn-check-swig-rb:
-	-if [ $(ENABLE_RUBY_BINDINGS) = yes ]; then \
-		(cd $(svn_builddir)/subversion/bindings/swig/ruby/test && \
-			env RUBYLIB=$(RUBYLIB) \
-			LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
-			PATH=$(SVN_PREFIX)/bin:$$PATH \
-			ruby run-test.rb --verbose=normal 2>&1) | \
-				tee $(svn_builddir)/tests.log.bindings.rb; \
-	fi
+	(cd $(svn_builddir)/subversion/bindings/swig/ruby/test && \
+		env RUBYLIB=$(RUBYLIB) \
+		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+		PATH=$(SVN_PREFIX)/bin:$$PATH \
+		$(PREFIX)/ruby/bin/ruby run-test.rb \
+			--verbose=verbose 2>&1) | \
+			tee $(svn_builddir)/tests.log.bindings.rb
 
 svn-check-javahl:
 	-if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
@@ -1313,9 +1497,9 @@ endif
 	@echo "sqlite:     $(SQLITE_VER)"
 	@echo "openssl:    `openssl version | cut -d' ' -f2`"
 	@echo "swig:       `swig -version | grep Version | cut -d' ' -f3`"
-	@echo "python:     `python --version 2>&1 | cut -d' ' -f2`"
+	@echo "python:     $(PYTHON_VER)"
 	@echo "perl:       `eval \`perl -V:version\`; echo $$version`"
-	@echo "ruby:       `ruby --version | cut -d' ' -f2`"
+	@echo "ruby:       $(RUBY_VER)"
 ifeq ($(ENABLE_JAVA_BINDINGS),yes)
 	@echo "java:       `java -version 2>&1 | grep version | cut -d' ' -f3  | sed -e 's/\"//g'`"
 endif

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/wc-format.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/wc-ng/bump-to-19.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/wc-ng/count-progress.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/wc-ng/graph-data.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/wc-ng/populate-pristine.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/gpg-agent-password-store/tools/dev/which-error.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/dev/which-error.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/dev/which-error.py (original)
+++ subversion/branches/gpg-agent-password-store/tools/dev/which-error.py Tue Jul 19 23:05:44 2011
@@ -113,6 +113,7 @@ if __name__ == "__main__":
   else:
     for code in sys.argv[1:]:
       try:
+        code = code.lstrip('EW')
         codes.append(int(code))
       except ValueError:
         usage_and_exit()

Modified: subversion/branches/gpg-agent-password-store/tools/dev/windows-build/document-version.pl
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/dev/windows-build/document-version.pl?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/dev/windows-build/document-version.pl (original)
+++ subversion/branches/gpg-agent-password-store/tools/dev/windows-build/document-version.pl Tue Jul 19 23:05:44 2011
@@ -1,48 +1,48 @@
-#!/usr/local/bin/perl -w
-
-# 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.
-
-use strict;
-
-use Tie::File;
-#use Cwd 'getcwd';
-
-die "Bad args '@ARGV'" unless (@ARGV >= 3  && @ARGV <= 4);
-
-my ($filename, $TARGETDIR, $SVNDIR, $BUILDDESCR) = (@ARGV, "");
-
-my (@file, $version, $lines);
-
-tie (@file, 'Tie::File', $filename)
-	or die $!;
-
-$version  =  `svnversion -n` or die;
-$version  =~ tr/M//d;
-$version .=  '-' . $BUILDDESCR if $BUILDDESCR;
-
-/^#define SVN_VER_TAG/ and s/(?<=dev build).*(?=\)"$)/-r$version/
-	for @file;
-/^#define SVN_VER_NUMTAG/ and s/(?<=-dev).*(?="$)/-r$version/
-	for @file;
-
-mkdir $TARGETDIR unless -d $TARGETDIR;
-
-chdir $SVNDIR;
-system "svn diff -x-p > $TARGETDIR\\$version.diff"
-	and die $!;
-
+#!/usr/local/bin/perl -w
+
+# 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.
+
+use strict;
+
+use Tie::File;
+#use Cwd 'getcwd';
+
+die "Bad args '@ARGV'" unless (@ARGV >= 3  && @ARGV <= 4);
+
+my ($filename, $TARGETDIR, $SVNDIR, $BUILDDESCR) = (@ARGV, "");
+
+my (@file, $version, $lines);
+
+tie (@file, 'Tie::File', $filename)
+	or die $!;
+
+$version  =  `svnversion -n` or die;
+$version  =~ tr/M//d;
+$version .=  '-' . $BUILDDESCR if $BUILDDESCR;
+
+/^#define SVN_VER_TAG/ and s/(?<=dev build).*(?=\)"$)/-r$version/
+	for @file;
+/^#define SVN_VER_NUMTAG/ and s/(?<=-dev).*(?="$)/-r$version/
+	for @file;
+
+mkdir $TARGETDIR unless -d $TARGETDIR;
+
+chdir $SVNDIR;
+system "svn diff -x-p > $TARGETDIR\\$version.diff"
+	and die $!;
+

Propchange: subversion/branches/gpg-agent-password-store/tools/dev/windows-build/document-version.pl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/gpg-agent-password-store/tools/dist/backport.pl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/gpg-agent-password-store/tools/dist/collect_sigs.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/dist/collect_sigs.py?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/dist/collect_sigs.py (original)
+++ subversion/branches/gpg-agent-password-store/tools/dist/collect_sigs.py Tue Jul 19 23:05:44 2011
@@ -78,7 +78,7 @@ def generate_asc_files(target_dir='.'):
   curs.execute('SELECT filename, signature FROM signatures;')
   for filename, signature in curs:
     fd = _open(filename)
-    fd.write(signature + "\n")
+    fd.write(signature)
 
   for fd in fds.values():
     fd.flush()
@@ -181,8 +181,11 @@ def list_signatures():
 
   lines = ""
   curs = db.cursor()
+  like_filename = 'subversion-%s%%' % config.version
   curs.execute('''SELECT filename, COUNT(*) FROM signatures
-                  GROUP BY filename ORDER BY filename''')
+                  WHERE filename LIKE ?
+                  GROUP BY filename ORDER BY filename''',
+               (like_filename, ) )
   for filename, count in curs:
     lines += '<a href="%s/%s.asc">%s.asc</a>: %d signature%s<br/>\n' \
              % (os.getenv('SCRIPT_NAME'), filename, filename,
@@ -196,6 +199,24 @@ def save_valid_sig(db, filename, keyid, 
 
   generate_asc_files(config.sigdir)
 
+  # Attempt to copy the results to a remote location
+  try:
+    import paramiko
+
+    client = paramiko.SSHClient()
+    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+    client.connect(config.ssh['host'], username = config.ssh['user'],
+                   key_filename = config.ssh['key'])
+    sftp = client.open_sftp()
+
+    sftp.put(os.path.join(config.sigdir, filename + '.asc'),
+             os.path.join(config.ssh['dir'], config.version, 'deploy',
+                          filename + '.asc'))
+    client.close()
+  except:
+    # Ignore any errors
+    pass
+
 def verify_sig_for_file(signature, filename):
   args = ['gpg', '--logger-fd', '1', '--no-tty',
           '--status-fd', '2', '--verify', '-',