Mercurial > hgbook
annotate ja/cmdref.tex @ 835:8a3041e6f3cb
reflect comments by Hiroshi Someya.
| author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
|---|---|
| date | Sat, 11 Jul 2009 19:25:35 +0900 |
| parents | 32d33b238b7e |
| children |
| rev | line source |
|---|---|
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
1 %\chapter{Command reference} |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
2 \chapter{$B%3%^%s%I%j%U%!%l%s%9(B} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 \label{cmdref} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
5 \cmdref{add}{$B<!2s$N%3%_%C%H$G%U%!%$%k$rDI2C(B} |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
6 \optref{add}{I}{include} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
7 \optref{add}{X}{exclude} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
8 \optref{add}{n}{dry-run} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
9 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
10 \cmdref{diff}{$B%R%9%H%j$^$?$O%o!<%-%s%0%G%#%l%/%H%jFb$NJQ99$rI=<((B} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
12 %Show differences between revisions for the specified files or |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
13 %directories, using the unified diff format. For a description of the |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
14 %unified diff format, see section~\ref{sec:mq:patch}. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
15 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
16 $B;XDj$7$?%U%!%$%k!"%G%#%l%/%H%j$K$D$$$F%j%S%8%g%s4V$G$N:9J,$rI=<($9$k!#(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
17 $BI=<($K$O(Bunified diff$B%U%)!<%^%C%H$,MQ$$$i$l$k!#(Bunified diff$B%U%)!<%^%C%H(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
18 $B$K$D$$$F$N@bL@$O(B\ref{sec:mq:patch}$B$r;2>H$N$3$H!#(B |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
20 %By default, this command does not print diffs for files that Mercurial |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
21 %considers to contain binary data. To control this behaviour, see the |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
22 %\hgopt{diff}{-a} and \hgopt{diff}{--git} options. |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
23 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
24 $B%G%U%)%k%H$G$O%P%$%J%j%G!<%?$H9M$($i$l$k%U%!%$%k$N:9J,$O=PNO$7$J$$!%$3$N(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
25 $B5sF0$O(B\hgopt{diff}{-a} $B$H(B \hgopt{diff}{--git}$B$K$h$C$FJQ99$G$-$k!%(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
26 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
27 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
28 \subsection{$B%*%W%7%g%s(B} |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
29 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
30 \loptref{diff}{nodates} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
31 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
32 %Omit date and time information when printing diff headers. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
33 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
34 diff$B%X%C%@$+$iF|IU$H;~4V>pJs$r>JN,$9$k!%(B |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
35 |
| 294 | 36 \optref{diff}{B}{$B6u9T$rL5;k$9$k(B} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
37 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
38 %Do not print changes that only insert or delete blank lines. A line |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
39 %that contains only whitespace is not considered blank. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
40 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
41 $B6u9T$NA^F~$^$?$O:o=|$@$1$NJQ99$rI=<($7$J$$!%6uGrJ8;z$,4^$^$l$k9T$O6u9T$H(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
42 $B$O8+$J$5$l$J$$!%(B |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
43 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
44 \optref{diff}{I}{include} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
45 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
46 %Include files and directories whose names match the given patterns. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
47 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
48 $B;XDj$7$?%Q%?!<%s$H%^%C%A$9$k%U%!%$%k$^$?$O%G%#%l%/%H%j$rBP>]$K2C$($k(B |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
49 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
50 \optref{diff}{X}{exclude} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
51 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
52 %Exclude files and directories whose names match the given patterns. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
53 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
54 $B;XDj$7$?%Q%?!<%s$H%^%C%A$9$k%U%!%$%k$^$?$O%G%#%l%/%H%j$rBP>]$+$i=|30$9$k(B |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
55 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
56 \optref{diff}{a}{text} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
57 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
58 %If this option is not specified, \hgcmd{diff} will refuse to print |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
59 %diffs for files that it detects as binary. Specifying \hgopt{diff}{-a} |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
60 %forces \hgcmd{diff} to treat all files as text, and generate diffs for |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
61 %all of them. |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
62 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
63 $B$3$N%*%W%7%g%s$,;XDj$5$l$J$1$l$P(B\hgcmd{diff}$B$O%P%$%J%j$HH=Dj$5$l$?%U%!%$(B |
|
835
8a3041e6f3cb
reflect comments by Hiroshi Someya.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
348
diff
changeset
|
64 $B%k$KBP$9$k(Bdiff$B$N@8@.$r9T$o$J$$!%(B\hgopt{diff}{-a}$B$r;XDj$9$k$H(B |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
65 \hgcmd{diff}$B$OA4$F$N%U%!%$%k$r%F%-%9%H$H$7$F07$$!$A4$F$N%U%!%$%k$KBP$7$F(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
66 diff$B$r@8@.$9$k!%(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
67 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
68 %This option is useful for files that are ``mostly text'' but have a |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
69 %few embedded NUL characters. If you use it on files that contain a |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
70 %lot of binary data, its output will be incomprehensible. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
71 |
|
835
8a3041e6f3cb
reflect comments by Hiroshi Someya.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
348
diff
changeset
|
72 $B$3$N%*%W%7%g%s$O!$$[$\A4$F$,%F%-%9%H$@$,0lIt$K%L%kJ8;z$r4^$s$G$$$k$h$&$J(B |
|
8a3041e6f3cb
reflect comments by Hiroshi Someya.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
348
diff
changeset
|
73 $B%U%!%$%k$KBP$7$FM-MQ$G$"$k!%$3$N%*%W%7%g%s$r%P%$%J%j%G!<%?$,B?$/4^$^$l$k(B |
|
8a3041e6f3cb
reflect comments by Hiroshi Someya.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
348
diff
changeset
|
74 $B%U%!%$%k$KE,MQ$9$k$HL50UL#$J=PNO$K$J$k$@$m$&!%(B |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
75 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
76 \optref{diff}{b}{ignore-space-change} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
77 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
78 %Do not print a line if the only change to that line is in the amount |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
79 %of white space it contains. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
80 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
81 $B6uGr$NJQ99$N$_$N9T$K$D$$$F=PNO$7$J$$!%(B |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
82 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
83 \optref{diff}{g}{git} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
84 |
|
291
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
85 %Print \command{git}-compatible diffs. XXX reference a format |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
86 %description. |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
87 |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
88 \command{git}$B8_49$N(Bdiff$B$r=PNO$9$k!%(B |
|
504f23b4f625
started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
89 |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
90 |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
91 \optref{diff}{p}{show-function} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
92 |
| 292 | 93 %Display the name of the enclosing function in a hunk header, using a |
| 94 %simple heuristic. This functionality is enabled by default, so the | |
| 95 %\hgopt{diff}{-p} option has no effect unless you change the value of | |
| 96 %the \rcitem{diff}{showfunc} config item, as in the following example. | |
| 97 %\interaction{cmdref.diff-p} | |
| 98 | |
| 99 $B%O%s%/%X%C%@$NCf$K4^$^$l$F$$$k4X?t$NL>A0$rI=<($9$k!%8!:w$OC1=c$JH/8+E*J}(B | |
|
835
8a3041e6f3cb
reflect comments by Hiroshi Someya.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
348
diff
changeset
|
100 $BK!$G9T$&!%$3$N5!G=$O%G%U%)%k%H$GM-8z$K$5$l$F$*$j!$(B\hgopt{diff}{-p}$B%*%W(B |
| 292 | 101 $B%7%g%s$O2<$NNc$N$h$&$K(B\rcitem{diff}{showfunc}$B@_Dj$rJQ99$5$l$k$^$G0UL#$r$J(B |
| 102 $B$5$J$$!%(B | |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
103 \interaction{cmdref.diff-p} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
104 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
105 \optref{diff}{r}{rev} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
106 |
| 292 | 107 %Specify one or more revisions to compare. The \hgcmd{diff} command |
| 108 %accepts up to two \hgopt{diff}{-r} options to specify the revisions to | |
| 109 %compare. | |
| 110 | |
| 111 $BHf3S$9$kBP>]$N%j%S%8%g%s$r0l$D0J>e;XDj$9$k!%(B\hgcmd{diff}$B%3%^%s%I$O!$(B | |
| 112 $BHf3S$9$k%j%S%8%g%s$r;XDj$9$k$?$a$K(B\hgopt{diff}{-r}$B%*%W%7%g%s$r(B2$B$D$^(B | |
| 113 $B$G<u$1IU$1$k!%(B | |
| 114 | |
| 115 %\begin{enumerate} | |
| 116 %\setcounter{enumi}{0} | |
| 117 %\item Display the differences between the parent revision of the | |
| 118 % working directory and the working directory. | |
| 119 %\item Display the differences between the specified changeset and the | |
| 120 % working directory. | |
| 121 %\item Display the differences between the two specified changesets. | |
| 122 %\end{enumerate} | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
123 |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
124 \begin{enumerate} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
125 \setcounter{enumi}{0} |
| 292 | 126 \item $B?F%j%S%8%g%s$N%o!<%-%s%0%G%#%l%/%H%j$H!$8=:_$N%o!<%-%s%0%G%#%l%/%H(B |
| 127 $B%j$N:9J,$rI=<(!%(B | |
| 128 \item $B;XDj$5$l$?%A%'%s%8%;%C%H$H8=:_$N%o!<%-%s%0%G%#%l%/%H%j$N:9J,$rI=<(!%(B | |
| 129 \item $B;XDj$5$l$?(B2$B$D$N%A%'%s%8%;%C%H4V$N:9J,$rI=<(!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
130 \end{enumerate} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
131 |
| 292 | 132 %You can specify two revisions using either two \hgopt{diff}{-r} |
| 133 %options or revision range notation. For example, the two revision | |
| 134 %specifications below are equivalent. | |
| 135 | |
| 136 2$B$D$N%j%S%8%g%s$r;XDj$9$kJ}K!$H$7$F!$(B\hgopt{diff}{-r}$B$r(B2$B$D;H$C$F$b$$$$$7!$(B | |
| 137 $B%j%S%8%g%s%l%s%85-K!$r;H$C$F$bNI$$!%Nc$($P!$2<$N(B2$B$D$N%j%S%8%g%s;XDj$OEy(B | |
| 138 $B2A$G$"$k!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
139 \begin{codesample2} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
140 hg diff -r 10 -r 20 |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
141 hg diff -r10:20 |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
142 \end{codesample2} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
143 |
| 292 | 144 %When you provide two revisions, Mercurial treats the order of those |
| 145 %revisions as significant. Thus, \hgcmdargs{diff}{-r10:20} will | |
| 146 %produce a diff that will transform files from their contents as of | |
| 147 %revision~10 to their contents as of revision~20, while | |
| 148 %\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will | |
| 149 %transform files from their revision~20 contents to their revision~10 | |
| 150 %contents. You cannot reverse the ordering in this way if you are | |
| 151 %diffing against the working directory. | |
| 152 | |
| 153 2$B$D$N%j%S%8%g%s$r;XDj$9$k;~!$%j%S%8%g%s;XDj$N=g=x$K$O0UL#$,$"$k!%(B | |
| 154 \hgcmdargs{diff}{-r10:20}$B$O%U%!%$%k$NFbMF$,%j%S%8%g%s(B10$B$+$i%j%S%8%g%s(B20 | |
| 155 $B$KJQ$o$C$?$H$7$F:9J,$r:n@.$9$k!%(B\hgcmdargs{diff}{-r20:10}$B$G$"$l$P5U$N0U(B | |
| 156 $BL#$K$J$k!%%o!<%-%s%0%G%#%l%/%H%j$N:9J,$r<h$k>l9g$K$O$3$N$h$&$K%j%S%8%g%s(B | |
| 157 $B$N=g=x$r5U$K$9$k$3$H$O$G$-$J$$!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
158 |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
159 \optref{diff}{w}{ignore-all-space} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
160 |
| 292 | 161 \cmdref{version}{$B%P!<%8%g%s>pJs$H%3%T!<%i%$%H>pJs$rI=<($9$k(B} |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
162 |
| 292 | 163 %This command displays the version of Mercurial you are running, and |
| 164 %its copyright license. There are four kinds of version string that | |
| 165 %you may see. | |
| 166 $B$3$N%3%^%s%I$O8=:_F0:nCf$N(BMercurial$B$N%P!<%8%g%s$H%3%T!<%i%$%H%i%$%;%s%9(B | |
| 167 $B$rI=<($9$k!%%a%C%;!<%8$O(B4$B<oN`$"$k!%(B | |
| 168 %\begin{itemize} | |
| 169 %\item The string ``\texttt{unknown}''. This version of Mercurial was | |
| 170 % not built in a Mercurial repository, and cannot determine its own | |
| 171 % version. | |
| 172 %\item A short numeric string, such as ``\texttt{1.1}''. This is a | |
| 173 % build of a revision of Mercurial that was identified by a specific | |
| 174 % tag in the repository where it was built. (This doesn't necessarily | |
| 175 % mean that you're running an official release; someone else could | |
| 176 % have added that tag to any revision in the repository where they | |
| 177 % built Mercurial.) | |
| 178 %\item A hexadecimal string, such as ``\texttt{875489e31abe}''. This | |
| 179 % is a build of the given revision of Mercurial. | |
| 180 %\item A hexadecimal string followed by a date, such as | |
| 181 % ``\texttt{875489e31abe+20070205}''. This is a build of the given | |
| 182 % revision of Mercurial, where the build repository contained some | |
| 183 % local changes that had not been committed. | |
| 184 %\end{itemize} | |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
185 \begin{itemize} |
| 292 | 186 \item $BJ8;zNs(B``\texttt{unknown}''$B!%(B $B$3$N%P!<%8%g%s$N(BMercurial$B$O(BMercurial$B%j(B |
| 187 $B%]%8%H%j$NCf$G%S%k%I$5$l$?$N$G$O$J$$$?$a!$<+J,<+?H$N%j%S%8%g%s$OJ,(B | |
| 188 $B$+$i$J$$(B | |
| 189 \item ``\texttt{1.1}''$B$N$h$&$JC;$$?tCMJ8;zNs!%$3$l$O%S%k%I%j%]%8%H%jFb$G(B | |
| 190 $B%?%0IU$1$5$l$?FCDj$N%j%S%8%g%s$N(BMercurial$B$G$"$k$3$H$r<($9!%!J$3$l$O(B | |
| 191 $B@5<0%j%j!<%9HG$G$"$k$H$$$&$3$H$rI,$:$7$b0UL#$7$J$$!%(BMercurial$B$r%S%k(B | |
| 192 $B%I$9$k%j%]%8%H%j$G%?%0$rIU$1$k$N$OC/$G$b$I$N%j%S%8%g%s$KBP$7$F$b2D(B | |
| 193 $BG=$G$"$k!K(B | |
| 194 \item ``\texttt{875489e31abe}''$B$N$h$&$J(B16$B?J?tJ8;zNs!%$3$l$O(BMercurial$B$,I=(B | |
| 195 $B<($5$l$?%j%S%8%g%s$N%S%k%I$G$"$k$3$H$r<($9!%(B | |
| 196 | |
| 197 \item ``\texttt{875489e31abe+20070205}''$B$N$h$&$J(B16$B?JJ8;zNs!\F|IU!%$3$l$O(B | |
| 198 $B$=$N%j%S%8%g%s$KBP$7$F%3%_%C%H$5$l$F$$$J$$%m!<%+%k$JJQ99$r2C$($?%=!<(B | |
| 199 $B%9$+$i%S%k%I$5$l$?(BMercurial$B$G$"$k$3$H$r<($9!%(B | |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
200 \end{itemize} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
201 |
| 292 | 202 %\subsection{Tips and tricks} |
|
133
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
203 \subsection{Tips and tricks} |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
204 |
|
1e013fbe35f7
Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
132
diff
changeset
|
205 \subsubsection{Why do the results of \hgcmd{diff} and \hgcmd{status} |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
206 differ?} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
207 \label{cmdref:diff-vs-status} |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
208 |
| 294 | 209 %When you run the \hgcmd{status} command, you'll see a list of files |
| 210 %that Mercurial will record changes for the next time you perform a | |
| 211 %commit. If you run the \hgcmd{diff} command, you may notice that it | |
| 212 %prints diffs for only a \emph{subset} of the files that \hgcmd{status} | |
| 213 %listed. There are two possible reasons for this. | |
| 214 | |
| 215 \hgcmd{status}$B$r<B9T$7$?;~!$(BMercurial$B$O<!2s$N%3%_%C%H$G5-O?$9$kJQ99$N%j(B | |
| 216 $B%9%H$rI=<($9$k!%(B\hgcmd{diff}$B$r<B9T$9$k$H!$(B\hgcmd{status}$B$N(B\emph{$B0lIt(B | |
| 217 $B$N(B}diff$B$,I=<($5$l$k$3$H$K5$IU$/$@$m$&!%$3$l$K$OFs$D$NM}M3$,9M$($i$l$k!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
218 |
| 294 | 219 %The first is that \hgcmd{status} prints some kinds of modifications |
| 220 %that \hgcmd{diff} doesn't normally display. The \hgcmd{diff} command | |
| 221 %normally outputs unified diffs, which don't have the ability to | |
| 222 %represent some changes that Mercurial can track. Most notably, | |
| 223 %traditional diffs can't represent a change in whether or not a file is | |
| 224 %executable, but Mercurial records this information. | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
225 |
| 294 | 226 1$B$DL\$O(B\hgcmd{status}$B$,(B\hgcmd{diff}$B$,DL>oI=<($7$J$$2?<oN`$+$NJQ99$rI=<($9(B |
| 227 $B$k$?$a$G$"$k!%(B\hgcmd{diff}$B$ODL>o(Bunified diff$B7A<0$G=PNO$9$k$,!$$3$l$O(B | |
| 228 Mercurial$B$,DI@W$G$-$kJQ99$N$$$/$D$+$rDI@W$G$-$J$$!%FC$K!$8E$$(Bdiff$B$G$O%U%!(B | |
| 229 $B%$%k$,<B9T$+$N$&$+$I$&$+$rI=8=$G$-$J$$$,!$(BMercurial$B$O$3$N>pJs$r5-O?$9$k!%(B | |
| 230 | |
| 231 %If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will | |
| 232 %display \command{git}-compatible diffs that \emph{can} display this | |
| 233 %extra information. | |
| 234 | |
| 235 \hgcmd{diff}$B%3%^%s%I$G(B\hgopt{diff}{--git}$B%*%W%7%g%s$r;H$C$F$$$k>l9g!$(B | |
| 236 $B$3$N>pJs$rI=<($G$-$k(B\command{git}$B8_49$N(Bdiff$B$r=PNO$9$k!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
237 |
| 294 | 238 %The second possible reason that \hgcmd{diff} might be printing diffs |
| 239 %for a subset of the files displayed by \hgcmd{status} is that if you | |
| 240 %invoke it without any arguments, \hgcmd{diff} prints diffs against the | |
| 241 %first parent of the working directory.If you have run \hgcmd{merge} | |
| 242 %to merge two changesets, but you haven't yet committed the results of | |
| 243 %the merge,your working directory has two parents (use \hgcmd{parents} | |
| 244 %to see them).While \hgcmd{status} prints modifications relative to | |
| 245 %\emph{both} parents after an uncommitted merge, \hgcmd{diff} still | |
| 246 %operates relative only to the first parent. You can get it to print | |
| 247 %diffs relative to the second parent by specifying that parent with the | |
| 248 %\hgopt{diff}{-r} option. There is no way to print diffs relative to | |
| 249 %both parents. | |
| 250 | |
| 251 2$B$DL\$N9M$($i$l$kM}M3$O!$(B\hgcmd{diff}$B$r0z?t$J$7$G8F$s$G$$$k$?$a!$(B | |
| 252 \hgcmd{diff}$B$,%o!<%-%s%0%G%#%l%/%H%j$ND>@\$N?F$H$N:9J,$r<h$C$F$$$k$?$a$G(B | |
| 253 $B$"$k!%%A%'%s%8%;%C%H$r%^!<%8$9$k$?$a$K(B\hgcmd{merge}$B$r<B9T$9$k$H!$%o!<%-%s(B | |
| 254 $B%0%G%#%l%/%H%j$O(B2$B$D$N?F$r;}$D$3$H$K$J$k!%!J?F$rI=<($9$k$K$O(B | |
| 255 \hgcmd{parents}$B$r;H$&!%!K(B\hgcmd{status}$B$O%3%_%C%H$5$l$F$$$J$$%^!<%8$N(B | |
| 256 \emph{$BN>J}(B}$B$N?F$H$N:9J,$r<h$k$N$KBP$7$F!$(B\hgcmd{diff}$B$O=g=xE*$K@h$N?F$H(B | |
| 257 $B$N:9J,$r<h$k!%8e$N?F$H$N:9J,$r<h$k$?$a$K$O(B\hgopt{diff}{-r}$B%*%W%7%g%s$r;H(B | |
| 258 $B$&!%N>J}$N?F$H$N:9J,$r<h$kJ}K!$OB8:_$7$J$$!%(B | |
| 259 | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
260 |
| 294 | 261 %\subsubsection{Generating safe binary diffs} |
| 262 \subsubsection{$B%P%$%J%j$N:9J,$r0BA4$K<hF@$9$k(B} | |
| 263 | |
| 264 %If you use the \hgopt{diff}{-a} option to force Mercurial to print | |
| 265 %diffs of files that are either ``mostly text'' or contain lots of | |
| 266 %binary data, those diffs cannot subsequently be applied by either | |
| 267 %Mercurial's \hgcmd{import} command or the system's \command{patch} | |
| 268 %command. | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
269 |
| 294 | 270 $BBgH>$,%F%-%9%H$G$"$k%U%!%$%kF1;N$d!$B?$/$N%P%$%J%j%G!<%?$,4^$^$l$k%U%!%$(B |
|
348
32d33b238b7e
made changes to the source files to be compiled at any rate.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
294
diff
changeset
|
271 $B%kF1;N$N:9J,$r<h$k$?$a$K(B\hgopt{diff}{-a}$B$r;XDj$9$k>l9g!$@8@.$5$l$?:9J,$O(B |
| 294 | 272 Mercurial$B$N(B\hgcmd{import}$B%3%^%s%I$d%7%9%F%`$N(B\command{patch}$B$KMQ$$$k$3$H(B |
| 273 $B$,$G$-$J$$!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
274 |
| 294 | 275 %If you want to generate a diff of a binary file that is safe to use as |
| 276 %input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you | |
| 277 %generate the patch. The system \command{patch} command cannot handle | |
| 278 %binary patches at all. | |
| 279 | |
| 280 \hgcmd{import}$B$GMxMQ$G$-$k%P%$%J%j%U%!%$%k$N:9J,$r@8@.$9$k$K$O!$(B | |
| 281 $B%Q%C%A@8@.$K(B\hgcmd{diff}{--git}$B%*%W%7%g%s$r;XDj$9$l$P$h$$!%%7%9%F%`$N(B | |
| 282 \command{patch}$B%3%^%s%I$+$i$O$3$N:9J,$OMxMQ$G$-$J$$!%(B | |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
283 |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
284 %%% Local Variables: |
| 292 | 285 %%% mode: yatex |
|
132
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
286 %%% TeX-master: "00book" |
|
e1e2f3e0256a
Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
287 %%% End: |
