annotate ja/cmdref.tex @ 291:504f23b4f625

started japanese translation
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 07 Feb 2008 15:52:15 +0900
parents b0db5adf11c1
children f72e4be6dd37
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
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
36 \optref{diff}{B}{ignore-blank-lines}
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
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
93 Display the name of the enclosing function in a hunk header, using a
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
94 simple heuristic. This functionality is enabled by default, so the
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
95 \hgopt{diff}{-p} option has no effect unless you change the value of
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
96 the \rcitem{diff}{showfunc} config item, as in the following example.
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
97 \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
98
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
99 \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
100
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
101 Specify one or more revisions to compare. The \hgcmd{diff} command
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
102 accepts up to two \hgopt{diff}{-r} options to specify the revisions to
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
103 compare.
132
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
104
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
105 \begin{enumerate}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
106 \setcounter{enumi}{0}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
107 \item Display the differences between the parent revision of the
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
108 working directory and the working directory.
132
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
109 \item Display the differences between the specified changeset and the
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
110 working directory.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
111 \item Display the differences between the two specified changesets.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
112 \end{enumerate}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
113
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
114 You can specify two revisions using either two \hgopt{diff}{-r}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
115 options or revision range notation. For example, the two revision
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
116 specifications below are equivalent.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
117 \begin{codesample2}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
118 hg diff -r 10 -r 20
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
119 hg diff -r10:20
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
120 \end{codesample2}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
121
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
122 When you provide two revisions, Mercurial treats the order of those
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
123 revisions as significant. Thus, \hgcmdargs{diff}{-r10:20} will
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
124 produce a diff that will transform files from their contents as of
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
125 revision~10 to their contents as of revision~20, while
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
126 \hgcmdargs{diff}{-r20:10} means the opposite: the diff that will
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
127 transform files from their revision~20 contents to their revision~10
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
128 contents. You cannot reverse the ordering in this way if you are
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
129 diffing against the working directory.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
130
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
131 \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
132
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
133 \cmdref{version}{print version and copyright information}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
134
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
135 This command displays the version of Mercurial you are running, and
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
136 its copyright license. There are four kinds of version string that
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
137 you may see.
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
138 \begin{itemize}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
139 \item The string ``\texttt{unknown}''. This version of Mercurial was
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
140 not built in a Mercurial repository, and cannot determine its own
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
141 version.
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
142 \item A short numeric string, such as ``\texttt{1.1}''. This is a
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
143 build of a revision of Mercurial that was identified by a specific
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
144 tag in the repository where it was built. (This doesn't necessarily
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
145 mean that you're running an official release; someone else could
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
146 have added that tag to any revision in the repository where they
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
147 built Mercurial.)
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
148 \item A hexadecimal string, such as ``\texttt{875489e31abe}''. This
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
149 is a build of the given revision of Mercurial.
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
150 \item A hexadecimal string followed by a date, such as
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
151 ``\texttt{875489e31abe+20070205}''. This is a build of the given
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
152 revision of Mercurial, where the build repository contained some
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
153 local changes that had not been committed.
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
154 \end{itemize}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
155
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
156 \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
157
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
158 \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
159 differ?}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
160 \label{cmdref:diff-vs-status}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
161
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
162 When you run the \hgcmd{status} command, you'll see a list of files
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
163 that Mercurial will record changes for the next time you perform a
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
164 commit. If you run the \hgcmd{diff} command, you may notice that it
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
165 prints diffs for only a \emph{subset} of the files that \hgcmd{status}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
166 listed. There are two possible reasons for this.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
167
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
168 The first is that \hgcmd{status} prints some kinds of modifications
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
169 that \hgcmd{diff} doesn't normally display. The \hgcmd{diff} command
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
170 normally outputs unified diffs, which don't have the ability to
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
171 represent some changes that Mercurial can track. Most notably,
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
172 traditional diffs can't represent a change in whether or not a file is
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
173 executable, but Mercurial records this information.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
174
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
175 If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
176 display \command{git}-compatible diffs that \emph{can} display this
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
177 extra information.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
178
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
179 The second possible reason that \hgcmd{diff} might be printing diffs
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
180 for a subset of the files displayed by \hgcmd{status} is that if you
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
181 invoke it without any arguments, \hgcmd{diff} prints diffs against the
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
182 first parent of the working directory. If you have run \hgcmd{merge}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
183 to merge two changesets, but you haven't yet committed the results of
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
184 the merge, your working directory has two parents (use \hgcmd{parents}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
185 to see them). While \hgcmd{status} prints modifications relative to
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
186 \emph{both} parents after an uncommitted merge, \hgcmd{diff} still
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
187 operates relative only to the first parent. You can get it to print
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
188 diffs relative to the second parent by specifying that parent with the
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
189 \hgopt{diff}{-r} option. There is no way to print diffs relative to
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
190 both parents.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
191
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
192 \subsubsection{Generating safe binary diffs}
132
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
193
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
194 If you use the \hgopt{diff}{-a} option to force Mercurial to print
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
195 diffs of files that are either ``mostly text'' or contain lots of
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
196 binary data, those diffs cannot subsequently be applied by either
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
197 Mercurial's \hgcmd{import} command or the system's \command{patch}
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
198 command.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
199
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
200 If you want to generate a diff of a binary file that is safe to use as
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
201 input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
202 generate the patch. The system \command{patch} command cannot handle
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
203 binary patches at all.
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
204
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
205 %%% Local Variables:
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
206 %%% mode: latex
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
207 %%% TeX-master: "00book"
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
208 %%% End: