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

Workaround to dataloss problem from lack of atomic renames

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: trunk
    • Fix Version/s: ---
    • Component/s: contrib/svnmerge.py
    • Labels:
      None

      Description

      Workaround to handle at least some variants of the lack of atomic renames (bug
      #898).  Specifically: for preserving file changes and revision log comments 
      across a merge that includes renames.  
      
      The basic idea is that in action_merge(), where just before the svnmerge.py
      script calls this:
          svn_command("merge ‑‑force ‑r
      ..I added a call to check_for_changes_to_preserve_across_merge(). This
      function, and the functions it depends on, determine from "merge
      ‑‑dry‑run" output whether there are any matching "add/delete" pairs of
      statements (representing renames) about to be applied, and for each of
      those renames, determines from logs what file edits (diffs) and comments
      would be lost due to the merge's deleting that file and replacing it. It
      saves the diffs to temporary patch files, accumulates the comments, and
      returns  the information back to action_merge().  Later in
      action_merge(), for each file where  edits were lost by the merge, it
      applies the proper patch, and appends the otherwise "lost" comments to
      the file svnmerge‑commit‑message.txt.
      
      There is much more detail on the atomic renames problem linked from here: 
      http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=127146
      
      ...and the discussion so far on this patch, at the threads starting w/ these links:
      http://www.orcaware.com/pipermail/svnmerge/2007-June/000923.html
      http://www.orcaware.com/pipermail/svnmerge/2007-June/000924.html
      http://www.orcaware.com/pipermail/svnmerge/2007-June/000925.html
      http://www.orcaware.com/pipermail/svnmerge/2007-June/000927.html
      ...and in an attachment I"ll add (email not shown on orcaware for some reason).
      

      Original issue reported by lacall

        Attachments

          Activity

            People

            • Assignee:
              blair Blair Zajac
              Reporter:
              subversion-importer Subversion Importer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: