Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-999

anchor/target split may use NULL for target

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: all
    • Fix Version/s: 1.0-consider
    • Component/s: libsvn_wc
    • Labels:
      None

      Description

      svn_wc_get_actual_target() will place NULL in target when the
      passed-in path is a directory.  This is inconsistent with the practice
      of using "" as a non-operative path element.
      
      As a result of this inconsistency, a number of functions allow or
      require target paths to be NULL for the case where anchor+target =
      anchor, including:
      
        ra_lib->do_{update,switch,status,diff}
        svn_wc_get_update_editor
        svn_wc_diff
        svn_wc_get_switch_editor
        directory_elements_diff (libsvn_wc/diff.c)
        svn_wc_get_status_editor (some confusing code here)
        do_diff (libsvn_client/diff.c)
        svn_client_commit
        svn_cl__commit
        svn_repos_dir_delta
      
      This problem can be fixed in two phases:
       
      Phase 1: Adjust svn_wc_get_actual_path to return "" for a
      non-operative target.  Fix all code to allow for, if not demand, "" as
      a non-operative target path.
      
      Phase 2: Fix all code to demand "" as a non-operative target path.
      
      I took a stab at phase 1, but found that the fingers were very
      complicated.  I will attach the patch I wound up with, but it still
      fails "make check" in the diff tests.
      

        Attachments

        1. 1_t.txt
          7 kB
          Greg Hudson
        2. 2_diff.txt
          27 kB
          Greg Hudson
        3. 3_diff.txt
          27 kB
          Greg Hudson
        4. 4_diff.txt
          30 kB
          Greg Hudson
        5. 5_diff.txt
          31 kB
          Greg Hudson
        6. 6_diff.txt
          31 kB
          Greg Hudson

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ghudson Greg Hudson
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: