svn commit: r1150709 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/auth.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:10:54 2011
New Revision: 1150709

URL: http://svn.apache.org/viewvc?rev=1150709&view=rev
Log:
On the gpg-agent-password-store branch, fix a typo in a comment.

* subversion/libsvn_subr/auth.c
  (svn_auth_get_platform_specific_client_providers): Typo in comment.

Modified:
subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/auth.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/auth.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/auth.c?rev=1150709&r1=1150708&r2=1150709&view=diff
==
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/auth.c 
(original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/auth.c 
Mon Jul 25 14:10:54 2011
@@ -543,7 +543,7 @@ svn_auth_get_platform_specific_client_pr
   continue;
 }
 
-  /* GPG-AGENT Keyring */
+  /* GPG-AGENT */
   if (apr_strnatcmp(password_store, "gpg-agent") == 0)
 {
   SVN_ERR(svn_auth_get_platform_specific_provider(&provider,




svn commit: r1150711 - /subversion/site/publish/packages.html

2011-07-25 Thread ivan
Author: ivan
Date: Mon Jul 25 14:11:04 2011
New Revision: 1150711

URL: http://svn.apache.org/viewvc?rev=1150711&view=rev
Log:
* publish/packages.html: Link VisualSVN Server pre-release binaries.

Modified:
subversion/site/publish/packages.html

Modified: subversion/site/publish/packages.html
URL: 
http://svn.apache.org/viewvc/subversion/site/publish/packages.html?rev=1150711&r1=1150710&r2=1150711&view=diff
==
--- subversion/site/publish/packages.html (original)
+++ subversion/site/publish/packages.html Mon Jul 25 14:11:04 2011
@@ -450,6 +450,10 @@ $ make install clean
   
href="https://ctf.open.collab.net/sf/frs/do/viewRelease/projects.csvn/frs.svn_binaries.windows";
   >here (please pick the latest version).
 
+http://www.visualsvn.com";>VisualSVN provides pre-release
+  VisualSVN Server builds (Windows only)
+  http://www.visualsvn.com/server/download/pre-release/";>here.
+
 http://www.wandisco.com/";>WANdisco provides pre-release
 binaries for Redhat and Centos Linux
 http://www.wandisco.com/subversion/download/1_7-alpha";>here.




svn commit: r1150713 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:13:42 2011
New Revision: 1150713

URL: http://svn.apache.org/viewvc?rev=1150713&view=rev
Log:
On the gpg-agent-password-store branch:

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Mark a couple of local variables 'const'.

Modified:

subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150713&r1=1150712&r2=1150713&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 Mon Jul 25 14:13:42 2011
@@ -60,7 +60,7 @@ password_get_gpg_agent(const char **pass
 {
   int sd;
   char *gpg_agent_info = NULL;
-  char *p = NULL;
+  const char *p = NULL;
   char *ep = NULL;
   char *buffer;
   
@@ -69,8 +69,8 @@ password_get_gpg_agent(const char **pass
   const char *cache_id = NULL;
   struct sockaddr_un addr;
   int recvd;
-  char *tty_name;
-  char *tty_type;
+  const char *tty_name;
+  const char *tty_type;
   const char *socket_name = NULL;
   svn_checksum_t *digest = NULL;
 




svn commit: r1150716 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:24:53 2011
New Revision: 1150716

URL: http://svn.apache.org/viewvc?rev=1150716&view=rev
Log:
On the gpg-agent-password-store branch, ensure that messages are always
read in their entirety from the agent's socket.

The GPG-Agent protocol terminates messages with newlines.
Simple calls to recv() would sometimes fail to read the terminating newline,
possibly due to concurrency issues where svn was reading from the socket
while gpg-agent was still writing. So read single bytes from the socket
and watch out for a terminating newline.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (receive_from_gpg_agent): New helper function. Attempts to read a
   complete newline-terminated message from the agent's socket.
   Also makes sure the result is NUL-terminated so caller's don't have to.
  (password_get_gpg_agent): Use receive_from_gpg_agent() instead of recv().

Modified:

subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150716&r1=1150715&r2=1150716&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 Mon Jul 25 14:24:53 2011
@@ -47,6 +47,37 @@
 
 #define BUFFER_SIZE 1024
 
+/* Attempt to read a gpg-agent response message from the socket SD into
+ * buffer BUF. Buf is assumed to be N bytes large. Return TRUE if a response
+ * message could be read that fits into the buffer. Else return FALSE.
+ * If a message could be read it will always be NUL-terminated and the
+ * trailing newline is retained. */
+static svn_boolean_t
+receive_from_gpg_agent(int sd, char *buf, size_t n)
+{
+  int i = 0;
+  int recvd;
+  char c;
+
+  /* Require the message to fit into the buffer and be terminated
+   * with a newline. */
+  while (i < n)
+{
+  recvd = read(sd, &c, 1);
+  if (recvd == -1)
+return FALSE;
+  buf[i] = c;
+  i++;
+  if (i < n && c == '\n')
+{
+  buf[i] = '\0';
+  return TRUE;
+}
+}
+
+return FALSE;
+}
+
 /* Implementation of svn_auth__password_get_t that retrieves the password
from gpg-agent */
 static svn_boolean_t
@@ -68,7 +99,6 @@ password_get_gpg_agent(const char **pass
   char *request = NULL;
   const char *cache_id = NULL;
   struct sockaddr_un addr;
-  int recvd;
   const char *tty_name;
   const char *tty_type;
   const char *socket_name = NULL;
@@ -105,8 +135,11 @@ password_get_gpg_agent(const char **pass
 
   /* Receive the connection status from the gpg-agent daemon. */
   buffer = apr_palloc(pool, BUFFER_SIZE);
-  recvd = recv(sd, buffer, BUFFER_SIZE - 1, 0);
-  buffer[recvd] = '\0';
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+{
+  close(sd);
+  return FALSE;
+}
 
   if (strncmp(buffer, "OK", 2) != 0)
 return FALSE;
@@ -117,8 +150,11 @@ password_get_gpg_agent(const char **pass
 {
   request = apr_psprintf(pool, "OPTION ttyname=%s\n", tty_name);
   send(sd, request, strlen(request), 0);
-  recvd = recv(sd, buffer, BUFFER_SIZE - 1, 0);
-  buffer[recvd] = '\0';
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+{
+  close(sd);
+  return FALSE;
+}
 
   if (strncmp(buffer, "OK", 2) != 0)
 return FALSE;
@@ -132,8 +168,11 @@ password_get_gpg_agent(const char **pass
 {
   request = apr_psprintf(pool, "OPTION ttytype=%s\n", tty_type);
   send(sd, request, strlen(request), 0);
-  recvd = recv(sd, buffer, BUFFER_SIZE - 1, 0);
-  buffer[recvd] = '\0';
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+{
+  close(sd);
+  return FALSE;
+}
 
   if (strncmp(buffer, "OK", 2) != 0)
 return FALSE;
@@ -158,8 +197,11 @@ password_get_gpg_agent(const char **pass
cache_id);
 
   send(sd, request, strlen(request) + 1, 0);
-  recvd = recv(sd, buffer, BUFFER_SIZE - 1, 0);
-  buffer[recvd] = '\0';
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+{
+  close(sd);
+  return FALSE;
+}
 
   if (strncmp(buffer, "ERR", 3) == 0)
 return FALSE;




svn commit: r1150720 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:28:55 2011
New Revision: 1150720

URL: http://svn.apache.org/viewvc?rev=1150720&view=rev
Log:
On the gpg-agent-password-store branch, ensure that the gpg-agent socket
is always closed.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Close the socket SD in all error paths.

Modified:

subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150720&r1=1150719&r2=1150720&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 Mon Jul 25 14:28:55 2011
@@ -142,7 +142,10 @@ password_get_gpg_agent(const char **pass
 }
 
   if (strncmp(buffer, "OK", 2) != 0)
-return FALSE;
+{
+  close(sd);
+  return FALSE;
+}
 
   /* Send TTY_NAME to the gpg-agent daemon. */
   tty_name = getenv("GPG_TTY");
@@ -157,10 +160,16 @@ password_get_gpg_agent(const char **pass
 }
 
   if (strncmp(buffer, "OK", 2) != 0)
-return FALSE;
+{
+  close(sd);
+  return FALSE;
+}
 }
   else
-return FALSE;
+{
+  close(sd);
+  return FALSE;
+}
 
   /* Send TTY_TYPE to the gpg-agent daemon. */
   tty_type = getenv("TERM");
@@ -175,10 +184,16 @@ password_get_gpg_agent(const char **pass
 }
 
   if (strncmp(buffer, "OK", 2) != 0)
-return FALSE;
+{
+  close(sd);
+  return FALSE;
+}
 }
   else
-return FALSE;
+{
+  close(sd);
+  return FALSE;
+}
 
   /* Create the CACHE_ID which will be generated based on REALMSTRING similar
  to other password caching mechanisms. */
@@ -203,6 +218,8 @@ password_get_gpg_agent(const char **pass
   return FALSE;
 }
 
+  close(sd);
+
   if (strncmp(buffer, "ERR", 3) == 0)
 return FALSE;
   
@@ -215,7 +232,6 @@ password_get_gpg_agent(const char **pass
 
   *password = p;
 
-  close(sd);
   return TRUE;
 }
 




svn commit: r1150723 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:33:32 2011
New Revision: 1150723

URL: http://svn.apache.org/viewvc?rev=1150723&view=rev
Log:
On the gpg-agent-password-store branch, send the values of the LC_CTYPE
and DISPLAY variables to gpg-agent. These might be useful for the pinentry
program.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): If LC_CTYPE and/or DISPLAY environment variables
   are set, use their values as arguments for the --lc-ctype and --display
   options of gpg-agent.

Modified:

subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150723&r1=1150722&r2=1150723&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 Mon Jul 25 14:33:32 2011
@@ -101,6 +101,8 @@ password_get_gpg_agent(const char **pass
   struct sockaddr_un addr;
   const char *tty_name;
   const char *tty_type;
+  const char *lc_ctype;
+  const char *display;
   const char *socket_name = NULL;
   svn_checksum_t *digest = NULL;
 
@@ -195,6 +197,46 @@ password_get_gpg_agent(const char **pass
   return FALSE;
 }
 
+  /* Send LC_CTYPE to the gpg-agent daemon. */
+  lc_ctype = getenv("LC_CTYPE");
+  if (lc_ctype == NULL)
+lc_ctype = getenv("LC_ALL");
+  if (lc_ctype == NULL)
+lc_ctype = getenv("LANG");
+  if (lc_ctype != NULL)
+{
+  request = apr_psprintf(pool, "OPTION lc-ctype=%s\n", lc_ctype);
+  send(sd, request, strlen(request), 0);
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+{
+  close(sd);
+  return FALSE;
+}
+  if (strncmp(buffer, "OK", 2) != 0)
+{
+  close(sd);
+  return FALSE;
+}
+}
+
+  /* Send DISPLAY to the gpg-agent daemon. */
+  display = getenv("DISPLAY");
+  if (display != NULL)
+{
+  request = apr_psprintf(pool, "OPTION display=%s\n", display);
+  send(sd, request, strlen(request), 0);
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+{
+  close(sd);
+  return FALSE;
+}
+  if (strncmp(buffer, "OK", 2) != 0)
+{
+  close(sd);
+  return FALSE;
+}
+}
+
   /* Create the CACHE_ID which will be generated based on REALMSTRING similar
  to other password caching mechanisms. */
   digest = svn_checksum_create(svn_checksum_md5, pool);




svn commit: r1150728 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:45:59 2011
New Revision: 1150728

URL: http://svn.apache.org/viewvc?rev=1150728&view=rev
Log:
On the gpg-agent-password-store branch, improve the pinentry program's prompt.

Put the name of the authentication realm into the prompt.
Change the password prompt to match the prompt of the standard
command line client and allow it to be internationalised.

Also make the pinentry program ask for the password twice.
It is not easy for users to get rid of an invalid password once it is
in the agent's cache (the easiest way is probably to kill the agent).
Asking for the password twice makes such mistakes less likely.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (escape_blanks): New helper functions to escape blanks in GPG-Agent
   protocol messages.
  (password_get_gpg_agent): Pass the auth realm as description to the
   GET_PASSPHRASE command. Use a better password prompt that matches
   the 'svn' client prompt. Pass the --repeat=1 option to GET_PASSPHRASE.
   Escape all arguments that might contain blanks with escape_blanks().

Modified:

subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150728&r1=1150727&r2=1150728&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 Mon Jul 25 14:45:59 2011
@@ -47,6 +47,23 @@
 
 #define BUFFER_SIZE 1024
 
+/* Modify STR in-place such that blanks are escaped as required by the
+ * gpg-agent protocol. Return a pointer to STR. */
+static char *
+escape_blanks(char *str)
+{
+  char *s = str;
+
+  while (*s)
+{
+  if (*s == ' ')
+*s = '+';
+  s++;
+}
+
+  return str;
+}
+
 /* Attempt to read a gpg-agent response message from the socket SD into
  * buffer BUF. Buf is assumed to be N bytes large. Return TRUE if a response
  * message could be read that fits into the buffer. Else return FALSE.
@@ -105,6 +122,8 @@ password_get_gpg_agent(const char **pass
   const char *display;
   const char *socket_name = NULL;
   svn_checksum_t *digest = NULL;
+  char *password_prompt;
+  char *realm_prompt;
 
   gpg_agent_info = getenv("GPG_AGENT_INFO");
   if (gpg_agent_info != NULL)
@@ -244,14 +263,21 @@ password_get_gpg_agent(const char **pass
pool);
   cache_id = svn_checksum_to_cstring(digest, pool);
 
-  if (non_interactive)
-request = apr_psprintf(pool,
-   "GET_PASSPHRASE --data --no-ask %s X Password: \n",
-   cache_id);
-  else
-request = apr_psprintf(pool,
-   "GET_PASSPHRASE --data %s X Password: \n",
-   cache_id);
+  /* A newline is required to terminate the GET_PASSPHRASE command.
+   * We append it to REALM_PROMPT because it is the last argument of
+   * the format string below, and because both of the prompt strings
+   * already exist elsewhere in this exact form so they will only
+   * have to be translated once for i18n. */
+  password_prompt = apr_psprintf(pool, _("Password for '%s': "), username);
+  realm_prompt = apr_psprintf(pool, _("Authentication realm: %s\n"),
+  realmstring);
+  request = apr_psprintf(pool,
+ "GET_PASSPHRASE --data %s--repeat=1 "
+ "%s X %s %s",
+ non_interactive ? "--no-ask " : "",
+ cache_id,
+ escape_blanks(password_prompt),
+ escape_blanks(realm_prompt));
 
   send(sd, request, strlen(request) + 1, 0);
   if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))




svn commit: r1150729 - /subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 14:47:34 2011
New Revision: 1150729

URL: http://svn.apache.org/viewvc?rev=1150729&view=rev
Log:
On the gpg-agent-password-store branch, avoid a potential NULL-derefernce.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Do not crash if the agent returns an empty
   string as password.

Modified:

subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150729&r1=1150728&r2=1150729&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/gpg_agent.c
 Mon Jul 25 14:47:34 2011
@@ -294,6 +294,9 @@ password_get_gpg_agent(const char **pass
   if (strncmp(buffer, "D", 1) == 0)
 p = &buffer[2];
 
+  if (!p)
+return FALSE;
+
   ep = strchr(p, '\n');
   if (ep != NULL)
 *ep = '\0';




svn commit: r1150751 [3/5] - in /subversion/branches/gpg-agent-password-store: ./ build/ac-macros/ build/generator/swig/ notes/ subversion/bindings/swig/perl/native/t/ subversion/include/ subversion/i

2011-07-25 Thread stsp
Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c?rev=1150751&r1=1150750&r2=1150751&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c 
(original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c 
Mon Jul 25 15:34:28 2011
@@ -1112,21 +1112,12 @@ svn_wc__internal_transmit_text_deltas(co
 NULL, NULL,
 scratch_pool, scratch_pool);
 
-  /* Close the two streams to force writing the digest,
- if we already have an error, ignore this one. */
-  if (err)
-{
-  svn_error_clear(svn_stream_close(base_stream));
-  svn_error_clear(svn_stream_close(local_stream));
-}
-  else
-{
-  SVN_ERR(svn_stream_close(base_stream));
-  SVN_ERR(svn_stream_close(local_stream));
-}
+  /* Close the two streams to force writing the digest */
+  err = svn_error_compose_create(err, svn_stream_close(base_stream));
+  err = svn_error_compose_create(err, svn_stream_close(local_stream));
 
-  /* If we have an error, it may be caused by a corrupt text base.
- Check the checksum and discard `err' if they don't match. */
+  /* If we have an error, it may be caused by a corrupt text base,
+ so check the checksum. */
   if (expected_md5_checksum && verify_checksum
   && !svn_checksum_match(expected_md5_checksum, verify_checksum))
 {
@@ -1142,19 +1133,20 @@ svn_wc__internal_transmit_text_deltas(co
  investigate.  Other commands could be affected,
  too, such as `svn diff'.  */
 
-  /* Deliberately ignore errors; the error about the
- checksum mismatch is more important to return. */
-  svn_error_clear(err);
   if (tempfile)
-svn_error_clear(svn_io_remove_file2(*tempfile, TRUE, scratch_pool));
+err = svn_error_compose_create(
+  err,
+  svn_io_remove_file2(*tempfile, TRUE, scratch_pool));
 
-  return svn_error_create(SVN_ERR_WC_CORRUPT_TEXT_BASE,
-svn_checksum_mismatch_err(expected_md5_checksum, verify_checksum,
+  err = svn_error_compose_create(
+  svn_checksum_mismatch_err(expected_md5_checksum, verify_checksum,
 scratch_pool,
 _("Checksum mismatch for text base of '%s'"),
 svn_dirent_local_style(local_abspath,
scratch_pool)),
-NULL);
+  err);
+
+  return svn_error_create(SVN_ERR_WC_CORRUPT_TEXT_BASE, err, NULL);
 }
 
   /* Now, handle that delta transmission error if any, so we can stop

Modified: 
subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c?rev=1150751&r1=1150750&r2=1150751&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c 
(original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c 
Mon Jul 25 15:34:28 2011
@@ -215,7 +215,6 @@ resolve_conflict_on_node(svn_wc__db_t *d
 
   if (resolve_text)
 {
-  svn_stream_t *tmp_stream = NULL;
   const char *auto_resolve_src;
 
   /* Handle automatic conflict resolution before the temporary files are
@@ -240,6 +239,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
 if (conflict_old && conflict_working && conflict_new)
   {
 const char *temp_dir;
+svn_stream_t *tmp_stream = NULL;
 svn_diff_t *diff;
 svn_diff_conflict_display_style_t style =
   conflict_choice == svn_wc_conflict_choose_theirs_conflict
@@ -252,7 +252,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
 SVN_ERR(svn_stream_open_unique(&tmp_stream,
&auto_resolve_src,
temp_dir,
-   svn_io_file_del_on_close,
+   svn_io_file_del_on_pool_cleanup,
pool, pool));
 
 SVN_ERR(svn_diff_file_diff3_2(&diff,
@@ -269,6 +269,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
 NULL, NULL, NULL, NULL,
 style,
 pool));
+SVN_ERR(svn_stream_close(tmp_stream));
   }
 else
   auto_resolve_src = NULL;
@@ -283,9 +284

svn commit: r1150751 [5/5] - in /subversion/branches/gpg-agent-password-store: ./ build/ac-macros/ build/generator/swig/ notes/ subversion/bindings/swig/perl/native/t/ subversion/include/ subversion/i

2011-07-25 Thread stsp
Modified: 
subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_client/client-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_client/client-test.c?rev=1150751&r1=1150750&r2=1150751&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_client/client-test.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_client/client-test.c
 Mon Jul 25 15:34:28 2011
@@ -244,6 +244,7 @@ check_patch_result(const char *path, con
   svn_pool_destroy(iterpool);
 
   SVN_TEST_ASSERT(i == num_expected_lines);
+  SVN_ERR(svn_stream_close(stream));
   SVN_ERR(svn_io_remove_file2(path, FALSE, pool));
 
   return SVN_NO_ERROR;

Modified: 
subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_diff/parse-diff-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1150751&r1=1150750&r2=1150751&view=diff
==
--- 
subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_diff/parse-diff-test.c
 (original)
+++ 
subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_diff/parse-diff-test.c
 Mon Jul 25 15:34:28 2011
@@ -247,28 +247,28 @@ static const char *bad_git_diff_header =
   "new file mode 100644"NL;
 
 
-/* Create a PATCH_FILE with name FNAME containing the contents of DIFF. */
+/* Create a PATCH_FILE containing the contents of DIFF. */
 static svn_error_t *
-create_patch_file(svn_patch_file_t **patch_file, const char *fname,
+create_patch_file(svn_patch_file_t **patch_file,
   const char *diff, apr_pool_t *pool)
 {
+  apr_size_t bytes;
   apr_size_t len;
-  apr_status_t status;
+  const char *path;
   apr_file_t *apr_file;
 
   /* Create a patch file. */
-  status = apr_file_open(&apr_file, fname,
-(APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE |
- APR_DELONCLOSE), APR_OS_DEFAULT, pool);
-  if (status != APR_SUCCESS)
-return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, "Cannot open '%s'",
- fname);
-  len = strlen(diff);
-  status = apr_file_write_full(apr_file, diff, len, &len);
-  if (status || len != strlen(diff))
+  SVN_ERR(svn_io_open_unique_file3(&apr_file, &path, NULL,
+   svn_io_file_del_on_pool_cleanup,
+   pool, pool));
+
+  bytes = strlen(diff);
+  SVN_ERR(svn_io_file_write_full(apr_file, diff, bytes, &len, pool));
+  if (len != bytes)
 return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
- "Cannot write to '%s'", fname);
-  SVN_ERR(svn_diff_open_patch_file(patch_file, fname, pool));
+ "Cannot write to '%s'", path);
+  SVN_ERR(svn_io_file_close(apr_file, pool));
+  SVN_ERR(svn_diff_open_patch_file(patch_file, path, pool));
 
   return SVN_NO_ERROR;
 }
@@ -314,7 +314,6 @@ static svn_error_t *
 test_parse_unidiff(apr_pool_t *pool)
 {
   svn_patch_file_t *patch_file;
-  const char *fname = "test_parse_unidiff.patch";
   svn_boolean_t reverse;
   svn_boolean_t ignore_whitespace;
   int i;
@@ -330,7 +329,7 @@ test_parse_unidiff(apr_pool_t *pool)
 
   svn_pool_clear(iterpool);
 
-  SVN_ERR(create_patch_file(&patch_file, fname, unidiff, pool));
+  SVN_ERR(create_patch_file(&patch_file, unidiff, pool));
 
   /* We have two patches with one hunk each.
* Parse the first patch. */
@@ -393,9 +392,8 @@ test_parse_git_diff(apr_pool_t *pool)
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
   svn_diff_hunk_t *hunk;
-  const char *fname = "test_parse_git_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, git_unidiff, pool));
+  SVN_ERR(create_patch_file(&patch_file, git_unidiff, pool));
 
   /* Parse a deleted empty file */
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
@@ -467,10 +465,8 @@ test_parse_git_tree_and_text_diff(apr_po
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
   svn_diff_hunk_t *hunk;
-  const char *fname = "test_parse_git_tree_and_text_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, git_tree_and_text_unidiff,
-pool));
+  SVN_ERR(create_patch_file(&patch_file, git_tree_and_text_unidiff, pool));
 
   /* Parse a copied file with text modifications. */
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
@@ -567,10 +563,8 @@ test_bad_git_diff_headers(apr_pool_t *po
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
   svn_diff_hunk_t *hunk;
-  const char *fname = "test_bad_git_diff_header.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, bad_git_diff_header,
-pool));
+  SVN_ERR(create_patch_file

svn commit: r1150760 - /subversion/branches/gpg-agent-password-store/notes/moves

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 15:54:54 2011
New Revision: 1150760

URL: http://svn.apache.org/viewvc?rev=1150760&view=rev
Log:
On the gpg-agent-password-store branch, remerge (that is, reverse-merge
and then merge again) r1146165, r1146496, r1146501. For some reason the
right set of changes was not merge into this branch when these revisions
were originally merged.

Added:
subversion/branches/gpg-agent-password-store/notes/moves
  - copied, changed from r1146165, subversion/trunk/notes/moves

Copied: subversion/branches/gpg-agent-password-store/notes/moves (from 
r1146165, subversion/trunk/notes/moves)
URL: 
http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/notes/moves?p2=subversion/branches/gpg-agent-password-store/notes/moves&p1=subversion/trunk/notes/moves&r1=1146165&r2=1150760&rev=1150760&view=diff
==
--- subversion/trunk/notes/moves (original)
+++ subversion/branches/gpg-agent-password-store/notes/moves Mon Jul 25 
15:54:54 2011
@@ -66,6 +66,11 @@ Some existing interfaces will be extende
 and _scan_deletion() interfaces will be extended to differentiate
 moved nodes from copied, added, and deleted nodes.
 
+### gstein: note that scan_addition() already returns status_moved_here,
+###   and scan_deletion() returns a MOVED_TO_ABSPATH. these functions
+###   should already do what you're asking (with bitrot and "untested"
+###   caveats since I first implemented them).
+
 There might be some public API changes (TBD).
 
 We might require a working copy upgrade when going from 1.7 to 1.8,
@@ -101,6 +106,11 @@ Some code that is expected to change beh
  - update/merge: Update and Merge will use move information to auto-resolve
 the "local move vs. incoming edit" tree conflict scenario.
 
+ - diff: Diff will use move information to generate 'rename from' headers
+when the --git option is used.
+
+ - patch: Patch will use move information to apply changes to files
+which have been moved locally.
 
 Several public APIs may be bumped as their behaviour changes.
 For backwards compatibility, APIs released prior to 1.8 will continue




svn commit: r1150762 - /subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svnmucc_tests.py

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 15:58:20 2011
New Revision: 1150762

URL: http://svn.apache.org/viewvc?rev=1150762&view=rev
Log:
For some reason, when r1144381 was merged into the gpg-agent-password-store
branch, the file subversion/tests/cmdline/svnmucc_tests.py didn't get added.
So do this now.

Added:

subversion/branches/gpg-agent-password-store/subversion/tests/cmdline/svnmucc_tests.py
  - copied unchanged from r1144381, 
subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py



svn commit: r1150779 - /subversion/branches/1.7.x/STATUS

2011-07-25 Thread danielsh
Author: danielsh
Date: Mon Jul 25 16:54:34 2011
New Revision: 1150779

URL: http://svn.apache.org/viewvc?rev=1150779&view=rev
Log:
Vote for r1149627.

Modified:
subversion/branches/1.7.x/STATUS

Modified: subversion/branches/1.7.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1150779&r1=1150778&r2=1150779&view=diff
==
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Mon Jul 25 16:54:34 2011
@@ -118,9 +118,7 @@ Candidate changes:
  Fixes "make install DESTDIR=..." which is used by packagers.  I suspect
  this is not a regression.
Votes:
- +1: philip
- +0: danielsh (no objection to backport if it fixes the problem, but is
-   it a fix or a workaround around some build.conf bug?)
+ +1: philip, danielsh
 
  * r1150242
Make blame close its temporary files before deleting them.




svn commit: r1150783 - in /subversion/trunk: ./ subversion/include/ subversion/include/private/ subversion/libsvn_auth_gpg_agent/ subversion/libsvn_subr/

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 17:14:15 2011
New Revision: 1150783

URL: http://svn.apache.org/viewvc?rev=1150783&view=rev
Log:
Reintegrate the gpg-agent-password-store branch.
It is now working quite well. Further cleanup can happen on trunk.

The merge was an interesting experience. In addition to the problems
fixed by r1150760 and r1150762, I ended up with 3 unrelated content
and 8 unrelated svn:mergeinfo changes on the following files:

   M  subversion/include/private/svn_temp_serializer.h
   M  subversion/include/private/svn_string_private.h
   M  subversion/include/private/svn_adler32.h
   M  subversion/libsvn_fs_fs/temp_serializer.c
   M  subversion/libsvn_fs_fs/temp_serializer.h
   M  subversion/libsvn_subr/hash.c
   M  subversion/libsvn_subr/svn_temp_serializer.c
   M  subversion/libsvn_subr/adler32.c
  D   tools/dist/templates/stable-release-ann.ezt
  D   tools/dist/templates/rc-release-ann.ezt
  M   notes/ra-serf-testing.txt

All these changes were reverted before commit. I suppose they were due
to faulty sync merges from trunk, probably done by myself.
But I don't really know what happened here...

Added:
subversion/trunk/subversion/libsvn_auth_gpg_agent/
  - copied from r1150766, 
subversion/branches/gpg-agent-password-store/subversion/libsvn_auth_gpg_agent/
Modified:
subversion/trunk/   (props changed)
subversion/trunk/Makefile.in
subversion/trunk/build.conf
subversion/trunk/configure.ac
subversion/trunk/subversion/include/private/svn_auth_private.h
subversion/trunk/subversion/include/svn_auth.h
subversion/trunk/subversion/libsvn_subr/auth.c
subversion/trunk/subversion/libsvn_subr/config_file.c
subversion/trunk/subversion/libsvn_subr/simple_providers.c

Propchange: subversion/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 25 17:14:15 2011
@@ -11,6 +11,7 @@
 /subversion/branches/fs-rep-sharing:869036-873803
 /subversion/branches/fsfs-pack:873717-874575
 /subversion/branches/gnome-keyring:870558-871410
+/subversion/branches/gpg-agent-password-store:1005036-1150766
 /subversion/branches/http-protocol-v2:874395-876041
 /subversion/branches/in-memory-cache:869829-871452
 /subversion/branches/integrate-cache-item-serialization:1068724-1068739

Modified: subversion/trunk/Makefile.in
URL: 
http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1150783&r1=1150782&r2=1150783&view=diff
==
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Mon Jul 25 17:14:15 2011
@@ -47,6 +47,7 @@ SVN_APR_LIBS = @SVN_APR_LIBS@
 SVN_APRUTIL_LIBS = @SVN_APRUTIL_LIBS@
 SVN_APR_MEMCACHE_LIBS = @SVN_APR_MEMCACHE_LIBS@
 SVN_DB_LIBS = @SVN_DB_LIBS@
+SVN_GPG_AGENT_LIBS = @SVN_GPG_AGENT_LIBS@
 SVN_GNOME_KEYRING_LIBS = @SVN_GNOME_KEYRING_LIBS@
 SVN_GSSAPI_LIBS = @SVN_GSSAPI_LIBS@
 SVN_KWALLET_LIBS = @SVN_KWALLET_LIBS@
@@ -66,6 +67,7 @@ fsmod_libdir = @libdir@
 ramod_libdir = @libdir@
 bdb_libdir = @libdir@
 gnome_keyring_libdir = @libdir@
+gpg_agent_libdir = @libdir@
 gssapi_libdir = @libdir@
 kwallet_libdir = @libdir@
 neon_libdir = @libdir@
@@ -235,6 +237,7 @@ INSTALL_FSMOD_LIB = $(INSTALL_LIB)
 INSTALL_RAMOD_LIB = $(INSTALL_LIB)
 INSTALL_APR_MEMCACHE_LIB = $(INSTALL_LIB)
 INSTALL_BDB_LIB = $(INSTALL_LIB)
+INSTALL_GPG_AGENT_LIB = $(INSTALL_LIB)
 INSTALL_GNOME_KEYRING_LIB = $(INSTALL_LIB)
 INSTALL_GSSAPI_LIB = $(INSTALL_LIB)
 INSTALL_KWALLET_LIB = $(INSTALL_LIB)

Modified: subversion/trunk/build.conf
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1150783&r1=1150782&r2=1150783&view=diff
==
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Mon Jul 25 17:14:15 2011
@@ -174,6 +174,14 @@ libs = libsvn_client libsvn_ra libsvn_re
 install = bin
 manpages = subversion/svnrdump/svnrdump.1
 
+# Support for GPG Agent
+[libsvn_auth_gpg_agent]]
+description = Subversion GPG Agent library
+type = lib
+install = gpg-agent-lib
+path = subversion/libsvn_auth_gpg_agent
+libs = apr libsvn_subr
+
 # Support for GNOME Keyring
 [libsvn_auth_gnome_keyring]
 description = Subversion GNOME Keyring Library

Modified: subversion/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1150783&r1=1150782&r2=1150783&view=diff
==
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Mon Jul 25 17:14:15 2011
@@ -567,6 +567,25 @@ int main()
   fi
 fi
 
+dnl GPG Agent ---
+
+AC_ARG_WITH(gpg_agent,
+AS_HELP_STRING([--without-gpg-agent], 
+   [Disable support for GPG-Agent]),
+   [with_gpg_agent=no], [with_gpg_agent=yes])
+AC_MSG_CHECKING([whether

svn commit: r1150789 - /subversion/trunk/subversion/include/svn_auth.h

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 17:18:33 2011
New Revision: 1150789

URL: http://svn.apache.org/viewvc?rev=1150789&view=rev
Log:
* subversion/include/svn_auth.h
  (svn_auth_gpg_agent_version): Add @since tag.
  (svn_auth_get_gpg_agent_simple_provider): Fix @since tag.

Modified:
subversion/trunk/subversion/include/svn_auth.h

Modified: subversion/trunk/subversion/include/svn_auth.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_auth.h?rev=1150789&r1=1150788&r2=1150789&view=diff
==
--- subversion/trunk/subversion/include/svn_auth.h (original)
+++ subversion/trunk/subversion/include/svn_auth.h Mon Jul 25 17:18:33 2011
@@ -1074,6 +1074,7 @@ svn_auth_get_kwallet_ssl_client_cert_pw_
 /**
  * Get libsvn_auth_gpg_agent version information.
  *
+ * @since New in 1.8.
  */
 const svn_version_t *
 svn_auth_gpg_agent_version(void);
@@ -1090,7 +1091,7 @@ svn_auth_gpg_agent_version(void);
  *
  * Allocate @a *provider in @a pool.
  *
- * @since New in 1.7
+ * @since New in 1.8
  * @note This function actually works only on systems with
  * libsvn_auth_gpg_agent and GNU Privacy Guard installed.
  */




svn commit: r1150793 - /subversion/trunk/build/generator/extractor.py

2011-07-25 Thread rhuijben
Author: rhuijben
Date: Mon Jul 25 17:21:28 2011
New Revision: 1150793

URL: http://svn.apache.org/viewvc?rev=1150793&view=rev
Log:
* build/generator/extractor.py
  (_filter_names): Following up on r1150783, add a few more functions to the
not-available-on-windows list.

Modified:
subversion/trunk/build/generator/extractor.py

Modified: subversion/trunk/build/generator/extractor.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/extractor.py?rev=1150793&r1=1150792&r2=1150793&view=diff
==
--- subversion/trunk/build/generator/extractor.py (original)
+++ subversion/trunk/build/generator/extractor.py Mon Jul 25 17:21:28 2011
@@ -55,6 +55,8 @@ _filter_names = [
   'svn_auth_get_kwallet_ssl_client_cert_pw_provider',
   'svn_auth_gnome_keyring_version',
   'svn_auth_kwallet_version',
+  'svn_auth_get_gpg_agent_simple_provider',
+  'svn_auth_gpg_agent_version',
   ]
 
 if __name__ == '__main__':




svn commit: r1150799 - /subversion/site/publish/roadmap.html

2011-07-25 Thread danielsh
Author: danielsh
Date: Mon Jul 25 17:37:19 2011
New Revision: 1150799

URL: http://svn.apache.org/viewvc?rev=1150799&view=rev
Log:
* roadmap.html: Start documenting 1.8.

Modified:
subversion/site/publish/roadmap.html

Modified: subversion/site/publish/roadmap.html
URL: 
http://svn.apache.org/viewvc/subversion/site/publish/roadmap.html?rev=1150799&r1=1150798&r2=1150799&view=diff
==
--- subversion/site/publish/roadmap.html (original)
+++ subversion/site/publish/roadmap.html Mon Jul 25 17:37:19 2011
@@ -255,13 +255,13 @@ numbering, compatibility, and deprecatio
 
 
 
-Release Status
+Upcoming Release Status
   ¶
 
 
-The following table contains items currently targetted for the next major
-   release, along with their completion status.  It is meant mainly for
+The following table contains items currently targetted for the upcoming
+   major release, along with their completion status.  It is meant mainly for
developers, but can help answer the oft-asked question "how is the next
release coming along?"  If you are interested in helping speed up the
next release, consider tackling one of the incomplete items below.
@@ -447,6 +447,97 @@ numbering, compatibility, and deprecatio
  
 
 
+
+Next Release Status
+  ¶
+
+
+The following table contains items currently targetted for the subsequent
+   major release, along with their completion status.  It is meant mainly for
+   developers, but can help answer the oft-asked question "how is the next
+   release coming along?"  If you are interested in helping speed up the
+   next release, consider tackling one of the incomplete items below.
+
+This table is incomplete and does not contain all features planned
+   for inclusion in Subversion 1.8.
+
+
+
+  
+Task
+Status
+Notes
+  
+
+
+  
+GPG Agent support
+Completed
+
+  
+  
+FSFS: Packing of revision property shards
+In Progress
+
+  
+  
+  
+Review of performance branch
+Not Started
+Review items on the http://svn.apache.org/repos/asf/subversion/branches/performance/";>performance
 branch,
+and determine which bits can/should be included in 1.8.
+  
+  
+Test Review
+Not Started
+Determine which XFail and WIP tests should
+remain so, and which need to be fixed before release.
+  
+  
+API Review
+Not Started
+http://svn.apache.org/repos/asf/subversion/trunk/notes/api-errata/";
+>api-errata
+  
+  
+Issue triage
+Not Started
+Review open issues for the 
+http://subversion.tigris.org/issues/buglist.cgi?issue_status=UNCONFIRMED&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&target_milestone=1.8.0";>1.8.0,
+http://subversion.tigris.org/issues/buglist.cgi?issue_status=UNCONFIRMED&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&target_milestone=1.8-consider";>1.8-consider,
+and
+http://subversion.tigris.org/issues/buglist.cgi?issue_status=UNCONFIRMED&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&target_milestone=1.7.x";>1.7.x,
+milestones.
+  
+  
+Remove temp APIs
+Not Started
+Review APIs added in 1.8 (including APIs internal to libsvn_wc), and
+determine which ones should stay, and which should be removed.
+  
+  
+API performance analysis
+Not Started
+Profile the new APIs to determine which can/should be optimized.
+  
+  
+Updating the 1.7.x→1.8.x changelog
+Not Started
+http://svn.apache.org/repos/asf/subversion/trunk/CHANGES";
+>CHANGES (Note: this is not a blocker for the 1.8.x branch.)
+  
+  
+Compose 1.8 release notes
+Not Started
+Subversion 1.8 Release
+Notes (Note: this is not a blocker for the 1.8.x branch.)
+  
+
+
+ 
+
+
 
 Past Releases
   

svn commit: r1150801 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 17:43:18 2011
New Revision: 1150801

URL: http://svn.apache.org/viewvc?rev=1150801&view=rev
Log:
Some refactoring in the gpg-agent code. No functional change.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (send_option): New helper function that sends an option to the gpg-agent.
  (password_get_gpg_agent): Use the new helper function, thereby
   getting rid of some needless code repetition.

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150801&r1=1150800&r2=1150801&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
17:43:18 2011
@@ -95,6 +95,29 @@ receive_from_gpg_agent(int sd, char *buf
 return FALSE;
 }
 
+/* Using socket SD, send the option OPTION with the specified VALUE
+ * to the gpg agent. Store the response in BUF, assumed to be N bytes
+ * in size, and evaluate the response. Return TRUE if the agent liked
+ * the smell of the option, if there is such a thing, and doesn't feel
+ * saturated by it. Else return FALSE.
+ * Do temporary allocations in scratch_pool. */
+static svn_boolean_t
+send_option(int sd, char *buf, size_t n, const char *option, const char *value,
+apr_pool_t *scratch_pool)
+{
+  const char *request;
+
+  request = apr_psprintf(scratch_pool, "OPTION %s=%s\n", option, value);
+
+  if (send(sd, request, strlen(request), 0) == -1)
+return FALSE;
+
+  if (!receive_from_gpg_agent(sd, buf, n))
+return FALSE;
+
+  return (strncmp(buf, "OK", 2) == 0);
+}
+
 /* Implementation of svn_auth__password_get_t that retrieves the password
from gpg-agent */
 static svn_boolean_t
@@ -172,15 +195,7 @@ password_get_gpg_agent(const char **pass
   tty_name = getenv("GPG_TTY");
   if (tty_name != NULL)
 {
-  request = apr_psprintf(pool, "OPTION ttyname=%s\n", tty_name);
-  send(sd, request, strlen(request), 0);
-  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
-{
-  close(sd);
-  return FALSE;
-}
-
-  if (strncmp(buffer, "OK", 2) != 0)
+  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "ttyname", tty_name, pool))
 {
   close(sd);
   return FALSE;
@@ -196,15 +211,7 @@ password_get_gpg_agent(const char **pass
   tty_type = getenv("TERM");
   if (tty_type != NULL)
 {
-  request = apr_psprintf(pool, "OPTION ttytype=%s\n", tty_type);
-  send(sd, request, strlen(request), 0);
-  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
-{
-  close(sd);
-  return FALSE;
-}
-
-  if (strncmp(buffer, "OK", 2) != 0)
+  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "ttytype", tty_type, pool))
 {
   close(sd);
   return FALSE;
@@ -224,14 +231,7 @@ password_get_gpg_agent(const char **pass
 lc_ctype = getenv("LANG");
   if (lc_ctype != NULL)
 {
-  request = apr_psprintf(pool, "OPTION lc-ctype=%s\n", lc_ctype);
-  send(sd, request, strlen(request), 0);
-  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
-{
-  close(sd);
-  return FALSE;
-}
-  if (strncmp(buffer, "OK", 2) != 0)
+  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "lc-ctype", lc_ctype, 
pool))
 {
   close(sd);
   return FALSE;
@@ -243,13 +243,7 @@ password_get_gpg_agent(const char **pass
   if (display != NULL)
 {
   request = apr_psprintf(pool, "OPTION display=%s\n", display);
-  send(sd, request, strlen(request), 0);
-  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
-{
-  close(sd);
-  return FALSE;
-}
-  if (strncmp(buffer, "OK", 2) != 0)
+  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "display", display, pool))
 {
   close(sd);
   return FALSE;




svn commit: r1150803 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 17:45:07 2011
New Revision: 1150803

URL: http://svn.apache.org/viewvc?rev=1150803&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Do not ignore errors thrown by the send() function.

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150803&r1=1150802&r2=1150803&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
17:45:07 2011
@@ -273,7 +273,11 @@ password_get_gpg_agent(const char **pass
  escape_blanks(password_prompt),
  escape_blanks(realm_prompt));
 
-  send(sd, request, strlen(request) + 1, 0);
+  if (send(sd, request, strlen(request) + 1, 0) == -1)
+{
+  close(sd);
+  return FALSE;
+}
   if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
 {
   close(sd);




svn commit: r1150807 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 17:48:52 2011
New Revision: 1150807

URL: http://svn.apache.org/viewvc?rev=1150807&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (send_option, password_get_gpg_agent): Use write() instead of send().
   We don't set any flags for send() so we might as well just use write().

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150807&r1=1150806&r2=1150807&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
17:48:52 2011
@@ -109,7 +109,7 @@ send_option(int sd, char *buf, size_t n,
 
   request = apr_psprintf(scratch_pool, "OPTION %s=%s\n", option, value);
 
-  if (send(sd, request, strlen(request), 0) == -1)
+  if (write(sd, request, strlen(request)) == -1)
 return FALSE;
 
   if (!receive_from_gpg_agent(sd, buf, n))
@@ -273,7 +273,7 @@ password_get_gpg_agent(const char **pass
  escape_blanks(password_prompt),
  escape_blanks(realm_prompt));
 
-  if (send(sd, request, strlen(request) + 1, 0) == -1)
+  if (write(sd, request, strlen(request) + 1) == -1)
 {
   close(sd);
   return FALSE;




svn commit: r1150812 - in /subversion/trunk/subversion: libsvn_wc/adm_ops.c tests/cmdline/special_tests.py

2011-07-25 Thread philip
Author: philip
Date: Mon Jul 25 17:59:44 2011
New Revision: 1150812

URL: http://svn.apache.org/viewvc?rev=1150812&view=rev
Log:
Fix issue 3972, revert always claims to revert symlinks

* subversion/libsvn_wc/adm_ops.c
  (revert_restore): Move executable/read-only queries closer to the point
   where the values are used, don't do executable processing for symlinks.

* subversion/tests/cmdline/special_tests.py
  (symlink_destination_change): Extend to include a repeat revert.

Modified:
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/tests/cmdline/special_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1150812&r1=1150811&r2=1150812&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Mon Jul 25 17:59:44 2011
@@ -1389,8 +1389,6 @@ revert_restore(svn_wc__db_t *db,
   else if (on_disk == svn_node_file)
 {
   svn_boolean_t modified;
-  svn_boolean_t executable;
-  svn_boolean_t read_only;
   apr_hash_t *props;
 #ifdef HAVE_SYMLINK
   svn_string_t *special_prop;
@@ -1438,11 +1436,6 @@ revert_restore(svn_wc__db_t *db,
  db, local_abspath,
  TRUE, scratch_pool));
 
-  SVN_ERR(svn_io__is_finfo_executable(&executable, &finfo,
-  scratch_pool));
-  SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo,
- scratch_pool));
-
   if (modified)
 {
   SVN_ERR(svn_io_remove_file2(local_abspath, FALSE,
@@ -1451,10 +1444,12 @@ revert_restore(svn_wc__db_t *db,
 }
   else
 {
+  svn_boolean_t read_only;
   svn_string_t *needs_lock_prop;
-#if !defined(WIN32) && !defined(__OS2__)
-  svn_string_t *executable_prop;
-#endif
+
+  SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo,
+ scratch_pool));
+
   needs_lock_prop = apr_hash_get(props, SVN_PROP_NEEDS_LOCK,
  APR_HASH_KEY_STRING);
   if (needs_lock_prop && !read_only)
@@ -1471,19 +1466,31 @@ revert_restore(svn_wc__db_t *db,
 }
 
 #if !defined(WIN32) && !defined(__OS2__)
-  executable_prop = apr_hash_get(props, SVN_PROP_EXECUTABLE,
- APR_HASH_KEY_STRING);
-  if (executable_prop && !executable)
-{
-  SVN_ERR(svn_io_set_file_executable(local_abspath, TRUE,
- FALSE, scratch_pool));
-  notify_required = TRUE;
-}
-  else if (!executable_prop && executable)
+#ifdef HAVE_SYMLINK
+  if (!special)
+#endif
 {
-  SVN_ERR(svn_io_set_file_executable(local_abspath, FALSE,
- FALSE, scratch_pool));
-  notify_required = TRUE;
+  svn_boolean_t executable;
+  svn_string_t *executable_prop;
+
+  SVN_ERR(svn_io__is_finfo_executable(&executable, &finfo,
+  scratch_pool));
+  executable_prop = apr_hash_get(props, 
SVN_PROP_EXECUTABLE,
+ APR_HASH_KEY_STRING);
+  if (executable_prop && !executable)
+{
+  SVN_ERR(svn_io_set_file_executable(local_abspath,
+ TRUE, FALSE,
+ scratch_pool));
+  notify_required = TRUE;
+}
+  else if (!executable_prop && executable)
+{
+  SVN_ERR(svn_io_set_file_executable(local_abspath,
+ FALSE, FALSE,
+ scratch_pool));
+  notify_required = TRUE;
+}
 }
 #endif
 }

Modified: subversion/trunk/subversion/tests/cmdline/special_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/special_tests.py?rev=1150812&r1=1150811&r2=1150812&view=diff
==

svn commit: r1150821 - in /subversion/trunk: build/generator/gen_make.py subversion/bindings/swig/core.i

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 18:20:28 2011
New Revision: 1150821

URL: http://svn.apache.org/viewvc?rev=1150821&view=rev
Log:
Fix problems in the bindings tests that occured since the reintegration
of the gpg-agent-password-store branch.

* subversion/bindings/swig/core.i: Ignore functions related to the
   platform-specific GPG-Agent auth provider.

* build/generator/gen_make.py: Treat libsvn_auth_gpg_agent the same
   way as libsvn_auth_gnome_keyring and libsvn_auth_kwallet. (Not really
   sure what this special-casing here does, but keeping this consistent
   is probably good.)

Modified:
subversion/trunk/build/generator/gen_make.py
subversion/trunk/subversion/bindings/swig/core.i

Modified: subversion/trunk/build/generator/gen_make.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_make.py?rev=1150821&r1=1150820&r2=1150821&view=diff
==
--- subversion/trunk/build/generator/gen_make.py (original)
+++ subversion/trunk/build/generator/gen_make.py Mon Jul 25 18:20:28 2011
@@ -531,7 +531,8 @@ DIR=`pwd`
 ''')
 libdep_cache = {}
 paths = {}
-for lib in ('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet'):
+for lib in ('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet',
+'libsvn_auth_gpg_agent'):
   paths[lib] = self.sections[lib].options.get('path')
 for target_ob in install_sources:
   if not isinstance(target_ob, gen_base.TargetExe):
@@ -563,7 +564,8 @@ DIR=`pwd`
 for lib in self._get_all_lib_deps(lib_name, libdep_cache, paths):
   libs.add(lib)
   if target_name == 'libsvn_subr':
-libs.update(('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet'))
+libs.update(('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet',
+ 'libsvn_auth_gpg_agent'))
   libdep_cache[target_name] = sorted(libs)
 return libdep_cache[target_name]
 

Modified: subversion/trunk/subversion/bindings/swig/core.i
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/core.i?rev=1150821&r1=1150820&r2=1150821&view=diff
==
--- subversion/trunk/subversion/bindings/swig/core.i (original)
+++ subversion/trunk/subversion/bindings/swig/core.i Mon Jul 25 18:20:28 2011
@@ -244,6 +244,8 @@
 %ignore svn_auth_kwallet_version;
 %ignore svn_auth_get_kwallet_simple_provider;
 %ignore svn_auth_get_kwallet_ssl_client_cert_pw_provider;
+%ignore svn_auth_gpg_agent_version;
+%ignore svn_auth_get_gpg_agent_simple_provider;
 
 /* bad pool convention */
 %ignore svn_opt_print_generic_help;




svn commit: r1150833 - in /subversion/trunk/subversion: include/svn_auth.h libsvn_subr/config_file.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 18:36:16 2011
New Revision: 1150833

URL: http://svn.apache.org/viewvc?rev=1150833&view=rev
Log:
Small cleanups related to the new gpg-agent feature. No functional change.

* subversion/include/svn_auth.h
  (svn_auth_get_platform_specific_provider,
   svn_auth_get_platform_specific_client_providers): Mention gpg-agent
in docstrings.

* subversion/libsvn_subr/config_file.c
  (svn_config_ensure): gpg-agent has not been tested on all platforms,
   and we don't compile it on windows. So put it into the "Unix-like systems"
   group instead of claiming it ran on all platforms.
   Also remove it from the example line that enables keychain on Mac OS X.
   Most Mac users probably prefer keychain and those that don't will be
   smart enough to configure gpg-agent anyway.

Modified:
subversion/trunk/subversion/include/svn_auth.h
subversion/trunk/subversion/libsvn_subr/config_file.c

Modified: subversion/trunk/subversion/include/svn_auth.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_auth.h?rev=1150833&r1=1150832&r2=1150833&view=diff
==
--- subversion/trunk/subversion/include/svn_auth.h (original)
+++ subversion/trunk/subversion/include/svn_auth.h Mon Jul 25 18:36:16 2011
@@ -785,8 +785,8 @@ svn_auth_get_simple_provider(svn_auth_pr
  * svn_auth_provider_object_t, or return @c NULL if the provider is not
  * available for the requested platform or the requested provider is unknown.
  *
- * Valid @a provider_name values are: "gnome_keyring", "keychain", "kwallet"
- * and "windows".
+ * Valid @a provider_name values are: "gnome_keyring", "keychain", "kwallet",
+ * "gpg_agent", and "windows".
  *
  * Valid @a provider_type values are: "simple", "ssl_client_cert_pw" and
  * "ssl_server_trust".
@@ -818,9 +818,10 @@ svn_auth_get_platform_specific_provider(
  *
  * Default order of the platform-specific authentication providers:
  *   1. gnome-keyring
- *   2. kwallet
- *   3. keychain
- *   4. windows-cryptoapi
+ *   2. gpg-agent
+ *   3. kwallet
+ *   4. keychain
+ *   5. windows-cryptoapi
  *
  * @since New in 1.6.
  */

Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config_file.c?rev=1150833&r1=1150832&r2=1150833&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/config_file.c (original)
+++ subversion/trunk/subversion/libsvn_subr/config_file.c Mon Jul 25 18:36:16 
2011
@@ -954,11 +954,11 @@ svn_config_ensure(const char *config_dir
 "### Valid password stores:" NL
 "###   gnome-keyring(Unix-like systems)" NL
 "###   kwallet  (Unix-like systems)" NL
+"###   gpg-agent(Unix-like systems)" NL
 "###   keychain (Mac OS X)"  NL
 "###   windows-cryptoapi(Windows)"   NL
-"###   gpg-agent(All platforms)" NL
 #ifdef SVN_HAVE_KEYCHAIN_SERVICES
-"# password-stores = keychain,gpg-agent" NL
+"# password-stores = keychain"   NL
 #elif defined(WIN32) && !defined(__MINGW32__)
 "# password-stores = windows-cryptoapi"  NL
 #else




svn commit: r1150841 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 18:45:57 2011
New Revision: 1150841

URL: http://svn.apache.org/viewvc?rev=1150841&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): We can pass the full BUFFER_SIZE to
   receive_from_gpg_agent() and send_option() because they will
   NUL-terminate. (Historically these were arguments to recv() and
   send() which do not.)

Found by: danielsh

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150841&r1=1150840&r2=1150841&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
18:45:57 2011
@@ -179,7 +179,7 @@ password_get_gpg_agent(const char **pass
 
   /* Receive the connection status from the gpg-agent daemon. */
   buffer = apr_palloc(pool, BUFFER_SIZE);
-  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE))
 {
   close(sd);
   return FALSE;
@@ -195,7 +195,7 @@ password_get_gpg_agent(const char **pass
   tty_name = getenv("GPG_TTY");
   if (tty_name != NULL)
 {
-  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "ttyname", tty_name, pool))
+  if (!send_option(sd, buffer, BUFFER_SIZE, "ttyname", tty_name, pool))
 {
   close(sd);
   return FALSE;
@@ -211,7 +211,7 @@ password_get_gpg_agent(const char **pass
   tty_type = getenv("TERM");
   if (tty_type != NULL)
 {
-  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "ttytype", tty_type, pool))
+  if (!send_option(sd, buffer, BUFFER_SIZE, "ttytype", tty_type, pool))
 {
   close(sd);
   return FALSE;
@@ -231,7 +231,7 @@ password_get_gpg_agent(const char **pass
 lc_ctype = getenv("LANG");
   if (lc_ctype != NULL)
 {
-  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "lc-ctype", lc_ctype, 
pool))
+  if (!send_option(sd, buffer, BUFFER_SIZE, "lc-ctype", lc_ctype, pool))
 {
   close(sd);
   return FALSE;
@@ -243,7 +243,7 @@ password_get_gpg_agent(const char **pass
   if (display != NULL)
 {
   request = apr_psprintf(pool, "OPTION display=%s\n", display);
-  if (!send_option(sd, buffer, BUFFER_SIZE - 1, "display", display, pool))
+  if (!send_option(sd, buffer, BUFFER_SIZE, "display", display, pool))
 {
   close(sd);
   return FALSE;
@@ -278,7 +278,7 @@ password_get_gpg_agent(const char **pass
   close(sd);
   return FALSE;
 }
-  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE - 1))
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE))
 {
   close(sd);
   return FALSE;




svn commit: r1150842 - /subversion/trunk/build/generator/gen_win.py

2011-07-25 Thread rhuijben
Author: rhuijben
Date: Mon Jul 25 18:48:20 2011
New Revision: 1150842

URL: http://svn.apache.org/viewvc?rev=1150842&view=rev
Log:
* build/generator/gen_win.py
  (parse_options): Don't generate a libsvn_auth_gpg_agent project on Windows.

Modified:
subversion/trunk/build/generator/gen_win.py

Modified: subversion/trunk/build/generator/gen_win.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1150842&r1=1150841&r2=1150842&view=diff
==
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Mon Jul 25 18:48:20 2011
@@ -91,7 +91,8 @@ class GeneratorBase(gen_base.GeneratorBa
 self.skip_sections = { 'mod_dav_svn': None,
'mod_authz_svn': None,
'libsvn_auth_kwallet': None,
-   'libsvn_auth_gnome_keyring': None }
+   'libsvn_auth_gnome_keyring': None,
+   'libsvn_auth_gpg_agent': None }
 
 # Instrumentation options
 self.disable_shared = None




svn commit: r1150853 - /subversion/trunk/subversion/libsvn_ra_serf/replay.c

2011-07-25 Thread lgo
Author: lgo
Date: Mon Jul 25 19:21:26 2011
New Revision: 1150853

URL: http://svn.apache.org/viewvc?rev=1150853&view=rev
Log:
Follow up to r1150506 with a similar fix for replay_range.

* subversion/libsvn_ra_serf/replay.c
  (svn_ra_serf__replay_range): Don't create file_pool from the global session
   pool, it will be created from a per-revision pool later when needed.


Modified:
subversion/trunk/subversion/libsvn_ra_serf/replay.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/replay.c?rev=1150853&r1=1150852&r2=1150853&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/replay.c Mon Jul 25 19:21:26 2011
@@ -769,7 +769,6 @@ svn_ra_serf__replay_range(svn_ra_session
 
   replay_ctx = apr_pcalloc(ctx_pool, sizeof(*replay_ctx));
   replay_ctx->src_rev_pool = ctx_pool;
-  replay_ctx->file_pool = svn_pool_create(pool);
   replay_ctx->revstart_func = revstart_func;
   replay_ctx->revfinish_func = revfinish_func;
   replay_ctx->replay_baton = replay_baton;




svn commit: r1150867 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread danielsh
Author: danielsh
Date: Mon Jul 25 19:55:26 2011
New Revision: 1150867

URL: http://svn.apache.org/viewvc?rev=1150867&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Prefer LC_ALL to LC_CTYPE.

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150867&r1=1150866&r2=1150867&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
19:55:26 2011
@@ -223,12 +223,14 @@ password_get_gpg_agent(const char **pass
   return FALSE;
 }
 
-  /* Send LC_CTYPE to the gpg-agent daemon. */
-  lc_ctype = getenv("LC_CTYPE");
+  /* Compute LC_CTYPE. */
+  lc_ctype = getenv("LC_ALL");
   if (lc_ctype == NULL)
-lc_ctype = getenv("LC_ALL");
+lc_ctype = getenv("LC_CTYPE");
   if (lc_ctype == NULL)
 lc_ctype = getenv("LANG");
+
+  /* Send LC_CTYPE to the gpg-agent daemon. */
   if (lc_ctype != NULL)
 {
   if (!send_option(sd, buffer, BUFFER_SIZE, "lc-ctype", lc_ctype, pool))




svn commit: r1150868 - /subversion/trunk/tools/client-side/detatch.py

2011-07-25 Thread hwright
Author: hwright
Date: Mon Jul 25 19:56:35 2011
New Revision: 1150868

URL: http://svn.apache.org/viewvc?rev=1150868&view=rev
Log:
Add a rudimentary detatch script to the client-side tools.  This is far from
comprehensive or exhaustively tested, but should work in most scenarios.

Improvements, patches, testing, etc welcome and encouraged.

* tools/client-side/detatch.py:
  New.

Added:
subversion/trunk/tools/client-side/detatch.py   (with props)

Added: subversion/trunk/tools/client-side/detatch.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/detatch.py?rev=1150868&view=auto
==
--- subversion/trunk/tools/client-side/detatch.py (added)
+++ subversion/trunk/tools/client-side/detatch.py Mon Jul 25 19:56:35 2011
@@ -0,0 +1,271 @@
+#!/usr/bin/env python
+#
+# 
+#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.
+# 
+
+# TODO: if this was part of core subversion, we'd have all sorts of nifty
+#   checks, and could use a lot of existing code.
+
+import os
+import re
+import sys
+import shutil
+import sqlite3
+
+
+def usage():
+  print("""usage: %s WC_SRC TARGET
+
+Detatch the working copy subdirectory given by WC_SRC to TARGET.  This is
+equivalent to copying WC_SRC to TARGET, but it inserts a new set of Subversion
+metadata into TARGET/.svn, making TARGET a proper independent working copy.
+""" % sys.argv[0])
+  sys.exit(1)
+
+
+def find_wcroot(wcdir):
+  wcroot = os.path.abspath(wcdir)
+  old_wcroot = ''
+  while wcroot != old_wcroot:
+if os.path.exists(os.path.join(wcroot, '.svn', 'wc.db')):
+  return wcroot
+
+old_wcroot = wcroot
+wcroot = os.path.dirname(wcroot)
+
+  return None
+
+
+def  migrate_sqlite(wc_src, target, wcroot):
+  src_conn = sqlite3.connect(os.path.join(wcroot, '.svn', 'wc.db'))
+  dst_conn = sqlite3.connect(os.path.join(target, '.svn', 'wc.db'))
+
+  local_relsrc = os.path.relpath(wc_src, wcroot)
+
+  src_c = src_conn.cursor()
+  dst_c = dst_conn.cursor()
+
+  # We're only going to attempt this if there are no locks or work queue
+  # items in the source database
+  ### This could probably be tightened up, but for now this suffices
+  src_c.execute('select count(*) from wc_lock')
+  count = int(src_c.fetchone()[0])
+  assert count == 0
+
+  src_c.execute('select count(*) from work_queue')
+  count = int(src_c.fetchone()[0])
+  assert count == 0
+
+  # Copy over the schema
+  src_c.execute('pragma user_version')
+  user_version = src_c.fetchone()[0]
+  # We only know how to handle format 29 working copies
+  assert user_version == 29
+  ### For some reason, sqlite doesn't like to parameterize the pragma statement
+  dst_c.execute('pragma user_version = %d' % user_version)
+
+  src_c.execute('select name, sql from sqlite_master')
+  for row in src_c:
+if not row[0].startswith('sqlite_'):
+  dst_c.execute(row[1])
+
+  # Insert wcroot row
+  dst_c.execute('insert into wcroot (id, local_abspath) values (?, ?)',
+(1, None))
+
+  # Copy repositories rows
+  ### Perhaps prune the repositories based upon the new NODES set?
+  src_c.execute('select * from repository')
+  for row in src_c:
+dst_c.execute('insert into repository values (?, ?, ?)',
+  row)
+
+  # Copy the root node
+  src_c.execute('select * from nodes where local_relpath = ?',
+local_relsrc)
+  row = list(src_c.fetchone())
+  row[1] = ''
+  row[3] = None
+  dst_c.execute('''insert into nodes values
+  (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
+   ?, ?, ?, ?, ?, ?, ?, ?)''', row)
+
+  # Copy children nodes rows
+  src_c.execute('select * from nodes where local_relpath like ?',
+(local_relsrc + '/%', ))
+  for row in src_c:
+row = list(row)
+row[1] = row[1][len(local_relsrc) + 1:]
+row[3] = row[3][len(local_relsrc) + 1:]
+dst_c.execute('''insert into nodes values
+  (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
+   ?, ?, ?, ?, ?, ?, ?, ?)''',
+   

svn commit: r1150869 - in /subversion/trunk/tools/client-side: detach.py detatch.py

2011-07-25 Thread hwright
Author: hwright
Date: Mon Jul 25 19:59:37 2011
New Revision: 1150869

URL: http://svn.apache.org/viewvc?rev=1150869&view=rev
Log:
My spelling is horrible.

* tools/client-side/detatch.py:
  Renamed to...

* tools/client-side/detach.py:
  ...this.

Added:
subversion/trunk/tools/client-side/detach.py
  - copied unchanged from r1150868, 
subversion/trunk/tools/client-side/detatch.py
Removed:
subversion/trunk/tools/client-side/detatch.py



svn commit: r1150870 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 20:00:58 2011
New Revision: 1150870

URL: http://svn.apache.org/viewvc?rev=1150870&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Write the correct number of bytes to the
   socket when sending the GET_PASSPHRASE command. We used to send one
   (random) byte too much, which the agent will interpret as the first
   byte of the next command we send.

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150870&r1=1150869&r2=1150870&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
20:00:58 2011
@@ -275,7 +275,7 @@ password_get_gpg_agent(const char **pass
  escape_blanks(password_prompt),
  escape_blanks(realm_prompt));
 
-  if (write(sd, request, strlen(request) + 1) == -1)
+  if (write(sd, request, strlen(request)) == -1)
 {
   close(sd);
   return FALSE;




svn commit: r1150872 - /subversion/trunk/tools/client-side/detach.py

2011-07-25 Thread hwright
Author: hwright
Date: Mon Jul 25 20:02:33 2011
New Revision: 1150872

URL: http://svn.apache.org/viewvc?rev=1150872&view=rev
Log:
* tools/client-side/detach.py
  (migrate_sqlite): Wrap a string in a tuple.

Modified:
subversion/trunk/tools/client-side/detach.py

Modified: subversion/trunk/tools/client-side/detach.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/detach.py?rev=1150872&r1=1150871&r2=1150872&view=diff
==
--- subversion/trunk/tools/client-side/detach.py (original)
+++ subversion/trunk/tools/client-side/detach.py Mon Jul 25 20:02:33 2011
@@ -98,7 +98,7 @@ def  migrate_sqlite(wc_src, target, wcro
 
   # Copy the root node
   src_c.execute('select * from nodes where local_relpath = ?',
-local_relsrc)
+(local_relsrc,))
   row = list(src_c.fetchone())
   row[1] = ''
   row[3] = None




svn commit: r1150873 - /subversion/trunk/tools/client-side/detach.py

2011-07-25 Thread hwright
Author: hwright
Date: Mon Jul 25 20:03:38 2011
New Revision: 1150873

URL: http://svn.apache.org/viewvc?rev=1150873&view=rev
Log:
This really is untested.  I mean it.

* tools/client-side/detach.py:
  Raise an exception by default to prevent "accidental" usage.

Modified:
subversion/trunk/tools/client-side/detach.py

Modified: subversion/trunk/tools/client-side/detach.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/detach.py?rev=1150873&r1=1150872&r2=1150873&view=diff
==
--- subversion/trunk/tools/client-side/detach.py (original)
+++ subversion/trunk/tools/client-side/detach.py Mon Jul 25 20:03:38 2011
@@ -266,6 +266,6 @@ def main():
 
 
 if __name__ == '__main__':
-  #raise Exception("""This script is unfinished and not ready to be used on 
live data.
-  #  Trust us.""")
+  raise Exception("""This script is unfinished and not ready to be used on 
live data.
+Trust us.""")
   main()




svn commit: r1150874 - /subversion/trunk/tools/client-side/detach.py

2011-07-25 Thread hwright
Author: hwright
Date: Mon Jul 25 20:05:20 2011
New Revision: 1150874

URL: http://svn.apache.org/viewvc?rev=1150874&view=rev
Log:
Fix a couple more instances of the same bug as r1150872.

* tools/client-side/detach.py
  (migrate_sqlite): Wrap some strings in tuples going into sqlite.

Modified:
subversion/trunk/tools/client-side/detach.py

Modified: subversion/trunk/tools/client-side/detach.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/detach.py?rev=1150874&r1=1150873&r2=1150874&view=diff
==
--- subversion/trunk/tools/client-side/detach.py (original)
+++ subversion/trunk/tools/client-side/detach.py Mon Jul 25 20:05:20 2011
@@ -120,7 +120,7 @@ def  migrate_sqlite(wc_src, target, wcro
 
   # Copy root actual_node
   src_c.execute('select * from actual_node where local_relpath = ?',
-local_relsrc)
+(local_relsrc, ))
   row = src_c.fetchone()
   if row:
 row = list(row)
@@ -146,7 +146,7 @@ def  migrate_sqlite(wc_src, target, wcro
 
   # EXTERNALS
   src_c.execute('select * from externals where local_relpath = ?',
-local_relsrc)
+(local_relsrc, ))
   row = src_c.fetchone()
   if row:
 row = list(row)




svn commit: r1150875 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 20:07:30 2011
New Revision: 1150875

URL: http://svn.apache.org/viewvc?rev=1150875&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Verify that the agent shares our idea about
   which socket we used to connect to the agent. The GPG-Agent documentation
   says that clients should refuse to connect to an agent with a socket
   name that differs from the client's configuration.

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150875&r1=1150874&r2=1150875&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
20:07:30 2011
@@ -136,7 +136,7 @@ password_get_gpg_agent(const char **pass
   char *buffer;
   
   apr_array_header_t *socket_details;
-  char *request = NULL;
+  const char *request = NULL;
   const char *cache_id = NULL;
   struct sockaddr_un addr;
   const char *tty_name;
@@ -191,6 +191,47 @@ password_get_gpg_agent(const char **pass
   return FALSE;
 }
 
+  /* The GPG-Agent documentation says:
+   *  "Clients should deny to access an agent with a socket name which does
+   *   not match its own configuration". */
+  request = "GETINFO socket_name\n";
+  if (write(sd, request, strlen(request)) == -1)
+{
+  close(sd);
+  return FALSE;
+}
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE))
+{
+  close(sd);
+  return FALSE;
+}
+  if (strncmp(buffer, "D", 1) == 0)
+p = &buffer[2];
+  if (!p)
+{
+  close(sd);
+  return FALSE;
+}
+  ep = strchr(p, '\n');
+  if (ep != NULL)
+*ep = '\0';
+  if (strcmp(socket_name, p) != 0)
+{
+  close(sd);
+  return FALSE;
+}
+  /* The agent will terminate its reponse with "OK". */
+  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE))
+{
+  close(sd);
+  return FALSE;
+}
+  if (strncmp(buffer, "OK", 2) != 0)
+{
+  close(sd);
+  return FALSE;
+}
+
   /* Send TTY_NAME to the gpg-agent daemon. */
   tty_name = getenv("GPG_TTY");
   if (tty_name != NULL)




Re: svn commit: r1150875 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread Daniel Shahaf
This function uses p in two places now, don't you need to re-initialize
it to NULL before the second usage?

s...@apache.org wrote on Mon, Jul 25, 2011 at 20:07:30 -:
> Author: stsp
> Date: Mon Jul 25 20:07:30 2011
> New Revision: 1150875
> 
> URL: http://svn.apache.org/viewvc?rev=1150875&view=rev
> Log:
> * subversion/libsvn_auth_gpg_agent/gpg_agent.c
>   (password_get_gpg_agent): Verify that the agent shares our idea about
>which socket we used to connect to the agent. The GPG-Agent documentation
>says that clients should refuse to connect to an agent with a socket
>name that differs from the client's configuration.
> 
> Modified:
> subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
> 
> Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
> URL: 
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150875&r1=1150874&r2=1150875&view=diff
> ==
> --- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
> +++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
> 20:07:30 2011
> @@ -136,7 +136,7 @@ password_get_gpg_agent(const char **pass
>char *buffer;
>
>apr_array_header_t *socket_details;
> -  char *request = NULL;
> +  const char *request = NULL;
>const char *cache_id = NULL;
>struct sockaddr_un addr;
>const char *tty_name;
> @@ -191,6 +191,47 @@ password_get_gpg_agent(const char **pass
>return FALSE;
>  }
>  
> +  /* The GPG-Agent documentation says:
> +   *  "Clients should deny to access an agent with a socket name which does
> +   *   not match its own configuration". */
> +  request = "GETINFO socket_name\n";
> +  if (write(sd, request, strlen(request)) == -1)
> +{
> +  close(sd);
> +  return FALSE;
> +}
> +  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE))
> +{
> +  close(sd);
> +  return FALSE;
> +}
> +  if (strncmp(buffer, "D", 1) == 0)
> +p = &buffer[2];
> +  if (!p)
> +{
> +  close(sd);
> +  return FALSE;
> +}
> +  ep = strchr(p, '\n');
> +  if (ep != NULL)
> +*ep = '\0';
> +  if (strcmp(socket_name, p) != 0)
> +{
> +  close(sd);
> +  return FALSE;
> +}
> +  /* The agent will terminate its reponse with "OK". */
> +  if (!receive_from_gpg_agent(sd, buffer, BUFFER_SIZE))
> +{
> +  close(sd);
> +  return FALSE;
> +}
> +  if (strncmp(buffer, "OK", 2) != 0)
> +{
> +  close(sd);
> +  return FALSE;
> +}
> +
>/* Send TTY_NAME to the gpg-agent daemon. */
>tty_name = getenv("GPG_TTY");
>if (tty_name != NULL)
> 
> 


svn commit: r1150883 - /subversion/trunk/subversion/libsvn_subr/auth.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 20:21:21 2011
New Revision: 1150883

URL: http://svn.apache.org/viewvc?rev=1150883&view=rev
Log:
* subversion/libsvn_subr/auth.c
  (svn_auth_get_platform_specific_provider): The gpg_agent provider
   only implements the "simple" provider type for now. Do not attempt
   to use it for other types.

Modified:
subversion/trunk/subversion/libsvn_subr/auth.c

Modified: subversion/trunk/subversion/libsvn_subr/auth.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/auth.c?rev=1150883&r1=1150882&r2=1150883&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/auth.c (original)
+++ subversion/trunk/subversion/libsvn_subr/auth.c Mon Jul 25 20:21:21 2011
@@ -392,7 +392,8 @@ svn_auth_get_platform_specific_provider
 
   if (apr_strnatcmp(provider_name, "gnome_keyring") == 0 ||
   apr_strnatcmp(provider_name, "kwallet") == 0 ||
-  apr_strnatcmp(provider_name, "gpg_agent") == 0)
+  (apr_strnatcmp(provider_name, "gpg_agent") == 0 &&
+   strcmp(provider_type, "simple") == 0))
 {
 #if defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_KWALLET) || \
 defined(SVN_HAVE_GPG_AGENT)




svn commit: r1150884 - /subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 20:24:17 2011
New Revision: 1150884

URL: http://svn.apache.org/viewvc?rev=1150884&view=rev
Log:
* subversion/libsvn_auth_gpg_agent/gpg_agent.c
  (password_get_gpg_agent): Reinitialise local variable P to NULL before
   using it a second time.

Found by: danielsh

Modified:
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c?rev=1150884&r1=1150883&r2=1150884&view=diff
==
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c Mon Jul 25 
20:24:17 2011
@@ -332,6 +332,7 @@ password_get_gpg_agent(const char **pass
   if (strncmp(buffer, "ERR", 3) == 0)
 return FALSE;
   
+  p = NULL;
   if (strncmp(buffer, "D", 1) == 0)
 p = &buffer[2];
 




svn commit: r1150924 - /subversion/trunk/tools/client-side/detach.py

2011-07-25 Thread danielsh
Author: danielsh
Date: Mon Jul 25 21:35:28 2011
New Revision: 1150924

URL: http://svn.apache.org/viewvc?rev=1150924&view=rev
Log:
* tools/client-side/detach.py
  (migrate_pristines): Make the regex a bit more liberal.

Tested by: none

Modified:
subversion/trunk/tools/client-side/detach.py

Modified: subversion/trunk/tools/client-side/detach.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/detach.py?rev=1150924&r1=1150923&r2=1150924&view=diff
==
--- subversion/trunk/tools/client-side/detach.py (original)
+++ subversion/trunk/tools/client-side/detach.py Mon Jul 25 21:35:28 2011
@@ -176,7 +176,7 @@ def migrate_pristines(wc_src, target, wc
   src_c = src_conn.cursor()
   dst_c = dst_conn.cursor()
 
-  regex = re.compile('\$((?:md5)|(?:sha1))\$(.*)')
+  regex = re.compile('\$((?:md5 *)|(?:sha1))\$(.*)')
   src_proot = os.path.join(wcroot, '.svn', 'pristine')
   target_proot = os.path.join(target, '.svn', 'pristine')
 




svn commit: r1150950 - in /subversion/trunk: ./ build/generator/ subversion/bindings/swig/ subversion/include/ subversion/libsvn_auth_gpg_agent/ subversion/libsvn_subr/

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 23:00:20 2011
New Revision: 1150950

URL: http://svn.apache.org/viewvc?rev=1150950&view=rev
Log:
Remove libsvn_auth_gpg_agent and move gpg-agent support into libsvn_subr.

There is no need to put gpg-agent support into a library loaded at runtime.
The svn code talks to the GPG agent via a UNIX stream socket.
There are no massive external library dependencies involved that
we need to keep at a distance, as with GNOME or KDE.

This should also fix the problem where svn fails to enable gpg-agent
support on Mac OS X because of a filename mismatch (*.so vs. *.dylib).

* subversion/include/svn_auth.h
  (svn_auth_gpg_agent_version): Remove declaration. A version function
   is only needed for DSOs.
  (svn_auth_get_gpg_agent_simple_provider): Declare this function on Darwin.
   Remove mention of libsvn_auth_gpg_agent from docstring.

* subversion/libsvn_auth_gpg_agent,
  subversion/libsvn_auth_gpg_agent/version.c: Remove.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c: Move to ...

* subversion/libsvn_subr/gpg_agent.c: ... here. Wrap all code into
   the SVN_HAVE_GPG_AGENT define.

* subversion/libsvn_subr/auth.c
  (svn_auth_get_platform_specific_provider): Directly call
   svn_auth_get_gpg_agent_simple_provider() if SVN_HAVE_GPG_AGENT is defined
   instead of loading gpg-agent support as a DSO.

* subversion/bindings/swig/core.i: Remove svn_auth_gpg_agent_version.

* configure.ac,
  build.conf,
  build/generator/gen_make.py,
  build/generator/gen_win.py: Remove references to libsvn_auth_gpg_agent.

Added:
subversion/trunk/subversion/libsvn_subr/gpg_agent.c
  - copied, changed from r1150916, 
subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
Removed:
subversion/trunk/subversion/libsvn_auth_gpg_agent/
Modified:
subversion/trunk/build.conf
subversion/trunk/build/generator/gen_make.py
subversion/trunk/build/generator/gen_win.py
subversion/trunk/configure.ac
subversion/trunk/subversion/bindings/swig/core.i
subversion/trunk/subversion/include/svn_auth.h
subversion/trunk/subversion/libsvn_subr/auth.c

Modified: subversion/trunk/build.conf
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1150950&r1=1150949&r2=1150950&view=diff
==
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Mon Jul 25 23:00:20 2011
@@ -174,14 +174,6 @@ libs = libsvn_client libsvn_ra libsvn_re
 install = bin
 manpages = subversion/svnrdump/svnrdump.1
 
-# Support for GPG Agent
-[libsvn_auth_gpg_agent]]
-description = Subversion GPG Agent library
-type = lib
-install = gpg-agent-lib
-path = subversion/libsvn_auth_gpg_agent
-libs = apr libsvn_subr
-
 # Support for GNOME Keyring
 [libsvn_auth_gnome_keyring]
 description = Subversion GNOME Keyring Library

Modified: subversion/trunk/build/generator/gen_make.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_make.py?rev=1150950&r1=1150949&r2=1150950&view=diff
==
--- subversion/trunk/build/generator/gen_make.py (original)
+++ subversion/trunk/build/generator/gen_make.py Mon Jul 25 23:00:20 2011
@@ -531,8 +531,7 @@ DIR=`pwd`
 ''')
 libdep_cache = {}
 paths = {}
-for lib in ('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet',
-'libsvn_auth_gpg_agent'):
+for lib in ('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet'):
   paths[lib] = self.sections[lib].options.get('path')
 for target_ob in install_sources:
   if not isinstance(target_ob, gen_base.TargetExe):
@@ -564,8 +563,7 @@ DIR=`pwd`
 for lib in self._get_all_lib_deps(lib_name, libdep_cache, paths):
   libs.add(lib)
   if target_name == 'libsvn_subr':
-libs.update(('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet',
- 'libsvn_auth_gpg_agent'))
+libs.update(('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet'))
   libdep_cache[target_name] = sorted(libs)
 return libdep_cache[target_name]
 

Modified: subversion/trunk/build/generator/gen_win.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1150950&r1=1150949&r2=1150950&view=diff
==
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Mon Jul 25 23:00:20 2011
@@ -91,8 +91,7 @@ class GeneratorBase(gen_base.GeneratorBa
 self.skip_sections = { 'mod_dav_svn': None,
'mod_authz_svn': None,
'libsvn_auth_kwallet': None,
-   'libsvn_auth_gnome_keyring': None,
-   'libsvn_auth_gpg_agent': None }
+   'libsvn_auth_gnome_keyring': None }
 
 # Instrumentation options
 self.disable_shared = None

Modified: subver

svn commit: r1150952 - /subversion/trunk/subversion/libsvn_subr/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 23:07:56 2011
New Revision: 1150952

URL: http://svn.apache.org/viewvc?rev=1150952&view=rev
Log:
* subversion/libsvn_subr/gpg_agent.c: Wrap everything in this file
   within #ifndef WIN32 to avoid build problems on Windows.

Modified:
subversion/trunk/subversion/libsvn_subr/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_subr/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/gpg_agent.c?rev=1150952&r1=1150951&r2=1150952&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_subr/gpg_agent.c Mon Jul 25 23:07:56 2011
@@ -27,6 +27,8 @@
 
 /*** Includes. ***/
 
+#ifndef WIN32
+
 #include 
 
 #include 
@@ -424,3 +426,4 @@ svn_auth_get_gpg_agent_simple_provider
 }
 
 #endif /* SVN_HAVE_GPG_AGENT */
+#endif /* !WIN32 */




svn commit: r1150954 - in /subversion/trunk/subversion: include/svn_auth.h libsvn_subr/auth.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 23:25:39 2011
New Revision: 1150954

URL: http://svn.apache.org/viewvc?rev=1150954&view=rev
Log:
Move gpg-agent behind GNOME Keyring, Kwallet, and Keychain, by default.
We don't want to disturb existing setups that use existing password
caching mechanisms on *NIX systems.

* subversion/include/svn_auth.h
  (svn_auth_get_platform_specific_provider): Document the new default order.

* subversion/libsvn_subr/auth.c
  (svn_auth_get_platform_specific_client_providers): Add a new macro
   SVN__DEFAULT_AUTH_PROVIDER_LIST that expands to the default list
   of auth providers (previously the list was listed twice).
   Change the list to reflect the priority order described above.

Modified:
subversion/trunk/subversion/include/svn_auth.h
subversion/trunk/subversion/libsvn_subr/auth.c

Modified: subversion/trunk/subversion/include/svn_auth.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_auth.h?rev=1150954&r1=1150953&r2=1150954&view=diff
==
--- subversion/trunk/subversion/include/svn_auth.h (original)
+++ subversion/trunk/subversion/include/svn_auth.h Mon Jul 25 23:25:39 2011
@@ -818,9 +818,9 @@ svn_auth_get_platform_specific_provider(
  *
  * Default order of the platform-specific authentication providers:
  *   1. gnome-keyring
- *   2. gpg-agent
- *   3. kwallet
- *   4. keychain
+ *   2. kwallet
+ *   3. keychain
+ *   4. gpg-agent
  *   5. windows-cryptoapi
  *
  * @since New in 1.6.

Modified: subversion/trunk/subversion/libsvn_subr/auth.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/auth.c?rev=1150954&r1=1150953&r2=1150954&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/auth.c (original)
+++ subversion/trunk/subversion/libsvn_subr/auth.c Mon Jul 25 23:25:39 2011
@@ -500,6 +500,9 @@ svn_auth_get_platform_specific_client_pr
   apr_array_header_t *password_stores;
   int i;
 
+#define SVN__DEFAULT_AUTH_PROVIDER_LIST \
+ "gnome-keyring,kwallet,keychain,gpg-agent,windows-cryptoapi"
+
   if (config)
 {
   svn_config_get
@@ -507,12 +510,11 @@ svn_auth_get_platform_specific_client_pr
  &password_stores_config_option,
  SVN_CONFIG_SECTION_AUTH,
  SVN_CONFIG_OPTION_PASSWORD_STORES,
- "gpg-agent,gnome-keyring,kwallet,keychain,windows-cryptoapi");
+ SVN__DEFAULT_AUTH_PROVIDER_LIST);
 }
   else
 {
-  password_stores_config_option =
-"gpg-agent,gnome-keyring,kwallet,keychain,windows-cryptoapi";
+  password_stores_config_option = SVN__DEFAULT_AUTH_PROVIDER_LIST;
 }
 
   *providers = apr_array_make(pool, 12, sizeof(svn_auth_provider_object_t *));




svn commit: r1150958 - /subversion/trunk/subversion/tests/libsvn_subr/auth-test.c

2011-07-25 Thread stsp
Author: stsp
Date: Mon Jul 25 23:40:35 2011
New Revision: 1150958

URL: http://svn.apache.org/viewvc?rev=1150958&view=rev
Log:
* subversion/tests/libsvn_subr/auth-test.c
  (test_platform_specific_auth_providers): Now that gpg-agent support is
   linked into libsvn_subr, this test will find it if SVN_HAVE_GPG_AGENT
   is defined. Adjust test expectations accordingly.

Modified:
subversion/trunk/subversion/tests/libsvn_subr/auth-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/auth-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/auth-test.c?rev=1150958&r1=1150957&r2=1150958&view=diff
==
--- subversion/trunk/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/auth-test.c Mon Jul 25 
23:40:35 2011
@@ -54,6 +54,9 @@ test_platform_specific_auth_providers(ap
 #ifdef SVN_HAVE_KWALLET
   number_of_providers += 2;
 #endif
+#ifdef SVN_HAVE_GPG_AGENT
+  number_of_providers += 1;
+#endif
 #ifdef SVN_HAVE_KEYCHAIN_SERVICES
   number_of_providers += 2;
 #endif




svn commit: r1150961 - /subversion/trunk/subversion/libsvn_subr/gpg_agent.c

2011-07-25 Thread stsp
Author: stsp
Date: Tue Jul 26 00:05:09 2011
New Revision: 1150961

URL: http://svn.apache.org/viewvc?rev=1150961&view=rev
Log:
* subversion/libsvn_subr/gpg_agent.c
  (password_get_gpg_agent): While having the CLI prompt and GPG-Agent prompt
   match up is kind of neat, we should try to minimise the risk of someone
   entering a PGP passphrase into the GPG-Agent dialog.
   So say "Enter your Subversion password for ", instead of
   "Authentication realm: ". Hopefully that is clear enough to
   prevent bad mistakes.  Also, remove a comment that is now obsolete.

Suggested by: danielsh

Modified:
subversion/trunk/subversion/libsvn_subr/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_subr/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/gpg_agent.c?rev=1150961&r1=1150960&r2=1150961&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_subr/gpg_agent.c Tue Jul 26 00:05:09 2011
@@ -304,17 +304,12 @@ password_get_gpg_agent(const char **pass
pool);
   cache_id = svn_checksum_to_cstring(digest, pool);
 
-  /* A newline is required to terminate the GET_PASSPHRASE command.
-   * We append it to REALM_PROMPT because it is the last argument of
-   * the format string below, and because both of the prompt strings
-   * already exist elsewhere in this exact form so they will only
-   * have to be translated once for i18n. */
   password_prompt = apr_psprintf(pool, _("Password for '%s': "), username);
-  realm_prompt = apr_psprintf(pool, _("Authentication realm: %s\n"),
+  realm_prompt = apr_psprintf(pool, _("Enter your Subversion password for %s"),
   realmstring);
   request = apr_psprintf(pool,
  "GET_PASSPHRASE --data %s--repeat=1 "
- "%s X %s %s",
+ "%s X %s %s\n",
  non_interactive ? "--no-ask " : "",
  cache_id,
  escape_blanks(password_prompt),