Hi All,
Sorry for a week of delay. Needed some time to understand the context of
'switch/diff-or-merge' commands. That kept me away from completeing this
activity.
Now it is done.
Find the attached patch and log.
With regards
Kamesh Jayachandran
Daniel Rall wrote:
> I responded to this patch on Fri, 29 Dec:
>
> http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=122483
>
> I'm basically waiting for a response and/or adjusted patch, but do
> think something like this should be committed.
>
>
> Kamesh sent in another similar patch as well:
>
> http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=122383
>
> I like the idea of this one too, but haven't tested it out. It would
> be great if 'davautocheck' would activate operational logging, and we
> had tests which validated that the log file was getting written as
> expected. I'm not sure how this would work with vanilla 'davcheck' --
> perhaps we just start requiring that operational logging be active?
>
> - Dan
>
>
> On Thu, 04 Jan 2007, Hyrum K. Wright wrote:
>
>
>> Kamesh Jayachandran wrote:
>>
>>> Hi All,
>>> Find the attached patch and log.
>>>
>>> With regards
>>> Kamesh Jayachandran
>>>
>> Ping...
>>
>> Anybody had a chance to look at this yet? I'll file an issue if nothing
>> happens in the next few days.
>>
>> -Hyrum
>>
>>
>>> ------------------------------------------------------------------------
>>>
>>> [[[
>>>
>>> Checkout/export and Update should should log the revnum too.
>>>
>>> * subversion/mod_dav_svn/reports/update.c
>>> (dav_svn__update_report):
>>> Log revnum for checkout/export and update.
>>>
>>> Patch by: kameshj
>>> Suggested by: Honey George <george@collab.net>
>>>
>>> ]]]
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> Index: subversion/mod_dav_svn/reports/update.c
>>> ===================================================================
>>> --- subversion/mod_dav_svn/reports/update.c (revision 22777)
>>> +++ subversion/mod_dav_svn/reports/update.c (working copy)
>>> @@ -1280,15 +1280,16 @@
>>> reports it (and it alone) to the server as being empty. */
>>> if (entry_counter == 1 && entry_is_empty)
>>> action = apr_psprintf(resource->pool,
>>> - "checkout-or-export '%s'",
>>> - svn_path_uri_encode(spath, resource->pool));
>>> + "checkout-or-export '%s' r%" SVN_REVNUM_T_FMT,
>>> + svn_path_uri_encode(spath, resource->pool),
>>> + revnum);
>>> else
>>> {
>>> if (text_deltas)
>>> action = apr_psprintf(resource->pool,
>>> - "update '%s'",
>>> - svn_path_uri_encode(spath,
>>> - resource->pool));
>>> + "update '%s' r%" SVN_REVNUM_T_FMT,
>>> + svn_path_uri_encode(spath, resource->pool),
>>> + revnum);
>>> else
>>> action = apr_psprintf(resource->pool,
>>> "remote-status '%s'",
>>>
>
>
>
[[[
Checkout,export, (status -u) and Update should log the revnum too.
For diff/merge,
If src_path and dest_path is same we log as
diff-or-merge '/canonical/path' rSTART:END
Else
diff-or-merge '/canonical/src_path@START' '/canonical/dest_path@END'
For switch,
switch '/canonical/src_path@START' '/canonical/dest_path@END'
* subversion/mod_dav_svn/reports/update.c
(dav_svn__update_report): Enhance operational logging as mentioned above for
"diff/merge/switch/update/checkout/export/'status -u'".
Patch by: kameshj
Suggested by: Honey George <george@collab.net>
dlr
]]]
Index: subversion/mod_dav_svn/reports/update.c
===================================================================
--- subversion/mod_dav_svn/reports/update.c (revision 22912)
+++ subversion/mod_dav_svn/reports/update.c (working copy)
@@ -902,6 +902,7 @@
void *rbaton = NULL;
update_ctx_t uc = { 0 };
svn_revnum_t revnum = SVN_INVALID_REVNUM;
+ svn_revnum_t start_rev = SVN_INVALID_REVNUM; /*Used for operational logging*/
int ns;
int entry_counter = 0;
svn_boolean_t entry_is_empty = FALSE;
@@ -1202,7 +1203,9 @@
/* get cdata, stripping whitespace */
path = dav_xml_get_cdata(child, subpool, 0);
-
+ if (!strcmp(path, ""))
+ start_rev = rev;
+
if (! linkpath)
serr = svn_repos_set_path2(rbaton, path, rev,
start_empty, locktoken, subpool);
@@ -1262,15 +1265,28 @@
must have been switch, diff, or merge. */
if (dst_path)
{
+ char *cmd_name = "diff-or-merge";
+
/* diff/merge don't ask for inline text-deltas. */
if (uc.send_all)
+ cmd_name = "switch";
+
+ if (!strcmp(spath, dst_path) && !uc.send_all)
action = apr_psprintf(resource->pool,
- "switch '%s' '%s'",
- spath, dst_path);
+ "diff-or-merge '%s' r%" SVN_REVNUM_T_FMT \
+ ":%" SVN_REVNUM_T_FMT,
+ svn_path_uri_encode(spath, resource->pool),
+ start_rev,
+ revnum);
else
action = apr_psprintf(resource->pool,
- "diff-or-merge '%s' '%s'",
- spath, dst_path);
+ "%s '%s@%" SVN_REVNUM_T_FMT "'" \
+ " '%s@%" SVN_REVNUM_T_FMT "'",
+ cmd_name,
+ svn_path_uri_encode(spath, resource->pool),
+ start_rev,
+ svn_path_uri_encode(dst_path, resource->pool),
+ revnum);
}
/* Otherwise, it must be checkout, export, or update. */
@@ -1280,20 +1296,21 @@
reports it (and it alone) to the server as being empty. */
if (entry_counter == 1 && entry_is_empty)
action = apr_psprintf(resource->pool,
- "checkout-or-export '%s'",
- svn_path_uri_encode(spath, resource->pool));
+ "checkout-or-export '%s' r%" SVN_REVNUM_T_FMT,
+ svn_path_uri_encode(spath, resource->pool),
+ revnum);
else
{
if (text_deltas)
action = apr_psprintf(resource->pool,
- "update '%s'",
- svn_path_uri_encode(spath,
- resource->pool));
+ "update '%s' r%" SVN_REVNUM_T_FMT,
+ svn_path_uri_encode(spath, resource->pool),
+ revnum);
else
action = apr_psprintf(resource->pool,
- "remote-status '%s'",
- svn_path_uri_encode(spath,
- resource->pool));
+ "remote-status '%s' r%" SVN_REVNUM_T_FMT,
+ svn_path_uri_encode(spath, resource->pool),
+ revnum);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 5 11:34:05 2007