You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Gillespie <ep...@pretzelnet.org> on 2008/04/10 06:03:11 UTC

Proposed mod-dav-svn operational log change for 1.5.0-rc1

It's starting to look like we'll have an rc2, if for nothing else
than the svnsync compatibility regression.  Neither of these are
release blockers; sticking with the current format isn't the end
of the world.  But if we do an rc2, I'd like to sneak two more
mod-dav-svn operational log changes in before we finalize 1.5 and
(IMHO) declare this something we'll stay backwards-compatible
with (not forward-compatible).  I discovered these in working on
similar logging for svnserve.

I haven't verified that I didn't break the logs with these
patches; I'll do that tomorrow.  The second should be fine, but I
may have hosed the if logic in this first one.

1. Don't log from revision for switch.  This is as meaningless as
   a from revision for update (which we don't log); the working
   copy is almost certainly more mixed-rev.

Index: subversion/mod_dav_svn/reports/update.c
===================================================================
--- subversion/mod_dav_svn/reports/update.c	(revision 30478)
+++ subversion/mod_dav_svn/reports/update.c	(working copy)
@@ -1330,26 +1330,33 @@ dav_svn__update_report(const dav_resource *resourc
     if (dst_path)
       {
         /* diff/merge don't ask for inline text-deltas. */
-        if (!uc.send_all && strcmp(spath, dst_path) == 0)
+        if (uc.send_all)
           action = apr_psprintf(resource->pool,
-                                "diff %s r%ld:%ld%s%s",
+                                "switch %s %s@%ld%s",
                                 svn_path_uri_encode(spath, resource->pool),
-                                from_revnum,
-                                revnum, log_depth,
-                                ignore_ancestry ? " ignore-ancestry" : "");
+                                svn_path_uri_encode(dst_path, resource->pool),
+                                revnum, log_depth);
         else
-          action = apr_psprintf(resource->pool,
-                                "%s %s@%ld %s@%ld%s%s",
-                                (uc.send_all ? "switch" : "diff"),
-                                svn_path_uri_encode(spath, resource->pool),
-                                from_revnum,
-                                svn_path_uri_encode(dst_path, resource->pool),
-                                revnum, log_depth,
-                                /* ignore-ancestry only applies to merge, and
-                                   we use uc.send_all to know if this is a
-                                   diff/merge or not. */
-                                (!uc.send_all && ignore_ancestry
-                                 ? " ignore-ancestry" : ""));
+          {
+            if (strcmp(spath, dst_path) == 0)
+              action = apr_psprintf(resource->pool,
+                                    "diff %s r%ld:%ld%s%s",
+                                    svn_path_uri_encode(spath, resource->pool),
+                                    from_revnum,
+                                    revnum, log_depth,
+                                    ignore_ancestry ? " ignore-ancestry" : "");
+            else
+              action = apr_psprintf(resource->pool,
+                                    "diff %s@%ld %s@%ld%s%s",
+                                    svn_path_uri_encode(spath, resource->pool),
+                                    from_revnum,
+                                    svn_path_uri_encode(dst_path,
+                                                        resource->pool),
+                                    revnum, log_depth,
+                                    (ignore_ancestry
+                                     ? " ignore-ancestry"
+                                     : ""));
+          }
       }
 
     /* Otherwise, it must be checkout, export, update, or status -u. */

2. Make lock and unlock use parentheses to support multiple
   paths.  I know dav-svn doesn't support multiple paths so it
   will always be one between the parens.  So what?  On the
   svnserve-logging branch I currently write out many separate
   lock or unlock lines for the lock_many and unlock_many calls.
   That's not the worst thing in the world, but I think using
   parens for multiple paths is better.

Index: subversion/mod_dav_svn/lock.c
===================================================================
--- subversion/mod_dav_svn/lock.c	(revision 30478)
+++ subversion/mod_dav_svn/lock.c	(working copy)
@@ -760,7 +760,7 @@ append_locks(dav_lockdb *lockdb,
   /* Log the locking as a 'high-level' action. */
   dav_svn__operational_log(resource->info,
                            apr_psprintf(resource->info->r->pool,
-                                        "lock %s%s",
+                                        "lock (%s)%s",
                                         svn_path_uri_encode(slock->path,
                                                  resource->info->r->pool),
                                         info->lock_steal ? " steal" : ""));
@@ -848,7 +848,7 @@ remove_lock(dav_lockdb *lockdb,
       /* Log the unlocking as a 'high-level' action. */
       dav_svn__operational_log(resource->info,
                                apr_psprintf(resource->info->r->pool,
-                                 "unlock %s%s",
+                                 "unlock (%s)%s",
                                  svn_path_uri_encode(resource->info->repos_path,
                                                      resource->info->r->pool),
                                             info->lock_break ? " break" : ""));

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Proposed mod-dav-svn operational log change for 1.5.0-rc1

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> I haven't verified that I didn't break the logs with these
> patches; I'll do that tomorrow.  The second should be fine, but I
> may have hosed the if logic in this first one.

Verified, committed, and nominated for backport.  If we don't
backport for 1.5.0, I'll rollback on trunk.

-- 
Eric Gillespie <*> epg@pretzelnet.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org