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

Support all-or-nothing mode when locking multiple files

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: trunk
    • Fix Version/s: 1.10-consider
    • Component/s: libsvn_fs
    • Labels:

      Description

      The following question came from Eric Miller <Eric.Miller@amd.com>:
      
         Is there a way to get svn_client_lock to do an all-or-nothing lock?
         Right now when it encounters an error during lock the function gives
         a warning but keeps locking.
      
         For instance:
      
           user1% svn lock a
           user2% svn lock a b
           svn: warning: Path '/trunk/a' is already locked by user 'user1 in
      filesystem '/svn/test/db'
           'b' locked by user 'user2.
      
         Is this a bug or intended behavior?   I can see this being useful for
         collections of binary data.
      
      Answers included this from me:
      
         Nope.  Locks aren't protected by atomicity guarantees outside what is
         required to maintain the integrity of the backend storage.  The
         repository APIs only permit locking one path at a time, and no other
         layer of interface between client and repository currently attempts to
         corral multiple path-lock attempts under the umbrella of all-or-nothingness.
      
      And this from Ben Collins-Sussman:
      
         Yeah, this use-case just didn't cross our minds when we designed the
         feature.  It's certainly a feature that could be added in the future,
         if there were enough demand.
      

      http://svn.collab.net/viewvc/svn/branches/issue-2699-dev

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cmpilato C. Michael Pilato
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: