annotate ja/cmdref.tex @ 383:ef0c1fb05c84

more hook.tex
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 20 Feb 2009 20:24:14 +0900
parents 32d33b238b7e
children 8a3041e6f3cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
504f23b4f625 started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
64 $B%k$KBP$9$k(Bdiff$B$N@8@.$r9T$J$o$J$$!%(B\hgopt{diff}{-a}$B$r;XDj$9$k$H(B
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
504f23b4f625 started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
72 $B$3$N%*%W%7%g%s$O!$$[$\A4$F$,%F%-%9%H$@$,0lIt$K(BNUL$BJ8;z$r4^$s$G$$$k$h$&$J%U%!(B
504f23b4f625 started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
73 $B%$%k$KBP$7$FM-MQ$G$"$k!%$3$N%*%W%7%g%s$r%P%$%J%j%G!<%?$,B?$/4^$^$l$k%U%!(B
504f23b4f625 started japanese translation
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
74 $B%$%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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
93 %Display the name of the enclosing function in a hunk header, using a
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
94 %simple heuristic. This functionality is enabled by default, so the
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
95 %\hgopt{diff}{-p} option has no effect unless you change the value of
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
96 %the \rcitem{diff}{showfunc} config item, as in the following example.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
97 %\interaction{cmdref.diff-p}
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
98
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
100 $BK!$G9T$J$&!%$3$N5!G=$O%G%U%)%k%H$GM-8z$K$5$l$F$*$j!$(B\hgopt{diff}{-p}$B%*%W(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
101 $B%7%g%s$O2<$NNc$N$h$&$K(B\rcitem{diff}{showfunc}$B@_Dj$rJQ99$5$l$k$^$G0UL#$r$J(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
107 %Specify one or more revisions to compare. The \hgcmd{diff} command
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
108 %accepts up to two \hgopt{diff}{-r} options to specify the revisions to
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
109 %compare.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
110
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
113 $B$G<u$1IU$1$k!%(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
114
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
115 %\begin{enumerate}
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
116 %\setcounter{enumi}{0}
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
117 %\item Display the differences between the parent revision of the
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
118 % working directory and the working directory.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
119 %\item Display the differences between the specified changeset and the
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
120 % working directory.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
121 %\item Display the differences between the two specified changesets.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
127 $B%j$N:9J,$rI=<(!%(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
128 \item $B;XDj$5$l$?%A%'%s%8%;%C%H$H8=:_$N%o!<%-%s%0%G%#%l%/%H%j$N:9J,$rI=<(!%(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
132 %You can specify two revisions using either two \hgopt{diff}{-r}
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
133 %options or revision range notation. For example, the two revision
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
134 %specifications below are equivalent.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
135
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
144 %When you provide two revisions, Mercurial treats the order of those
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
145 %revisions as significant. Thus, \hgcmdargs{diff}{-r10:20} will
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
146 %produce a diff that will transform files from their contents as of
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
147 %revision~10 to their contents as of revision~20, while
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
148 %\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
149 %transform files from their revision~20 contents to their revision~10
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
150 %contents. You cannot reverse the ordering in this way if you are
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
151 %diffing against the working directory.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
152
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
154 \hgcmdargs{diff}{-r10:20}$B$O%U%!%$%k$NFbMF$,%j%S%8%g%s(B10$B$+$i%j%S%8%g%s(B20
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
155 $B$KJQ$o$C$?$H$7$F:9J,$r:n@.$9$k!%(B\hgcmdargs{diff}{-r20:10}$B$G$"$l$P5U$N0U(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
163 %This command displays the version of Mercurial you are running, and
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
164 %its copyright license. There are four kinds of version string that
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
165 %you may see.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
167 $B$rI=<($9$k!%%a%C%;!<%8$O(B4$B<oN`$"$k!%(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
168 %\begin{itemize}
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
169 %\item The string ``\texttt{unknown}''. This version of Mercurial was
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
170 % not built in a Mercurial repository, and cannot determine its own
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
171 % version.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
172 %\item A short numeric string, such as ``\texttt{1.1}''. This is a
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
173 % build of a revision of Mercurial that was identified by a specific
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
174 % tag in the repository where it was built. (This doesn't necessarily
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
175 % mean that you're running an official release; someone else could
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
176 % have added that tag to any revision in the repository where they
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
177 % built Mercurial.)
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
178 %\item A hexadecimal string, such as ``\texttt{875489e31abe}''. This
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
179 % is a build of the given revision of Mercurial.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
180 %\item A hexadecimal string followed by a date, such as
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
181 % ``\texttt{875489e31abe+20070205}''. This is a build of the given
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
182 % revision of Mercurial, where the build repository contained some
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
183 % local changes that had not been committed.
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
186 \item $BJ8;zNs(B``\texttt{unknown}''$B!%(B $B$3$N%P!<%8%g%s$N(BMercurial$B$O(BMercurial$B%j(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
188 $B$+$i$J$$(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
189 \item ``\texttt{1.1}''$B$N$h$&$JC;$$?tCMJ8;zNs!%$3$l$O%S%k%I%j%]%8%H%jFb$G(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
191 $B@5<0%j%j!<%9HG$G$"$k$H$$$&$3$H$rI,$:$7$b0UL#$7$J$$!%(BMercurial$B$r%S%k(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
193 $BG=$G$"$k!K(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
194 \item ``\texttt{875489e31abe}''$B$N$h$&$J(B16$B?J?tJ8;zNs!%$3$l$O(BMercurial$B$,I=(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
195 $B<($5$l$?%j%S%8%g%s$N%S%k%I$G$"$k$3$H$r<($9!%(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
196
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
197 \item ``\texttt{875489e31abe+20070205}''$B$N$h$&$J(B16$B?JJ8;zNs!\F|IU!%$3$l$O(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
198 $B$=$N%j%S%8%g%s$KBP$7$F%3%_%C%H$5$l$F$$$J$$%m!<%+%k$JJQ99$r2C$($?%=!<(B
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
209 %When you run the \hgcmd{status} command, you'll see a list of files
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
210 %that Mercurial will record changes for the next time you perform a
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
211 %commit. If you run the \hgcmd{diff} command, you may notice that it
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
212 %prints diffs for only a \emph{subset} of the files that \hgcmd{status}
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
213 %listed. There are two possible reasons for this.
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
214
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
215 \hgcmd{status}$B$r<B9T$7$?;~!$(BMercurial$B$O<!2s$N%3%_%C%H$G5-O?$9$kJQ99$N%j(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
219 %The first is that \hgcmd{status} prints some kinds of modifications
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
220 %that \hgcmd{diff} doesn't normally display. The \hgcmd{diff} command
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
221 %normally outputs unified diffs, which don't have the ability to
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
222 %represent some changes that Mercurial can track. Most notably,
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
223 %traditional diffs can't represent a change in whether or not a file is
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
226 1$B$DL\$O(B\hgcmd{status}$B$,(B\hgcmd{diff}$B$,DL>oI=<($7$J$$2?<oN`$+$NJQ99$rI=<($9(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
227 $B$k$?$a$G$"$k!%(B\hgcmd{diff}$B$ODL>o(Bunified diff$B7A<0$G=PNO$9$k$,!$$3$l$O(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
228 Mercurial$B$,DI@W$G$-$kJQ99$N$$$/$D$+$rDI@W$G$-$J$$!%FC$K!$8E$$(Bdiff$B$G$O%U%!(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
229 $B%$%k$,<B9T$+$N$&$+$I$&$+$rI=8=$G$-$J$$$,!$(BMercurial$B$O$3$N>pJs$r5-O?$9$k!%(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
230
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
231 %If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
232 %display \command{git}-compatible diffs that \emph{can} display this
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
233 %extra information.
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
234
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
235 \hgcmd{diff}$B%3%^%s%I$G(B\hgopt{diff}{--git}$B%*%W%7%g%s$r;H$C$F$$$k>l9g!$(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
238 %The second possible reason that \hgcmd{diff} might be printing diffs
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
239 %for a subset of the files displayed by \hgcmd{status} is that if you
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
240 %invoke it without any arguments, \hgcmd{diff} prints diffs against the
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
241 %first parent of the working directory.If you have run \hgcmd{merge}
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
242 %to merge two changesets, but you haven't yet committed the results of
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
243 %the merge,your working directory has two parents (use \hgcmd{parents}
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
244 %to see them).While \hgcmd{status} prints modifications relative to
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
245 %\emph{both} parents after an uncommitted merge, \hgcmd{diff} still
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
246 %operates relative only to the first parent. You can get it to print
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
247 %diffs relative to the second parent by specifying that parent with the
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
248 %\hgopt{diff}{-r} option. There is no way to print diffs relative to
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
249 %both parents.
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
250
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
251 2$B$DL\$N9M$($i$l$kM}M3$O!$(B\hgcmd{diff}$B$r0z?t$J$7$G8F$s$G$$$k$?$a!$(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
255 \hgcmd{parents}$B$r;H$&!%!K(B\hgcmd{status}$B$O%3%_%C%H$5$l$F$$$J$$%^!<%8$N(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
258 $B$&!%N>J}$N?F$H$N:9J,$r<h$kJ}K!$OB8:_$7$J$$!%(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
259
132
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
260
294
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
261 %\subsubsection{Generating safe binary diffs}
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
262 \subsubsection{$B%P%$%J%j$N:9J,$r0BA4$K<hF@$9$k(B}
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
263
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
264 %If you use the \hgopt{diff}{-a} option to force Mercurial to print
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
265 %diffs of files that are either ``mostly text'' or contain lots of
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
266 %binary data, those diffs cannot subsequently be applied by either
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
267 %Mercurial's \hgcmd{import} command or the system's \command{patch}
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
268 %command.
132
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
269
294
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
275 %If you want to generate a diff of a binary file that is safe to use as
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
276 %input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
277 %generate the patch. The system \command{patch} command cannot handle
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
278 %binary patches at all.
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
279
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
280 \hgcmd{import}$B$GMxMQ$G$-$k%P%$%J%j%U%!%$%k$N:9J,$r@8@.$9$k$K$O!$(B
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
b2d447356c42 - completed cmdref.tex
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 292
diff changeset
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
f72e4be6dd37 intermediate commit.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 291
diff changeset
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: