OSDN Git Service

85ee7fc1a2f8453ece69e60b2fed078ff9c1ee4f
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseSVN / tsvn_dug / dug_blame.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">\r
3 <sect1 id="tsvn-dug-blame">\r
4         <title>Who Changed Which Line?</title>\r
5         <indexterm>\r
6                 <primary>blame</primary>\r
7         </indexterm>\r
8         <indexterm>\r
9                 <primary>annotate</primary>\r
10         </indexterm>\r
11         <indexterm>\r
12                 <primary>praise</primary>\r
13         </indexterm>\r
14         <?dbhh topicname="HIDD_BLAME"?>\r
15         <para>\r
16                 Sometimes you need to know not only what lines have changed, but also\r
17                 who exactly changed specific lines in a file. That's when the\r
18                 <menuchoice>\r
19                         <guimenu>TortoiseGit</guimenu>\r
20                         <guimenuitem>Blame...</guimenuitem>\r
21                 </menuchoice>\r
22                 command, sometimes also referred to as <firstterm>annotate</firstterm>\r
23                 command comes in handy.\r
24         </para>\r
25         <para>\r
26                 This command lists, for every line in a file, the author and the revision\r
27                 the line was changed.\r
28         </para>\r
29         <sect2 id="tsvn-dug-blame-simple">\r
30                 <title>Blame for Files</title>\r
31                 <para>\r
32                         <figure id="tsvn-dug-blame-dia-1">\r
33                                 <title>The Annotate / Blame Dialog</title>\r
34                                 <graphic fileref="../images/BlameDialog.png"/>\r
35                         </figure>\r
36                         If you're not interested in changes from earlier revisions you can\r
37                         set the revision from which the blame should start. Set this to <literal>1</literal>,\r
38                         if you want the blame for <emphasis>every</emphasis> revision.\r
39                 </para>\r
40                 <para>\r
41                         By default the blame file is viewed using <firstterm>TortoiseBlame</firstterm>,\r
42                         which highlights the different revisions to make it easier to read.\r
43                         If you wish to print or edit the blame file, select\r
44                         <guilabel>Use Text viewer to view blames</guilabel>\r
45                 </para>\r
46                 <para>\r
47                         You can specify the way that line ending and whitespace changes are handled.\r
48                         These options are described in <xref linkend="tsvn-dug-diff-eol-whitespace"/>.\r
49                         The default behaviour is to treat all whitespace and line-end differences\r
50                         as real changes, but if you want to ignore an indentation change and find\r
51                         the original author, you can choose an appropriate option here.\r
52                 </para>\r
53                 <para>\r
54                         Once you press <guibutton>OK</guibutton> TortoiseGit starts retrieving\r
55                         the data to create the blame file. Please note: This can take several\r
56                         minutes to finish, depending on how much the file has changed and\r
57                         of course your network connection to the repository. Once the blame\r
58                         process has finished the result is written into a temporary file and\r
59                         you can view the results.\r
60                 </para>\r
61                 <para>\r
62                         <figure id="tsvn-dug-blame-dia-2">\r
63                                 <title>TortoiseBlame</title>\r
64                                 <graphic fileref="../images/TortoiseBlame.png"/>\r
65                         </figure>\r
66                         TortoiseBlame, which is included with TortoiseGit, makes the blame file\r
67                         easier to read. When you hover the mouse over a line in the blame info\r
68                         column, all lines with the same revision are shown with a darker\r
69                         background. Lines from other revisions which were changed by the same author\r
70                         are shown with a light background.\r
71                         The colouring may not work as clearly if you have your display set to\r
72                         256 colour mode.\r
73                 </para>\r
74                 <para>\r
75                         If you <action>left click</action>\r
76                         on a line, all lines with the same revision are highlighted, and lines from\r
77                         other revisions by the same author are highlighted in a lighter colour.\r
78                         This highlighting is sticky, allowing you to move the mouse without losing\r
79                         the highlights. Click on that revision again to turn off highlighting.\r
80                 </para>\r
81                 <para>\r
82                         The revision comments (log message) are shown in a hint box whenever\r
83                         the mouse hovers over the blame info column. If you want to copy the\r
84                         log message for that revision, use the context menu which appears when\r
85                         you right click on the blame info column.\r
86                 </para>\r
87                 <para>\r
88                         You can search within the Blame report using\r
89                         <menuchoice>\r
90                                 <guimenu>Edit</guimenu>\r
91                                 <guimenuitem>Find...</guimenuitem>\r
92                         </menuchoice>.\r
93                         This allows you to search for revision numbers, authors and the content of\r
94                         the file itself. Log messages are not included in the search - you should\r
95                         use the Log Dialog to search those.\r
96                 </para>\r
97                 <para>\r
98                         You can also jump to a specific line number using\r
99                         <menuchoice>\r
100                                 <guimenu>Edit</guimenu>\r
101                                 <guimenuitem>Go To Line...</guimenuitem>\r
102                         </menuchoice>.\r
103                 </para>\r
104                 <para>\r
105                         When the mouse is over the blame info columns, a context menu is\r
106                         available which helps with comparing revisions and examining history,\r
107                         using the revision number of the line under the mouse as a reference.\r
108                         <menuchoice>\r
109                                 <guimenu>Context menu</guimenu>\r
110                                 <guimenuitem>Blame previous revision</guimenuitem>\r
111                         </menuchoice> generates a blame report for the same file, but using\r
112                         the previous revision as the upper limit. This gives you the blame\r
113                         report for the state of the file just before the line you are looking\r
114                         at was last changed.\r
115                         <menuchoice>\r
116                                 <guimenu>Context menu</guimenu>\r
117                                 <guimenuitem>Show changes</guimenuitem>\r
118                         </menuchoice> starts your diff viewer, showing you what changed in\r
119                         the referenced revision.\r
120                         <menuchoice>\r
121                                 <guimenu>Context menu</guimenu>\r
122                                 <guimenuitem>Show log</guimenuitem>\r
123                         </menuchoice> displays the revision log dialog starting with the\r
124                         referenced revision.\r
125                 </para>\r
126                 <para>\r
127                         If you need a better visual indicator of where the oldest and newest\r
128                         changes are, select\r
129                         <menuchoice>\r
130                                 <guimenu>View</guimenu>\r
131                                 <guimenuitem>Color age of lines</guimenuitem>\r
132                         </menuchoice>.\r
133                         This will use a colour gradient to show newer lines in red and older lines\r
134                         in blue. The default colouring is quite light, but you can change it using\r
135                         the TortoiseBlame settings.\r
136                 </para>\r
137                 <para>\r
138                         If you are using Merge Tracking, where lines have changed as a result of\r
139                         merging from another path, TortoiseBlame will show the revision and author\r
140                         of the last change in the original file rather than the revision where the\r
141                         merge took place. These lines are indicated by showing the revision and\r
142                         author in italics.\r
143                         If you do not want merged lines shown in this way, uncheck the\r
144                         <guilabel>Include merge info</guilabel> checkbox.\r
145                 </para>\r
146                 <para>\r
147                         If you want to see the paths involved in the merge, select\r
148                         <menuchoice>\r
149                                 <guimenu>View</guimenu>\r
150                                 <guimenuitem>Merge paths</guimenuitem>\r
151                         </menuchoice>.\r
152                 </para>\r
153                 <para>\r
154                         The settings for TortoiseBlame can be accessed using\r
155                         <menuchoice>\r
156                                 <guimenu>TortoiseGit</guimenu>\r
157                                 <guimenuitem>Settings...</guimenuitem>\r
158                         </menuchoice>\r
159                         on the TortoiseBlame tab. Refer to \r
160                         <xref linkend="tsvn-dug-settings-tortoiseblame"/>.\r
161                 </para>\r
162         </sect2>\r
163         <sect2 id="tsvn-dug-blame-diffs">\r
164                 <title>Blame Differences</title>\r
165                 <para>\r
166                         One of the limitations of the Blame report is that it only shows the file as\r
167                         it was in a particular revision, and shows the last person to change each line.\r
168                         Sometimes you want to know what change was made, as well as who made it. What\r
169                         you need here is a combination of the diff and blame reports.\r
170                 </para>\r
171                 <para>\r
172                         The revision log dialog includes several options which allow you to do this.\r
173                         <variablelist>\r
174                                 <varlistentry>\r
175                                         <term>Blame Revisions</term>\r
176                                         <listitem>\r
177                                                 <para>\r
178                                                         In the top pane, select 2 revisions, then select\r
179                                                         <menuchoice>\r
180                                                                 <guimenu>Context menu</guimenu>\r
181                                                                 <guimenuitem>Blame revisions</guimenuitem>\r
182                                                         </menuchoice>.\r
183                                                         This will fetch the blame data for the 2 revisions, then\r
184                                                         use the diff viewer to compare the two blame files.\r
185                                                 </para>\r
186                                         </listitem>\r
187                                 </varlistentry>\r
188                                 <varlistentry>\r
189                                         <term>Blame Changes</term>\r
190                                         <listitem>\r
191                                                 <para>\r
192                                                         Select one revision in the top pane, then pick one file\r
193                                                         in the bottom pane and select\r
194                                                         <menuchoice>\r
195                                                                 <guimenu>Context menu</guimenu>\r
196                                                                 <guimenuitem>Blame changes</guimenuitem>\r
197                                                         </menuchoice>.\r
198                                                         This will fetch the blame data for the selected revision\r
199                                                         and the previous revision, then use the diff viewer to\r
200                                                         compare the two blame files.\r
201                                                 </para>\r
202                                         </listitem>\r
203                                 </varlistentry>\r
204                                 <varlistentry>\r
205                                         <term>Compare and Blame with Working BASE</term>\r
206                                         <listitem>\r
207                                                 <para>\r
208                                                         Show the log for a single file, and in the top pane, select\r
209                                                         a single revision, then select\r
210                                                         <menuchoice>\r
211                                                                 <guimenu>Context menu</guimenu>\r
212                                                                 <guimenuitem>Compare and Blame with Working BASE</guimenuitem>\r
213                                                         </menuchoice>.\r
214                                                         This will fetch the blame data for the selected revision,\r
215                                                         and for the file in the working BASE, then use the diff\r
216                                                         viewer to compare the two blame files.\r
217                                                 </para>\r
218                                         </listitem>\r
219                                 </varlistentry>\r
220                         </variablelist>\r
221                 </para>\r
222         </sect2>\r
223 </sect1>\r