locking in Subversion 1.2 (svn: needs-lock)
The possibility a pessimistic locking, is seen as one of the main new feature of Subversion 1.2 - in particular distinguishes the Subversion of CVS.
But how to enable this locking in Subversion?
example, there are three ways to use this locking:
first Locking file manually for exactly one second set
Locking manually at the moment for all existing files in the repository share
third Loching Standradverhalten as for the entire repository to enable
1)
one hand there is the possibility of individual files (such as binary files for the default merge approach does not work) to be provided with the lock. Then the property svn: needs-lock set.
Re 2) You also can
all files of a repository's assign these properties. This example, so (if Subversion svn: / / can be reached.) Svn: / / localhost / TestRepository ein_unterverzeichnis
::
D: \\ bsp_projekt> svn co url Unknown URL Scheme for 'url: / / localhost / TestRepository'
D: \\ bsp_projekt> svn co svn: / / localhost / TestRepository ein_unterverzeichnis
A ein_unterverzeichnis \\ Testbild.jpg
A ein_unterverzeichnis \\ Word document.doc
A ein_unterverzeichnis \\ text document. txt
A ein_unterverzeichnis \\ Word Dokument2.doc
Checked out revision 13
D: \\ bsp_projekt dir>
disk in drive D is DATA Volume Serial Number
:
Directory of D: \\ bsp_projekt
17:08:05 23:24 \u0026lt;DIR>.
17:08:05 23:24 \u0026lt;DIR> ..
17:08:05 23:24 \u0026lt;DIR> Ein_unterverzeichnis
3 file (s) 0 bytes
12,476,518,400 bytes free
D: \\ bsp_projekt> cd ein_unterverzeichnis
D: \\ bsp_projekt \\ ein_unterverzeichnis dir>
disk in drive D is DATA Volume Serial Number
:
Directory of D: \\ bsp_projekt \\ ein_unterverzeichnis
17:08:05 23:24 \u0026lt;DIR>.
17:08:05 23:24 \u0026lt;DIR> ..
17:08:05 23:24 74 482 Testbild.jpg
17:08:05 23:24 380 Text Document.txt
17:08:05 23:24 24 064 Word document.doc
17:08:05 23:24 24 064 Dokument2.doc
Word 6 file (s) 12,476,518,400 bytes free 122 990 bytes
D: \\ bsp_projekt \\ ein_unterverzeichnis> cd ..
D: \\ bsp_projekt> svn propset-R svn: needs-lock yes ein_unterverzeichnis
property 'svn: needs-lock' (recursive) for 'ein_unterverzeichnis' set
D: \\ bsp_projekt> svn ci-m ein_unterverzeichnis "set needs : lock property to all files in repository ". Send
ein_unterverzeichnis \\ Testbild.jpg
transmission ein_unterverzeichnis \\ Text Document.txt
transmission ein_unterverzeichnis \\ Word document.doc
transmission ein_unterverzeichnis \\ Word Dokument2.doc
Committed revision 14th
D: \\ bsp_projekt>
For other installations, for example via WebDAV with http:// or https: / / URL must also be changed accordingly: / / or via a local file directory. After using the wrong URL scheme, you get the error message: "svn: Unrecognized URL scheme for 'url: / / localhost / TestRepository'."
to 3)
not order for each new file added to the repository, the needs-lock property to be set manually, there is a third possibility. It is the configuration Subversion amended, is amended in the [auto-props] PROPERTIES.
is a variant of this possibility is the file "config", which is abegelet under the application data of the user profile match. On Windows NT, this file (for a user named "Doe" at C: / WINNT / Profiles / Foo / Application Data / Subversion / at Windows 2000 and Windows XP at the points
In this.. config file must be in the [miscellany] of the existing, but commented out entry enable-auto-props = yes be activated by the comment character # is removed.
In addition, in the file section CONIFG [auto-props] inserts a new entry that reads as follows:
* = svn: needs-lock = true . The star is * wildcard and stands for all files. If only a certain file type is provided with the locking improve the transfer, this must be adapted accordingly (eg "*. doc").
excerpt from a sample file:
# # # This file configures various client-side behaviors.
# # # # # # The
commented-out examples below are intended to Demonstrate
# # # how to use this file.
...
# # # Section for configuring miscelleneous Subversion options.
[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output.
# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
### Set log-encoding to the default encoding for log messages
# log-encoding = latin1
### Set use-commit-times to make checkout/update/switch/revert
### put last-committed timestamps on every file touched.
# use-commit-times = yes
### Set no-unlock to prevent 'svn commit' from automatically
### releasing locks on files.
# no-unlock = yes
### Set enable-auto-props to 'yes' to enable automatic properties
### for 'svn add' and 'svn import', it defaults to 'no'.
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes
### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
### file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?'). All entries which match will be applied to the file.
### Note that auto-props functionality must be enabled, which
### is typically done by setting the 'enable-auto-props' option.
* = svn: needs-lock = true
...
Other variants of these possibilities (eg adjustment of the Windows registry instead of the config file), click the SVN book in Chapter 7 ( http://svnbook.red-bean.com/nightly/en here / svn.advanced.props.html ).
and ( in here http://svnbook.red-bean.com/nightly/en/svn.advanced.html # svn.advanced.confarea.opts.config )
is recommended in any case, a look at the http://tortoisesvn.sourceforge.net/docs/release/TortoiseSVN_de.pdf (German version) TortoiseSVN documentation at , p. 73 section 5.18.5)
0 comments:
Post a Comment