Hi Arwin. On Wed, 2010-12-15, Arwin Arni wrote: > Removed a redundant member (added_with_history) from the file baton > and removed *relevent* unreachable code. > > * subversion/libsvn_wc/update_editor.c > (struct file_baton): Removed 'added_with_history'. > (merge_file, close_file): Removed unreachable code. > > Index: subversion/libsvn_wc/update_editor.c > =================================================================== > --- subversion/libsvn_wc/update_editor.c (revision 1049559) > +++ subversion/libsvn_wc/update_editor.c (working copy) > @@ -908,9 +908,6 @@ > /* Set if this file is new. */ > svn_boolean_t adding_file; > > - /* Set if this file is new with history. */ > - svn_boolean_t added_with_history; > - > /* Set if an unversioned file of the same name already existed in > this directory. */ > svn_boolean_t obstruction_found; > @@ -3859,7 +3856,7 @@ > svn_node_kind_t wfile_kind; > > SVN_ERR(svn_io_check_path(fb->local_abspath, &wfile_kind, > pool)); > - if (wfile_kind == svn_node_none && ! > fb->added_with_history) > + if (wfile_kind == svn_node_none) > { > /* working file is missing?! > Just copy the new text-base to the file. */ > @@ -3890,14 +3887,6 @@ > path_ext = ""; > } > > - /* Create strings representing the revisions of the > - old and new text-bases. */ > - /* Either an old version, or an add-with-history */ > - if (fb->added_with_history) > - oldrev_str = apr_psprintf(pool, ".copied%s%s", > - *path_ext ? "." : "", > - *path_ext ? path_ext : ""); > - else > { > svn_revnum_t old_rev = revision; > > @@ -4137,14 +4126,6 @@ > SVN_ERR_ASSERT(new_text_base_md5_checksum && > new_text_base_sha1_checksum); > } > - else if (fb->added_with_history) > - { > - SVN_ERR_ASSERT(! fb->new_text_base_sha1_checksum); > - new_text_base_md5_checksum = fb->copied_text_base_md5_checksum; > - new_text_base_sha1_checksum = > fb->copied_text_base_sha1_checksum; > - SVN_ERR_ASSERT(new_text_base_md5_checksum && > - new_text_base_sha1_checksum); > - } > else > { > SVN_ERR_ASSERT(! fb->new_text_base_sha1_checksum
Thanks. I updated the comment just above this code: r1049948. This whole block can now be simplified to just an assertion check, and the local checksum variables eliminated: r1050083. I noticed as well that since the "copy from" functionality was removed in r998193, lots more code that "uses" these "copied_*" checksums and filenames is redundant too, since they are never set. I'll remove the rest of the redundant code soon. This is good news because it means a considerable simplification, which will bring this file back a bit closer to being maintainable. (I have previously found these twists and turns have caused me considerable difficulty in trying to maintain this code.) - Julian