[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Eric Gillespie <epg_at_pretzelnet.org>
Date: Wed, 09 Apr 2008 23:03:11 -0700

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_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-10 08:03:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.