Mercurial > hg > mercurial-crew-with-dirclash
comparison doc/hg.1.txt @ 1015:22571b8d35d3
Add automatic binary file detection to diff and export
Based on a patch by Fuming Wang
- add util.binary which decides whether a file is binary if it has any NUL
characters in the first 1K.
- teach mdiff.unidiff to print "binary file <x> has changed" for binary files
- add text flag to cause unidiff and dodiff to treat all files as text
- add -a and --text flags (like diff(1)) to hg diff and export
- update docs
author | mpm@selenic.com |
---|---|
date | Tue, 23 Aug 2005 19:58:46 -0700 |
parents | 4f81068ed8cd |
children | 836667830fee |
comparison
equal
deleted
inserted
replaced
1014:e37cd99fa909 | 1015:22571b8d35d3 |
---|---|
126 copy <source> <dest>:: | 126 copy <source> <dest>:: |
127 Mark <dest> file as a copy or rename of a <source> one | 127 Mark <dest> file as a copy or rename of a <source> one |
128 | 128 |
129 This command takes effect for the next commit. | 129 This command takes effect for the next commit. |
130 | 130 |
131 diff [-r revision] [-r revision] [files ...]:: | 131 diff [-a] [-r revision] [-r revision] [files ...]:: |
132 Show differences between revisions for the specified files. | 132 Show differences between revisions for the specified files. |
133 | 133 |
134 Differences between files are shown using the unified diff format. | 134 Differences between files are shown using the unified diff format. |
135 | 135 |
136 When two revision arguments are given, then changes are shown | 136 When two revision arguments are given, then changes are shown |
137 between those revisions. If only one revision is specified then | 137 between those revisions. If only one revision is specified then |
138 that revision is compared to the working directory, and, when no | 138 that revision is compared to the working directory, and, when no |
139 revisions are specified, the working directory files are compared | 139 revisions are specified, the working directory files are compared |
140 to its parent. | 140 to its parent. |
141 | 141 |
142 options: | 142 Without the -a option, diff will avoid generating diffs of files |
143 it detects as binary. With -a, diff will generate a diff anyway, | |
144 probably with undesirable results. | |
145 | |
146 options: | |
147 -a, --text treat all files as text | |
143 -I, --include <pat> include names matching the given patterns | 148 -I, --include <pat> include names matching the given patterns |
144 -X, --exclude <pat> exclude names matching the given patterns | 149 -X, --exclude <pat> exclude names matching the given patterns |
145 | 150 |
146 export [-o filespec] [revision] ...:: | 151 export [-o filespec] [revision] ...:: |
147 Print the changeset header and diffs for one or more revisions. | 152 Print the changeset header and diffs for one or more revisions. |
159 %b basename of the exporting repository | 164 %b basename of the exporting repository |
160 %h short-form changeset hash (12 bytes of hexadecimal) | 165 %h short-form changeset hash (12 bytes of hexadecimal) |
161 %n zero-padded sequence number, starting at 1 | 166 %n zero-padded sequence number, starting at 1 |
162 %r zero-padded changeset revision number | 167 %r zero-padded changeset revision number |
163 | 168 |
164 Options: | 169 Without the -a option, export will avoid generating diffs of files |
165 | 170 it detects as binary. With -a, export will generate a diff anyway, |
171 probably with undesirable results. | |
172 | |
173 options: | |
174 -a, --text treat all files as text | |
166 -o, --output <filespec> print output to file with formatted named | 175 -o, --output <filespec> print output to file with formatted named |
167 | 176 |
168 forget [options] [files]:: | 177 forget [options] [files]:: |
169 Undo an 'hg add' scheduled for the next commit. | 178 Undo an 'hg add' scheduled for the next commit. |
170 | 179 |