1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">
\r
3 <sect1 id="tsvn-dug-propertypage">
\r
4 <title>Project Settings</title>
\r
6 <primary>properties</primary>
\r
9 <figure id="tsvn-dug-propertypage-dia-1">
\r
10 <title>Explorer property page, Subversion tab</title>
\r
11 <graphic fileref="../images/Properties.png"/>
\r
13 Sometimes you want to have more detailed information
\r
14 about a file/directory than just the icon overlay.
\r
15 You can get all the information Subversion provides in the
\r
16 explorer properties dialog. Just select the file or
\r
17 directory and select
\r
19 <guimenu>Windows Menu</guimenu>
\r
20 <guimenuitem>properties</guimenuitem>
\r
22 in the context menu (note: this is the normal properties menu entry
\r
23 the explorer provides, not the one in the TortoiseGit submenu!).
\r
24 In the properties dialog box TortoiseGit has added a new
\r
25 property page for files/folders under Subversion control,
\r
26 where you can see all relevant information about the
\r
27 selected file/directory.
\r
29 <sect2 id="tsvn-dug-propertypage-props">
\r
30 <title>Subversion Properties</title>
\r
32 <primary>Subversion properties</primary>
\r
34 <?dbhh topicname="HIDD_EDITPROPERTIES"?>
\r
35 <?dbhh topicname="HIDD_EDITPROPERTYVALUE"?>
\r
37 <figure id="tsvn-dug-propertypage-dia-2">
\r
38 <title>Subversion property page</title>
\r
39 <graphic fileref="../images/PropertyList.png"/>
\r
41 You can read and set the Subversion properties
\r
42 from the Windows properties dialog, but also from
\r
44 <guimenu>TortoiseGit</guimenu>
\r
45 <guimenuitem>properties</guimenuitem>
\r
47 and within TortoiseGit's status lists, from
\r
49 <guimenu>Context menu</guimenu>
\r
50 <guimenuitem>properties</guimenuitem>
\r
54 You can add your own properties, or some properties with a
\r
55 special meaning in Subversion. These begin with <literal>svn:</literal>.
\r
56 <literal>svn:externals</literal> is such a property; see how to handle
\r
57 externals in <xref linkend="tsvn-dug-import-4"/>.
\r
59 <sect3 id="tsvn-dug-propertypage-props-keywords">
\r
60 <title>svn:keywords</title>
\r
62 <primary>keywords</primary>
\r
65 <primary>expand keywords</primary>
\r
68 Subversion supports CVS-like keyword expansion which can be
\r
69 used to embed filename and revision information within the
\r
70 file itself. Keywords currently supported are:
\r
73 <term condition="pot">$Date$</term>
\r
76 Date of last known commit. This is based on
\r
77 information obtained when you update your working
\r
78 copy. It does <emphasis>not</emphasis> check the
\r
79 repository to find more recent changes.
\r
84 <term condition="pot">$Revision$</term>
\r
87 Revision of last known commit.
\r
92 <term condition="pot">$Author$</term>
\r
95 Author who made the last known commit.
\r
100 <term condition="pot">$HeadURL$</term>
\r
103 The full URL of this file in the repository.
\r
108 <term condition="pot">$Id$</term>
\r
111 A compressed combination of the previous
\r
119 To find out how to use these keywords, look at the
\r
120 <ulink url="http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html">
\r
121 <citetitle>svn:keywords section</citetitle>
\r
123 in the Subversion book, which gives a full description of these
\r
124 keywords and how to enable and use them.
\r
129 For more information about properties in Subversion see the
\r
130 <ulink url="http://svnbook.red-bean.com/en/1.5/svn.advanced.props.html">
\r
131 <citetitle>Special Properties</citetitle>
\r
134 <sect3 id="tsvn-dug-propertypage-props-add">
\r
135 <title>Adding and Editing Properties</title>
\r
137 <figure id="tsvn-dug-propertypage-dia-add">
\r
138 <title>Adding properties</title>
\r
139 <graphic fileref="../images/PropertyAdd.png"/>
\r
141 To add a new property, first click on <guilabel>Add...</guilabel>.
\r
142 Select the required property name from the combo box,
\r
143 or type in a name of your own choice, then enter a value
\r
144 in the box below. Properties which take multiple values, such as an
\r
145 ignore list, can be entered on multiple lines.
\r
146 Click on <guibutton>OK</guibutton> to add that property to the list.
\r
149 If you want to apply a property to many items at once, select the
\r
150 files/folders in explorer, then select
\r
152 <guimenu>Context menu</guimenu>
\r
153 <guimenuitem>properties</guimenuitem>
\r
157 If you want to apply the property to <emphasis>every</emphasis> file
\r
158 and folder in the hierarchy below the current folder, check the
\r
159 <guilabel>Recursive</guilabel> checkbox.
\r
162 Some properties, for example <literal>svn:needs-lock</literal>,
\r
163 can only be applied to files, so the property name doesn't appear
\r
164 in the drop down list for folders. You can still apply such a
\r
165 property recursively to all files in a hierarchy, but you have
\r
166 to type in the property name yourself.
\r
169 If you wish to edit an existing property, select that property from
\r
170 the list of existing properties, then click on <guibutton>Edit...</guibutton>.
\r
173 If you wish to remove an existing property, select that property from
\r
174 the list of existing properties, then click on <guibutton>Remove</guibutton>.
\r
177 The <literal>svn:externals</literal> property can be used to
\r
178 pull in other projects from the same repository or a completely
\r
179 different repository. For more information, read
\r
180 <xref linkend="tsvn-dug-import-4"/>.
\r
183 <sect3 id="tsvn-dug-propertypage-props-import">
\r
184 <title>Exporting and Importing Properties</title>
\r
186 Often you will find yourself applying the same set of properties many
\r
187 times, for example <literal>bugtraq:logregex</literal>. To simplify
\r
188 the process of copying properties from one project to another, you
\r
189 can use the Export/Import feature.
\r
192 From the file or folder where the properties are already set, use
\r
194 <guimenu>TortoiseGit</guimenu>
\r
195 <guimenuitem>properties</guimenuitem>
\r
197 select the properties you wish to export and click on
\r
198 <guibutton>Export...</guibutton>. You will be prompted for a filename
\r
199 where the property names and values will be saved.
\r
202 From the folder(s) where you wish to apply these properties, use
\r
204 <guimenu>TortoiseGit</guimenu>
\r
205 <guimenuitem>properties</guimenuitem>
\r
207 and click on <guibutton>Import...</guibutton>. You will be prompted
\r
208 for a filename to import from, so navigate to the place you saved
\r
209 the export file previously and select it. The properties will be added
\r
210 to the folders non-recursively.
\r
213 If you want to add properties to a tree recursively, follow the steps
\r
214 above, then in the property dialog select each property in turn,
\r
215 click on <guibutton>Edit...</guibutton>, check the
\r
216 <guilabel>Apply property recursively</guilabel> box and click on
\r
217 <guibutton>OK</guibutton>.
\r
220 The Import file format is binary and proprietary to TortoiseGit.
\r
221 Its only purpose is to transfer properties using Import and Export,
\r
222 so there is no need to edit these files.
\r
225 <sect3 id="tsvn-dug-propertypage-props-binary">
\r
226 <title>Binary Properties</title>
\r
228 TortoiseGit can handle binary property values using files.
\r
229 To read a binary property value, <guibutton>Save...</guibutton>
\r
230 to a file. To set a binary value, use a hex editor or other appropriate
\r
231 tool to create a file with the content you require, then
\r
232 <guibutton>Load...</guibutton> from that file.
\r
235 Although binary properties are not often used, they can be useful in
\r
236 some applications. For example if you are storing huge graphics files,
\r
237 or if the application used to load the file is huge, you might want
\r
238 to store a thumbnail as a property so you can obtain a preview quickly.
\r
241 <sect3 id="tsvn-dug-propertypage-auto-props">
\r
242 <title>Automatic property setting</title>
\r
244 <primary>auto-props</primary>
\r
247 You can configure Subversion and TortoiseGit to set properties
\r
248 automatically on files and folders when they are added to the
\r
249 repository. There are two ways of doing this.
\r
252 You can edit the subversion configuration file to enable
\r
253 this feature on your client. The <guilabel>General</guilabel>
\r
254 page of TortoiseGit's settings dialog has an edit button to
\r
255 take you there directly.
\r
256 The config file is a simple text file which controls some of
\r
257 subversion's workings. You need to change two things:
\r
258 firstly in the section headed
\r
259 <literal>miscellany</literal> uncomment the line
\r
260 <literal>enable-auto-props = yes</literal>.
\r
261 Secondly you need to edit the section below to define which
\r
262 properties you want added to which file types.
\r
263 This method is a standard subversion feature and works with
\r
264 any subversion client. However it has to be defined on each
\r
265 client individually - there is no way to propagate these settings
\r
266 from the repository.
\r
269 An alternative method is to set the <literal>tsvn:autoprops</literal>
\r
270 property on folders, as described in the next section. This method
\r
271 only works for TortoiseGit clients, but it does get propagated
\r
272 to all working copies on update.
\r
275 Whichever method you choose, you should note that auto-props
\r
276 are only applied to files at the time they are added to the
\r
277 repository. Auto-props will never change the properties of files
\r
278 which are already versioned.
\r
281 If you want to be absolutely sure that new files have the correct
\r
282 properties applied, you should set up a repository pre-commit
\r
283 hook to reject commits where the required properties are not set.
\r
287 <title>Commit properties</title>
\r
289 Subversion properties are versioned. After you change or add a
\r
290 property you have to commit your changes.
\r
294 <title>Conflicts on properties</title>
\r
296 If there's a conflict on committing the changes, because another
\r
297 user has changed the same property, Subversion generates a
\r
298 <filename>.prej</filename> file. Delete this file after you
\r
299 have resolved the conflict.
\r
303 <sect2 id="tsvn-dug-propertypage-tsvn-props">
\r
304 <title>TortoiseGit Project Properties</title>
\r
306 <primary>project properties</primary>
\r
309 <primary>TortoiseGit properties</primary>
\r
312 TortoiseGit has a few special properties of its own, and these begin
\r
313 with <literal>tsvn:</literal>.
\r
317 <literal>tsvn:logminsize</literal>
\r
318 sets the minimum length of a log message for a commit.
\r
319 If you enter a shorter message than specified here, the commit
\r
320 is disabled. This feature is very useful for reminding you to
\r
321 supply a proper descriptive message for every commit.
\r
322 If this property is not set,
\r
323 or the value is zero, empty log messages are allowed.
\r
326 <literal>tsvn:lockmsgminsize</literal>
\r
327 sets the minimum length of a lock message.
\r
328 If you enter a shorter message than specified here, the lock
\r
329 is disabled. This feature is very useful for reminding you to
\r
330 supply a proper descriptive message for every lock you get.
\r
331 If this property is not set,
\r
332 or the value is zero, empty lock messages are allowed.
\r
337 <literal>tsvn:logwidthmarker</literal> is used with projects which
\r
338 require log messages to be formatted with some maximum width
\r
339 (typically 80 characters) before a line break. Setting this
\r
340 property to a non-zero will do 2 things in the log message
\r
341 entry dialog: it places a marker to indicate the maximum width,
\r
342 and it disables word wrap in the display, so that you can see
\r
343 whether the text you entered is too long. Note: this feature
\r
344 will only work correctly if you have a fixed-width font
\r
345 selected for log messages.
\r
350 <literal>tsvn:logtemplate</literal> is used with projects which
\r
351 have rules about log message formatting. The property holds
\r
352 a multi-line text string which will be inserted in the commit
\r
353 message box when you start a commit. You can then edit it to
\r
354 include the required information. Note: if you are also using
\r
355 <literal>tsvn:logminsize</literal>, be sure to set the length
\r
356 longer than the template or you will lose the protection mechanism.
\r
361 Subversion allows you to set <quote>autoprops</quote> which
\r
362 will be applied to newly added or imported files, based on
\r
363 the file extension. This depends on every client having set
\r
364 appropriate autoprops in their subversion configuration file.
\r
365 <literal>tsvn:autoprops</literal> can be set on folders
\r
366 and these will be merged with the user's local autoprops
\r
367 when importing or adding files.
\r
368 The format is the same as for subversion autoprops, e.g.
\r
369 <literal>*.sh = svn:eol-style=native;svn:executable</literal>
\r
370 sets two properties on files with the <literal>.sh</literal>
\r
374 If there is a conflict between the local autoprops and
\r
375 <literal>tsvn:autoprops</literal>, the project settings take
\r
376 precedence because they are specific to that project.
\r
381 In the Commit dialog you have the option to paste in the
\r
382 list of changed files, including the status of each file
\r
383 (added, modified, etc).
\r
384 <literal>tsvn:logfilelistenglish</literal> defines whether
\r
385 the file status is inserted in English or in the localized
\r
386 language. If the property is not set, the default is
\r
387 <literal>true</literal>.
\r
392 TortoiseGit can use spell checker modules which are also
\r
393 used by OpenOffice and Mozilla. If you have those installed
\r
394 this property will determine which spell checker to use, i.e.
\r
395 in which language the log messages for your project should
\r
397 <literal>tsvn:projectlanguage</literal> sets the language
\r
398 module the spell checking engine should use when you enter
\r
399 a log message. You can find the values for your language
\r
401 <ulink url="http://msdn2.microsoft.com/en-us/library/ms776260.aspx">
\r
402 <citetitle>MSDN: Language Identifiers</citetitle>
\r
406 You can enter this value in decimal, or in hexadecimal if
\r
407 prefixed with <literal>0x</literal>.
\r
408 For example English (US) can be entered as
\r
409 <literal>0x0409</literal> or <literal>1033</literal>.
\r
414 The property <literal>tsvn:logsummary</literal> is used to
\r
415 extract a portion of the log message which is then shown
\r
416 in the log dialog as the log message summary.
\r
419 The value of the <literal>tsvn:logsummary</literal> property
\r
420 must be set to a one line regex string which contains one
\r
421 regex group. Whatever matches that group is used as the
\r
426 <literal>\[SUMMARY\]:\s+(.*)</literal>
\r
427 Will catch everything after <quote>[SUMMARY]</quote> in the log message
\r
428 and use that as the summary.
\r
433 When you want to add a new property, you can either pick one from
\r
434 the list in the combo box, or you can enter any property name
\r
435 you like. If your project uses some custom properties,
\r
436 and you want those properties to appear in the list in the combo
\r
437 box (to avoid typos when you enter a property name), you can
\r
438 create a list of your custom properties using
\r
439 <literal>tsvn:userfileproperties</literal> and
\r
440 <literal>tsvn:userdirproperties</literal>.
\r
441 Apply these properties to a folder. When you go to edit
\r
442 the properties of any child item, your custom properties will
\r
443 appear in the list of pre-defined property names.
\r
449 Some <literal>tsvn:</literal> properties require a
\r
450 <literal>true/false</literal> value. TortoiseGit also understands
\r
451 <literal>yes</literal> as a synonym for <literal>true</literal> and
\r
452 <literal>no</literal> as a synonym for <literal>false</literal>.
\r
455 TortoiseGit can integrate with some bug tracking tools. This uses
\r
456 project properties that start with <literal>bugtraq:</literal>.
\r
457 Read <xref linkend="tsvn-dug-bugtracker"/> for further information.
\r
460 It can also integrate with some web-based repository browsers,
\r
461 using project properties that start with <literal>webviewer:</literal>.
\r
462 Read <xref linkend="tsvn-dug-repoviewer"/> for further information.
\r
465 <title>Set the project properties on folders</title>
\r
467 These special project properties must be set on
\r
468 <emphasis>folders</emphasis> for the system to work.
\r
469 When you commit a file or folder the properties are read from that folder.
\r
470 If the properties are not found there, TortoiseGit will search upwards
\r
471 through the folder tree to find them until it comes to an unversioned
\r
472 folder, or the tree root (eg. <literal>C:\</literal>) is found.
\r
473 If you can be sure that each user checks out only from e.g
\r
474 <filename>trunk/</filename> and not some sub-folder, then it is
\r
475 sufficient to set the properties on <filename>trunk/</filename>.
\r
476 If you can't be sure, you should set the properties recursively on each sub-folder.
\r
477 A property setting deeper in the project hierarchy overrides settings on
\r
478 higher levels (closer to <filename>trunk/</filename>).
\r
481 For project properties <emphasis>only</emphasis>
\r
482 you can use the <guilabel>Recursive</guilabel> checkbox to set
\r
483 the property to all sub-folders in the hierarchy, without also
\r
484 setting it on all files.
\r
488 When you add new sub-folders using TortoiseGit, any
\r
489 project properties present in the parent folder
\r
490 will automatically be added to the new child folder too.
\r
494 Although TortoiseGit's project properties are extremely useful,
\r
495 they only work with TortoiseGit, and some will only work in newer versions
\r
496 of TortoiseGit. If people working on your project use a variety of
\r
497 Subversion clients, or possibly have old versions of TortoiseGit,
\r
498 you may want to use repository hooks to enforce project policies.
\r
499 project properties can only help to implement a
\r
500 policy, they cannot enforce it.
\r