docs/src/lock.md

changeset 265
ee9e63c437c4
child 282
3070d72f54af
equal deleted inserted replaced
264:94c0a938b66c 265:ee9e63c437c4
1 dav lock
2 ========
3
4 **`lock [-pc] <url>`**
5
6 Creates a lock on the resource specified by the url. The lock is an exclusive write lock with infinity depth.
7
8 If the resource is successfully locked, a lock token for this resource is printed on stdout. This lock token should be saved somewhere to unlock the resource eventually.
9
10 **`-p`** disable file name and path decryption if enabled
11
12 **`-c`** enable file name and path decryption
13
14 ### Example 1: lock resource and use the lock token
15
16 $ dav lock myserv/resource
17 opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37
18 $ dav put -L opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37 myserv/resource newfile
19 $ dav unlock -L opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37 myserv/resource
20
21

mercurial