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

Odd status editor bug (yo, CMike)

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2003-12-28 18:51:27 CET

I'm testing some new transaction-free report-processing code I've
written (not for 1.0; I think it's pretty neat, but it's a gigantic
code bomb), and one of its oddities relative to the old code is that
it might call open_root and then close_edit without actually doing
anything. I figured, that should be no big deal, right?

Well, it uncovered a bug in the status editor. In
libsvn_wc/status.c:close_directory(), currently at line 1339, the code
checks to see if the target directory hasn't been handled yet. There
are a couple of bugs in this code; they are easily fixed (see patch at
end), but I'm thinking maybe that whole section of code should be
nuked. If the server never said anything about the target, that's the
same as if the server never even opened the root, right? So why do
anything at all?

(CMike appears to have written this code, thus the subject.)

Index: status.c
--- status.c (revision 8108)
+++ status.c (working copy)
@@ -1350,14 +1350,15 @@
                   svn_wc_adm_access_t *dir_access;
                   SVN_ERR (svn_wc_adm_retrieve (&dir_access, eb->adm_access,
- eb->target, pool));
+ path, pool));
                   SVN_ERR (get_dir_status
                            (eb, tgt_status->entry, dir_access, NULL,
                             eb->ignores, TRUE, eb->get_all, eb->no_ignore,
                             TRUE, eb->status_func, eb->status_baton,
                             eb->cancel_func, eb->cancel_baton, pool));
- (eb->status_func) (eb->status_baton, path, tgt_status);
+ if (is_sendable_status (tgt_status, eb))
+ (eb->status_func) (eb->status_baton, path, tgt_status);

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 28 18:52:07 2003

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.