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

Avoid copies in mixed-revision working copies by default and add --allow-mixed-revisions for copy

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.13.0
    • Fix Version/s: None
    • Component/s: cmdline client
    • Labels:
      None
    • Environment:

      Any platform, testing on GNU/Linux command line.

      Description

      As agreed in the IRC discussion, I hereby suggest adding a check to the copy command for a mixed-revision working copy just like for the merge command, including the switch --allow-mixed-revisions with the same semantics.

      The motivation is that this procedure will break on the merge with a bogus tree conflict:

      svnadmin create repo
      svn co file://`pwd`/repo wc
      cd wc
      svn mkdir A
      svn commit -m m
      echo content > A/file
      svn add A/file
      svn commit -m m
      # An svn up here would fix things.
      svn copy A B
      svn commit -m m
      # Merge would also fail without any change to merge.
      echo content >> A/file
      svn commit -m m
      svn merge ^/A B
      

      If the copy operation would check for the mixed-revision working copy and bail out like merge does, the user might think again and do svn up, then svn copy and have no unjustified tree conflict in the merge.

      Of course svn copy ^/A B would also work, but I do see no value in the inconsistency of having to use URLs for an operation that has all paths in the current wc, especially when in the current situation, the simpler alternative just works without further notice and shoots you in the foot only when you attempt to merge later on.

      The implementation is hopefully easy, lifting the operation from svn merge.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              drhpc Thomas Orgis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: