~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to notes/locking/ra_dav_strategy.txt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
    How we will extend ra_dav/mod_dav_svn protocol for locking feature
 
2
    ==================================================================
 
3
 
 
4
 
 
5
RA->lock()
 
6
 
 
7
     * send http LOCK request with 2 custom headers:
 
8
 
 
9
         - force flag
 
10
         - working-revnum (for OOD check)
 
11
 
 
12
     * mod_dav_svn should call authz_read func on path, if it exists.
 
13
 
 
14
     * generate http LOCK response, which includes standard body that
 
15
       describes almost all the svn_lock_t fields.
 
16
 
 
17
         - add one custom response header:  creation-date
 
18
 
 
19
     * what if older server?  just returns '405 Method not Allowed'.
 
20
 
 
21
 
 
22
RA->unlock()
 
23
 
 
24
     * send http UNLOCK request with 1 custom header:
 
25
 
 
26
         - force flag
 
27
 
 
28
     * mod_dav_svn should call authz_read func on path, if it exists.
 
29
 
 
30
     * generate http UNLOCK response:  success == "204 no content"
 
31
 
 
32
     * what if older server?  just returns '405 Method not Allowed'.
 
33
 
 
34
----
 
35
 
 
36
RA->get_lock()
 
37
 
 
38
     * do a depth-0 PROPFIND for DAV:lockdiscovery property
 
39
 
 
40
     * mod_dav_svn should call authz_read func on path, if it exists.
 
41
 
 
42
     * response is the same as what comes back in a LOCK response  --
 
43
       a standard property value that describes almost all the
 
44
       svn_lock_t fields. 
 
45
 
 
46
         - add one custom response header:  X-SVN-creation-date
 
47
 
 
48
     * what if older server?  just returns '404 Not Found'.
 
49
 
 
50
 
 
51
RA->get_locks()
 
52
 
 
53
     * custom REPORT request.
 
54
 
 
55
     * mod_dav_svn should call svn_repos_fs_get_locks(), because it
 
56
       automatically uses the authz_read func to screen out paths.
 
57
 
 
58
     * custom response.
 
59
 
 
60
     * what if older server?  return some sort of 4XX response and
 
61
       error indicating the report-type is unknown.
 
62
        
 
63
     *** NOTE: a dumb client can achieve the exact same effect by
 
64
         doing a depth-infinity PROPFIND for the 'DAV:lockdiscovery'
 
65
         property.  But this causes mod_dav_svn to do an O(N)
 
66
         traversal of the repository, running svn_fs_get_lock() on
 
67
         each path!  Much, *much* slower than allowing fs_get_locks()
 
68
         to do a partial-key database lookup!
 
69
 
 
70
 
 
71
 
 
72
RA->get_commit_editor2()
 
73
 
 
74
     * stash the incoming hash of tokens.
 
75
 
 
76
     * every time we do a CHECKOUT, PUT, COPY, DELETE, PROPPATCH of a
 
77
       file path, look to see if there's a token available in the
 
78
       hash.  If so, put it in the If: header of the request.
 
79
 
 
80
     * send *all* tokens in the If: header of the final MERGE request.
 
81
 
 
82
          -- also send either a new XML body element, or custom
 
83
             header, indicating whether to 'keep_locks' or not.
 
84
 
 
85
     * what if older server?  meaningless.  why would you have the
 
86
       tokens in the first place.  And anyway, the If: tokens will be
 
87
       ignored anyway if the server isn't paying attention to locking.