OSDN Git Service

Update a little help document
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseSVN / tsvn_dug / dug_propertypage.xml
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
5         <indexterm>\r
6                 <primary>properties</primary>\r
7         </indexterm>\r
8         <para>\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
12                 </figure>\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
18                 <menuchoice>\r
19                         <guimenu>Windows Menu</guimenu>\r
20                         <guimenuitem>properties</guimenuitem>\r
21                 </menuchoice>\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
28         </para>\r
29         <sect2 id="tsvn-dug-propertypage-props">\r
30                 <title>Subversion Properties</title>\r
31                 <indexterm>\r
32                         <primary>Subversion properties</primary>\r
33                 </indexterm>\r
34                 <?dbhh topicname="HIDD_EDITPROPERTIES"?>\r
35                 <?dbhh topicname="HIDD_EDITPROPERTYVALUE"?>\r
36                 <para>\r
37                         <figure id="tsvn-dug-propertypage-dia-2">\r
38                                 <title>Subversion property page</title>\r
39                                 <graphic fileref="../images/PropertyList.png"/>\r
40                         </figure>\r
41                         You can read and set the Subversion properties\r
42                         from the Windows properties dialog, but also from\r
43                         <menuchoice>\r
44                                 <guimenu>TortoiseGit</guimenu>\r
45                                 <guimenuitem>properties</guimenuitem>\r
46                         </menuchoice>\r
47                         and within TortoiseGit's status lists, from\r
48                         <menuchoice>\r
49                                 <guimenu>Context menu</guimenu>\r
50                                 <guimenuitem>properties</guimenuitem>\r
51                         </menuchoice>.\r
52                 </para>\r
53                 <para>\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
58                 </para>\r
59                 <sect3 id="tsvn-dug-propertypage-props-keywords">\r
60                         <title>svn:keywords</title>\r
61                         <indexterm>\r
62                                 <primary>keywords</primary>\r
63                         </indexterm>\r
64                         <indexterm>\r
65                                 <primary>expand keywords</primary>\r
66                         </indexterm>\r
67                         <para>\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
71                                 <variablelist>\r
72                                         <varlistentry>\r
73                                                 <term condition="pot">$Date$</term>\r
74                                                 <listitem>\r
75                                                         <para>\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
80                                                         </para>\r
81                                                 </listitem>\r
82                                         </varlistentry>\r
83                                         <varlistentry>\r
84                                                 <term condition="pot">$Revision$</term>\r
85                                                 <listitem>\r
86                                                         <para>\r
87                                                                 Revision of last known commit.\r
88                                                         </para>\r
89                                                 </listitem>\r
90                                         </varlistentry>\r
91                                         <varlistentry>\r
92                                                 <term condition="pot">$Author$</term>\r
93                                                 <listitem>\r
94                                                         <para>\r
95                                                                 Author who made the last known commit.\r
96                                                         </para>\r
97                                                 </listitem>\r
98                                         </varlistentry>\r
99                                         <varlistentry>\r
100                                                 <term condition="pot">$HeadURL$</term>\r
101                                                 <listitem>\r
102                                                         <para>\r
103                                                                 The full URL of this file in the repository.\r
104                                                         </para>\r
105                                                 </listitem>\r
106                                         </varlistentry>\r
107                                         <varlistentry>\r
108                                                 <term condition="pot">$Id$</term>\r
109                                                 <listitem>\r
110                                                         <para>\r
111                                                                 A compressed combination of the previous\r
112                                                                 four keywords.\r
113                                                         </para>\r
114                                                 </listitem>\r
115                                         </varlistentry>\r
116                                 </variablelist>\r
117                         </para>\r
118                         <para>\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
122                                 </ulink>\r
123                                 in the Subversion book, which gives a full description of these\r
124                                 keywords and how to enable and use them.\r
125                         </para>\r
126                 </sect3>\r
127 \r
128                 <para>\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
132                         </ulink>.\r
133                 </para>\r
134                 <sect3 id="tsvn-dug-propertypage-props-add">\r
135                         <title>Adding and Editing Properties</title>\r
136                         <para>\r
137                                 <figure id="tsvn-dug-propertypage-dia-add">\r
138                                         <title>Adding properties</title>\r
139                                         <graphic fileref="../images/PropertyAdd.png"/>\r
140                                 </figure>\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
147                         </para>\r
148                         <para>\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
151                                 <menuchoice>\r
152                                         <guimenu>Context menu</guimenu>\r
153                                         <guimenuitem>properties</guimenuitem>\r
154                                 </menuchoice>\r
155                         </para>\r
156                         <para>\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
160                         </para>\r
161                         <para>\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
167                         </para>\r
168                         <para>\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
171                         </para>\r
172                         <para>\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
175                         </para>\r
176                         <para>\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
181                         </para>\r
182                 </sect3>\r
183                 <sect3 id="tsvn-dug-propertypage-props-import">\r
184                         <title>Exporting and Importing Properties</title>\r
185                         <para>\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
190                         </para>\r
191                         <para>\r
192                                 From the file or folder where the properties are already set, use\r
193                                 <menuchoice>\r
194                                         <guimenu>TortoiseGit</guimenu>\r
195                                         <guimenuitem>properties</guimenuitem>\r
196                                 </menuchoice>,\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
200                         </para>\r
201                         <para>\r
202                                 From the folder(s) where you wish to apply these properties, use\r
203                                 <menuchoice>\r
204                                         <guimenu>TortoiseGit</guimenu>\r
205                                         <guimenuitem>properties</guimenuitem>\r
206                                 </menuchoice>\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
211                         </para>\r
212                         <para>\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
218                         </para>\r
219                         <para>\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
223                         </para>\r
224                 </sect3>\r
225                 <sect3 id="tsvn-dug-propertypage-props-binary">\r
226                         <title>Binary Properties</title>\r
227                         <para>\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
233                         </para>\r
234                         <para>\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
239                         </para>\r
240                 </sect3>\r
241                 <sect3 id="tsvn-dug-propertypage-auto-props">\r
242                         <title>Automatic property setting</title>\r
243                         <indexterm>\r
244                                 <primary>auto-props</primary>\r
245                         </indexterm>\r
246                         <para>\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
250                         </para>\r
251                         <para>\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
267                         </para>\r
268                         <para>\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
273                         </para>\r
274                         <para>\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
279                         </para>\r
280                         <para>\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
284                         </para>\r
285                 </sect3>\r
286                 <important>\r
287                         <title>Commit properties</title>\r
288                         <para>\r
289                                 Subversion properties are versioned. After you change or add a \r
290                                 property you have to commit your changes.\r
291                         </para>\r
292                 </important>\r
293                 <tip>\r
294                         <title>Conflicts on properties</title>\r
295                         <para>\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
300                         </para>\r
301                 </tip>\r
302         </sect2>\r
303         <sect2 id="tsvn-dug-propertypage-tsvn-props">\r
304                 <title>TortoiseGit Project Properties</title>\r
305                 <indexterm>\r
306                         <primary>project properties</primary>\r
307                 </indexterm>\r
308                 <indexterm>\r
309                         <primary>TortoiseGit properties</primary>\r
310                 </indexterm>\r
311                 <para>\r
312                         TortoiseGit has a few special properties of its own, and these begin\r
313                         with <literal>tsvn:</literal>.\r
314                         <itemizedlist>\r
315                                 <listitem>\r
316                                         <para>\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
324                                         </para>\r
325                                         <para>\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
333                                         </para>\r
334                                 </listitem>\r
335                                 <listitem>\r
336                                         <para>\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
346                                         </para>\r
347                                 </listitem>\r
348                                 <listitem>\r
349                                         <para>\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
357                                         </para>\r
358                                 </listitem>\r
359                                 <listitem>\r
360                                         <para>\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
371                                                 extension.\r
372                                         </para>\r
373                                         <para>\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
377                                         </para>\r
378                                 </listitem>\r
379                                 <listitem>\r
380                                         <para>\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
388                                         </para>\r
389                                 </listitem>\r
390                                 <listitem>\r
391                                         <para>\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
396                                                 be written.\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
400                                                 on this page:\r
401                                                 <ulink url="http://msdn2.microsoft.com/en-us/library/ms776260.aspx">\r
402                                                         <citetitle>MSDN: Language Identifiers</citetitle>\r
403                                                 </ulink>.\r
404                                         </para>\r
405                                         <para>\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
410                                         </para>\r
411                                 </listitem>\r
412                                 <listitem>\r
413                                         <para>\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
417                                         </para>\r
418                                         <para>\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
422                                                 summary.\r
423                                         </para>\r
424                                         <para>\r
425                                                 An example: \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
429                                         </para>\r
430                                 </listitem>\r
431                                 <listitem>\r
432                                         <para>\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
444                                         </para>\r
445                                 </listitem>\r
446                         </itemizedlist>\r
447                 </para>\r
448                 <para>\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
453                 </para>\r
454                 <para>\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
458                 </para>\r
459                 <para>\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
463                 </para>\r
464                 <important>\r
465                         <title>Set the project properties on folders</title>\r
466                         <para>\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
479                         </para>\r
480                         <para>\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
485                         </para>\r
486                 </important>\r
487                 <para>\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
491                 </para>\r
492                 <caution>\r
493                         <para>\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
501                         </para>\r
502                 </caution>\r
503         </sect2>\r
504 </sect1>\r