subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ne...@apache.org
Subject svn commit: r1164929 - /subversion/trunk/subversion/libsvn_client/externals.c
Date Sat, 03 Sep 2011 21:17:47 GMT
Author: neels
Date: Sat Sep  3 21:17:47 2011
New Revision: 1164929

URL: http://svn.apache.org/viewvc?rev=1164929&view=rev
Log:
Remove a code duplication.

* subversion/libsvn_client/externals.c
  (handle_external_item_change):
    Move out identical code that both 'if' and 'else' block start with.

Modified:
    subversion/trunk/subversion/libsvn_client/externals.c

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1164929&r1=1164928&r2=1164929&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Sat Sep  3 21:17:47 2011
@@ -879,17 +879,21 @@ handle_external_item_change(const struct
      the global case is hard, and it should be pretty obvious to a
      user when it happens.  Worst case: your disk fills up :-). */
 
+  /* First notify that we're about to handle an external. */
+  if (eb->ctx->notify_func2)
+    {
+      (*eb->ctx->notify_func2)(
+         eb->ctx->notify_baton2,
+         svn_wc_create_notify(local_abspath,
+                              svn_wc_notify_update_external,
+                              scratch_pool),
+         scratch_pool);
+    }
+
   if (! old_defining_abspath)
     {
       /* This branch is only used during a checkout or an export. */
 
-      /* First notify that we're about to handle an external. */
-      if (eb->ctx->notify_func2)
-        (*eb->ctx->notify_func2)(
-           eb->ctx->notify_baton2,
-           svn_wc_create_notify(local_abspath, svn_wc_notify_update_external,
-                                scratch_pool), scratch_pool);
-
       switch (ra_cache.kind)
         {
         case svn_node_dir:
@@ -932,18 +936,6 @@ handle_external_item_change(const struct
     {
       /* This branch handles a definition change or simple update. */
 
-      /* First notify that we're about to handle an external. */
-      if (eb->ctx->notify_func2)
-        {
-          svn_wc_notify_t *nt;
-
-          nt = svn_wc_create_notify(local_abspath,
-                                    svn_wc_notify_update_external,
-                                    scratch_pool);
-
-          eb->ctx->notify_func2(eb->ctx->notify_baton2, nt, scratch_pool);
-        }
-
       /* Either the URL changed, or the exact same item is present in
          both hashes, and caller wants to update such unchanged items.
          In the latter case, the call below will try to make sure that



Mime
View raw message