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

New option --remove-unversioned-files to cleanup

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • ---
    • 1.9.0
    • libsvn_client

    Description

      Summary:
      I would like to have a new option --remove-unversioned-files to svn cleanup. When calling 
      
        svn cleanup --remove-unversioned-files PATH
      
      using this option it would -- in addition to cleanup already performed today -- traverse the working 
      copy at PATH and remove all unversioned files and directories found.
      
      Usecase:
      My primary usecase where I would like to be able to use this new option is a period merge of trunk into 
      a branch. Best practices for this use case require having a clean, up-to-date working copy of the 
      branch. Often, after cleaning up and updating, my working copy contains artifacts created from 
      automatic tests, which I neither want to keep nor commit into the repository. In this situation it would 
      be very handy to have this option.
      
      Other solutions:
      Many users I have talked to have written custom scripts performing this task such as
      
        svn status | grep '^?' | awk '{print $2}' | xargs rm -rf
      
      I argue that svn support of --remove-unversioned-files would be a safer alternative. Scripts like the 
      one above are error prone (this one contains a bug when the working copy contains paths with spaces).
      
      Other users checkout separate working copies which are used exclusively for merging.
      
      References:
      http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2429229 
      
      It would be awesome if this enhancement made it into a future version of subversion.
      

      Original issue reported by tobiashahn

      Attachments

        Activity

          People

            Unassigned Unassigned
            subversion-importer Subversion Importer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: