Show More
@@ -13,11 +13,8 b' Core:' | |||||
13 | - difflib creating/removing files (fixed except dates: should be epoch) |
|
13 | - difflib creating/removing files (fixed except dates: should be epoch) | |
14 | - directory foo.d or foo.i with existing file foo (use some quoting?) |
|
14 | - directory foo.d or foo.i with existing file foo (use some quoting?) | |
15 | - get various options from hgrc (e.g. history always -v, tip always -q) |
|
15 | - get various options from hgrc (e.g. history always -v, tip always -q) | |
16 | - allow full decimal (part of) hash |
|
|||
17 | hg export 5005048662 -> OverflowError: long int too large to convert |
|
|||
18 | to int |
|
|||
19 | - better push support (hack exists) |
|
16 | - better push support (hack exists) | |
20 | - hg over ssh:// |
|
17 | - hg over ssh:// and https:// | |
21 | - commit mailinglist/trigger/hooks |
|
18 | - commit mailinglist/trigger/hooks | |
22 |
|
19 | |||
23 | Commands: |
|
20 | Commands: | |
@@ -45,3 +42,4 b' Web:' | |||||
45 | - some web servers think hgweb.cgi.[di] is a CGI script with old-http:// |
|
42 | - some web servers think hgweb.cgi.[di] is a CGI script with old-http:// | |
46 | (use quoting (see foo.d in Core) or document server configurations?) |
|
43 | (use quoting (see foo.d in Core) or document server configurations?) | |
47 | - link children in hgweb |
|
44 | - link children in hgweb | |
|
45 | - search field searching in descriptions, file names, what else? |
@@ -1,7 +1,7 b'' | |||||
1 | HG(1) |
|
1 | HG(1) | |
2 | ===== |
|
2 | ===== | |
3 | Matt Mackall <mpm@selenic.com> |
|
3 | Matt Mackall <mpm@selenic.com> | |
4 |
v0.6, 2 |
|
4 | v0.6, 24 Jun 2005 | |
5 |
|
5 | |||
6 | NAME |
|
6 | NAME | |
7 | ---- |
|
7 | ---- | |
@@ -39,14 +39,14 b' files ...::' | |||||
39 | path:: |
|
39 | path:: | |
40 | indicates a path on the local machine |
|
40 | indicates a path on the local machine | |
41 |
|
41 | |||
42 |
revision:: |
|
42 | revision:: | |
43 | indicates a changeset which can be specified as a changeset revision |
|
43 | indicates a changeset which can be specified as a changeset revision | |
44 | number, a tag, or a unique substring of the changeset hash value |
|
44 | number, a tag, or a unique substring of the changeset hash value | |
45 |
|
45 | |||
46 | repository path:: |
|
46 | repository path:: | |
47 | is either the pathname of a local repository of the URI of a remote |
|
47 | is either the pathname of a local repository of the URI of a remote | |
48 | repository. There are two available URI protocols, http:// which is |
|
48 | repository. There are two available URI protocols, http:// which is | |
49 |
fast and the old-http:// protocol which is much slower but does not |
|
49 | fast and the old-http:// protocol which is much slower but does not | |
50 | require a special server on the web host. |
|
50 | require a special server on the web host. | |
51 |
|
51 | |||
52 | COMMANDS |
|
52 | COMMANDS | |
@@ -61,8 +61,8 b' addremove::' | |||||
61 | files are ignored if they match any of the patterns in .hgignore |
|
61 | files are ignored if they match any of the patterns in .hgignore | |
62 |
|
62 | |||
63 | annotate [-r <rev> -u -n -c] [files ...]:: |
|
63 | annotate [-r <rev> -u -n -c] [files ...]:: | |
64 |
List the files with each line showing the revision id responsible |
|
64 | List the files with each line showing the revision id responsible | |
65 |
for that line. |
|
65 | for that line. | |
66 |
|
66 | |||
67 | options: |
|
67 | options: | |
68 | -r, --revision <rev> annotate the specified revision |
|
68 | -r, --revision <rev> annotate the specified revision | |
@@ -74,12 +74,12 b' cat <file> [revision]::' | |||||
74 | Output the given revision or tip of the specified file to stdout. |
|
74 | Output the given revision or tip of the specified file to stdout. | |
75 |
|
75 | |||
76 | commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]:: |
|
76 | commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]:: | |
77 |
|
|
77 | Commit all changed files in the working dir to the repository. This uses | |
78 | the EDITOR environment variable to bring up an editor to add a commit |
|
78 | the EDITOR environment variable to bring up an editor to add a commit | |
79 | comment. |
|
79 | comment. | |
80 |
|
80 | |||
81 | Options: |
|
81 | Options: | |
82 |
|
82 | |||
83 | -A, --addremove run addremove during commit |
|
83 | -A, --addremove run addremove during commit | |
84 | -t, --text <text> use <text> as commit message |
|
84 | -t, --text <text> use <text> as commit message | |
85 | -l, --logfile <file> read the commit message from the specified |
|
85 | -l, --logfile <file> read the commit message from the specified | |
@@ -93,10 +93,10 b' copy <source> <dest>::' | |||||
93 | Mark a file as copied or renamed for the next commit. |
|
93 | Mark a file as copied or renamed for the next commit. | |
94 |
|
94 | |||
95 | diff [-r revision] [-r revision] [files ...]:: |
|
95 | diff [-r revision] [-r revision] [files ...]:: | |
96 |
Generate a unified diff of the indicated files. If there are no |
|
96 | Generate a unified diff of the indicated files. If there are no | |
97 |
revisions specified, the working directory file is compared to |
|
97 | revisions specified, the working directory file is compared to | |
98 |
the tip, one revision specified indicates a comparison between the |
|
98 | the tip, one revision specified indicates a comparison between the | |
99 |
working directory file and the specified revision, and two revisions |
|
99 | working directory file and the specified revision, and two revisions | |
100 | compares the two versions specified. |
|
100 | compares the two versions specified. | |
101 |
|
101 | |||
102 | export [revision]:: |
|
102 | export [revision]:: | |
@@ -118,7 +118,7 b' identify::' | |||||
118 | Print a short identifier of the current state of the repo. This |
|
118 | Print a short identifier of the current state of the repo. This | |
119 | includes one or two parent hash identifiers, followed by |
|
119 | includes one or two parent hash identifiers, followed by | |
120 | a "+" if there are uncommitted changes in the working directory, |
|
120 | a "+" if there are uncommitted changes in the working directory, | |
121 | followed by a list of tags for this revision |
|
121 | followed by a list of tags for this revision. | |
122 |
|
122 | |||
123 | aliases: id |
|
123 | aliases: id | |
124 |
|
124 | |||
@@ -150,13 +150,13 b' log <file>::' | |||||
150 |
|
150 | |||
151 | manifest [revision]:: |
|
151 | manifest [revision]:: | |
152 | Print the indicated revision of the manifest (list of version controlled |
|
152 | Print the indicated revision of the manifest (list of version controlled | |
153 | files) |
|
153 | files). | |
154 |
|
154 | |||
155 | parents:: |
|
155 | parents:: | |
156 | Print the working directory's parent revisions. |
|
156 | Print the working directory's parent revisions. | |
157 |
|
157 | |||
158 | pull <repository path>:: |
|
158 | pull <repository path>:: | |
159 |
|
|
159 | Pull any changes from the specified repository to the repository in the | |
160 | current directory. |
|
160 | current directory. | |
161 |
|
161 | |||
162 | options: |
|
162 | options: | |
@@ -175,18 +175,21 b' push <destination>::' | |||||
175 | ssh://[user@]host[:port]/path |
|
175 | ssh://[user@]host[:port]/path | |
176 |
|
176 | |||
177 | rawcommit [-p -d -u -F -t -l]:: |
|
177 | rawcommit [-p -d -u -F -t -l]:: | |
178 |
Primarily useful for importing from other SCMs. |
|
178 | Primarily useful for importing from other SCMs. | |
179 |
|
179 | |||
180 | recover:: |
|
180 | recover:: | |
181 | Recover from an interrupted commit or pull. This should only be |
|
181 | Recover from an interrupted commit or pull. This should only be | |
182 | necessary when Mercurial suggests it. |
|
182 | necessary when Mercurial suggests it. | |
183 |
|
183 | |||
184 | remove [files ...]:: |
|
184 | remove [files ...]:: | |
185 |
|
|
185 | Schedule the indicated files for removal from the repository at the next | |
186 | commit |
|
186 | commit. | |
187 |
|
187 | |||
188 | aliases: rm |
|
188 | aliases: rm | |
189 |
|
189 | |||
|
190 | root:: | |||
|
191 | Print the root directory of the current repository. | |||
|
192 | ||||
190 | serve [-a addr -n name -p port -t templatedir]:: |
|
193 | serve [-a addr -n name -p port -t templatedir]:: | |
191 | Start a local HTTP repository browser and pull server. |
|
194 | Start a local HTTP repository browser and pull server. | |
192 |
|
195 | |||
@@ -213,10 +216,10 b' tag [-t <text> -d <datecode> -u <user>] ' | |||||
213 | -u, --user <user> user for commit |
|
216 | -u, --user <user> user for commit | |
214 |
|
217 | |||
215 | tags:: |
|
218 | tags:: | |
216 |
List the |
|
219 | List the repository tags. | |
217 |
|
220 | |||
218 | tip:: |
|
221 | tip:: | |
219 | Show the tip revision |
|
222 | Show the tip revision. | |
220 |
|
223 | |||
221 | undo:: |
|
224 | undo:: | |
222 | Undo the last commit or pull transaction. |
|
225 | Undo the last commit or pull transaction. | |
@@ -256,6 +259,10 b' verify::' | |||||
256 | ENVIRONMENT VARIABLES |
|
259 | ENVIRONMENT VARIABLES | |
257 | --------------------- |
|
260 | --------------------- | |
258 |
|
261 | |||
|
262 | HGEDITOR:: | |||
|
263 | This is the name of the editor to use when committing. Defaults to the | |||
|
264 | value of EDITOR. | |||
|
265 | ||||
259 | HGMERGE:: |
|
266 | HGMERGE:: | |
260 | An executable to use for resolving merge conflicts. The program , |
|
267 | An executable to use for resolving merge conflicts. The program , | |
261 | will be executed with three arguments: local file, remote file, |
|
268 | will be executed with three arguments: local file, remote file, | |
@@ -271,11 +278,12 b' EMAIL::' | |||||
271 | If HGUSER is not set, this will be used as the author for a commit. |
|
278 | If HGUSER is not set, this will be used as the author for a commit. | |
272 |
|
279 | |||
273 | LOGNAME:: |
|
280 | LOGNAME:: | |
274 |
|
|
281 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | |
275 | '@hostname' appended) as the author value for a commit. |
|
282 | '@hostname' appended) as the author value for a commit. | |
276 |
|
283 | |||
277 | EDITOR:: |
|
284 | EDITOR:: | |
278 | This is the name of the editor to use when committing. Defaults to 'vi'. |
|
285 | This is the name of the editor used in the hgmerge script. It will be | |
|
286 | used for commit messages, too, if HGEDITOR isn't set. Defaults to 'vi'. | |||
279 |
|
287 | |||
280 | PYTHONPATH:: |
|
288 | PYTHONPATH:: | |
281 | This is used by Python to find imported modules and may need to be set |
|
289 | This is used by Python to find imported modules and may need to be set | |
@@ -285,7 +293,7 b' FILES' | |||||
285 | ----- |
|
293 | ----- | |
286 | .hgignore:: |
|
294 | .hgignore:: | |
287 | This file contains regular expressions (one per line) that describe file |
|
295 | This file contains regular expressions (one per line) that describe file | |
288 | names that should be ignored by hg |
|
296 | names that should be ignored by hg. | |
289 |
|
297 | |||
290 | .hgtags:: |
|
298 | .hgtags:: | |
291 | This file contains changeset hash values and text tag names (one of each |
|
299 | This file contains changeset hash values and text tag names (one of each | |
@@ -306,6 +314,7 b' NAMED REPOSITORIES' | |||||
306 |
|
314 | |||
307 | [paths] |
|
315 | [paths] | |
308 | hg = http://selenic.com/hg |
|
316 | hg = http://selenic.com/hg | |
|
317 | tah = http://hg.intevation.org/mercurial-tah/ | |||
309 |
|
318 | |||
310 | NON_TRANSPARENT PROXY SUPPORT |
|
319 | NON_TRANSPARENT PROXY SUPPORT | |
311 | ----------------------------- |
|
320 | ----------------------------- |
@@ -27,7 +27,12 b' else' | |||||
27 |
|
27 | |||
28 | echo -e "\n\nmanifest hash: $MANIFEST" >> "$T1" |
|
28 | echo -e "\n\nmanifest hash: $MANIFEST" >> "$T1" | |
29 | grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1" |
|
29 | grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1" | |
30 | hg diff >> "$T2" |
|
30 | ( | |
|
31 | cd "`hg root`" | |||
|
32 | grep '^HG: changed' "$1" | cut -b 13- | while read changed; do | |||
|
33 | hg diff "$changed" >> "$T2" | |||
|
34 | done | |||
|
35 | ) | |||
31 |
|
36 | |||
32 | CHECKSUM=`md5sum "$T1"` |
|
37 | CHECKSUM=`md5sum "$T1"` | |
33 | $EDITOR "$T1" "$T2" || cleanup_exit $? |
|
38 | $EDITOR "$T1" "$T2" || cleanup_exit $? |
@@ -172,13 +172,10 b' def help(ui, cmd=None):' | |||||
172 | ui.write('hg commands:\n\n') |
|
172 | ui.write('hg commands:\n\n') | |
173 |
|
173 | |||
174 | h = {} |
|
174 | h = {} | |
175 | for c,e in table.items(): |
|
175 | for c, e in table.items(): | |
176 | f = c |
|
176 | f = c.split("|")[0] | |
177 | aliases = None |
|
177 | if f.startswith("debug"): | |
178 |
|
|
178 | continue | |
179 | l = f.split("|") |
|
|||
180 | f, aliases = l[0], l[1:] |
|
|||
181 | if f.startswith("debug"): continue |
|
|||
182 | d = "" |
|
179 | d = "" | |
183 | if e[0].__doc__: |
|
180 | if e[0].__doc__: | |
184 | d = e[0].__doc__.splitlines(0)[0].rstrip() |
|
181 | d = e[0].__doc__.splitlines(0)[0].rstrip() | |
@@ -242,8 +239,6 b' def annotate(u, repo, file, *files, **op' | |||||
242 | node = repo.changelog.lookup(ops['revision']) |
|
239 | node = repo.changelog.lookup(ops['revision']) | |
243 | change = repo.changelog.read(node) |
|
240 | change = repo.changelog.read(node) | |
244 | mmap = repo.manifest.read(change[0]) |
|
241 | mmap = repo.manifest.read(change[0]) | |
245 | maxuserlen = 0 |
|
|||
246 | maxchangelen = 0 |
|
|||
247 | for f in relpath(repo, (file,) + files): |
|
242 | for f in relpath(repo, (file,) + files): | |
248 | lines = repo.file(f).annotate(mmap[f]) |
|
243 | lines = repo.file(f).annotate(mmap[f]) | |
249 | pieces = [] |
|
244 | pieces = [] | |
@@ -343,7 +338,7 b' def diff(ui, repo, *files, **opts):' | |||||
343 | revs = map(lambda x: repo.lookup(x), opts['rev']) |
|
338 | revs = map(lambda x: repo.lookup(x), opts['rev']) | |
344 |
|
339 | |||
345 | if len(revs) > 2: |
|
340 | if len(revs) > 2: | |
346 |
|
|
341 | ui.warn("too many revisions to diff\n") | |
347 | sys.exit(1) |
|
342 | sys.exit(1) | |
348 |
|
343 | |||
349 | if files: |
|
344 | if files: | |
@@ -434,8 +429,7 b' def import_(ui, repo, patch1, *patches, ' | |||||
434 | files = [] |
|
429 | files = [] | |
435 | for l in f.read().splitlines(): |
|
430 | for l in f.read().splitlines(): | |
436 | l.rstrip('\r\n'); |
|
431 | l.rstrip('\r\n'); | |
437 | if not quiet: |
|
432 | ui.status("%s\n" % l) | |
438 | print l |
|
|||
439 | if l[:14] == 'patching file ': |
|
433 | if l[:14] == 'patching file ': | |
440 | pf = l[14:] |
|
434 | pf = l[14:] | |
441 | if pf not in files: |
|
435 | if pf not in files: | |
@@ -662,15 +656,15 b' def tag(ui, repo, name, rev = None, **op' | |||||
662 |
|
656 | |||
663 | def tags(ui, repo): |
|
657 | def tags(ui, repo): | |
664 | """list repository tags""" |
|
658 | """list repository tags""" | |
665 |
|
659 | |||
666 | l = repo.tagslist() |
|
660 | l = repo.tagslist() | |
667 | l.reverse() |
|
661 | l.reverse() | |
668 | for t,n in l: |
|
662 | for t, n in l: | |
669 | try: |
|
663 | try: | |
670 | r = repo.changelog.rev(n) |
|
664 | r = "%5d:%s" % (repo.changelog.rev(n), hg.hex(n)) | |
671 | except KeyError: |
|
665 | except KeyError: | |
672 | r = "?" |
|
666 | r = " ?:?" | |
673 | print "%-30s %5d:%s" % (t, repo.changelog.rev(n), hg.hex(n)) |
|
667 | ui.write("%-30s %s\n" % (t, r)) | |
674 |
|
668 | |||
675 | def tip(ui, repo): |
|
669 | def tip(ui, repo): | |
676 | """show the tip revision""" |
|
670 | """show the tip revision""" | |
@@ -782,7 +776,6 b' table = {' | |||||
782 | norepo = "init version help debugindex debugindexdot" |
|
776 | norepo = "init version help debugindex debugindexdot" | |
783 |
|
777 | |||
784 | def find(cmd): |
|
778 | def find(cmd): | |
785 | i = None |
|
|||
786 | for e in table.keys(): |
|
779 | for e in table.keys(): | |
787 | if re.match("(%s)$" % e, cmd): |
|
780 | if re.match("(%s)$" % e, cmd): | |
788 | return table[e] |
|
781 | return table[e] |
@@ -373,7 +373,7 b' class localrepository:' | |||||
373 |
|
373 | |||
374 | def tags(self): |
|
374 | def tags(self): | |
375 | '''return a mapping of tag to node''' |
|
375 | '''return a mapping of tag to node''' | |
376 |
if not self.tagscache: |
|
376 | if not self.tagscache: | |
377 | self.tagscache = {} |
|
377 | self.tagscache = {} | |
378 | try: |
|
378 | try: | |
379 | # read each head of the tags file, ending with the tip |
|
379 | # read each head of the tags file, ending with the tip | |
@@ -386,11 +386,20 b' class localrepository:' | |||||
386 | for l in fl.revision(r).splitlines(): |
|
386 | for l in fl.revision(r).splitlines(): | |
387 | if l: |
|
387 | if l: | |
388 | n, k = l.split(" ", 1) |
|
388 | n, k = l.split(" ", 1) | |
389 |
|
|
389 | try: | |
390 | except KeyError: pass |
|
390 | bin_n = bin(n) | |
|
391 | except TypeError: | |||
|
392 | bin_n = '' | |||
|
393 | self.tagscache[k.strip()] = bin_n | |||
|
394 | except KeyError: | |||
|
395 | pass | |||
391 | for k, n in self.ui.configitems("tags"): |
|
396 | for k, n in self.ui.configitems("tags"): | |
392 | self.tagscache[k] = bin(n) |
|
397 | try: | |
393 |
|
398 | bin_n = bin(n) | ||
|
399 | except TypeError: | |||
|
400 | bin_n = '' | |||
|
401 | self.tagscache[k] = bin_n | |||
|
402 | ||||
394 | self.tagscache['tip'] = self.changelog.tip() |
|
403 | self.tagscache['tip'] = self.changelog.tip() | |
395 |
|
404 | |||
396 | return self.tagscache |
|
405 | return self.tagscache | |
@@ -398,7 +407,7 b' class localrepository:' | |||||
398 | def tagslist(self): |
|
407 | def tagslist(self): | |
399 | '''return a list of tags ordered by revision''' |
|
408 | '''return a list of tags ordered by revision''' | |
400 | l = [] |
|
409 | l = [] | |
401 | for t,n in self.tags().items(): |
|
410 | for t, n in self.tags().items(): | |
402 | try: |
|
411 | try: | |
403 | r = self.changelog.rev(n) |
|
412 | r = self.changelog.rev(n) | |
404 | except: |
|
413 | except: |
@@ -195,7 +195,7 b' class revlog:' | |||||
195 | rev = int(id) |
|
195 | rev = int(id) | |
196 | if str(rev) != id: raise ValueError |
|
196 | if str(rev) != id: raise ValueError | |
197 | if rev < 0: rev = self.count() + rev |
|
197 | if rev < 0: rev = self.count() + rev | |
198 | if rev < 0 or rev >= self.count: raise ValueError |
|
198 | if rev < 0 or rev >= self.count(): raise ValueError | |
199 | return self.node(rev) |
|
199 | return self.node(rev) | |
200 | except (ValueError, OverflowError): |
|
200 | except (ValueError, OverflowError): | |
201 | c = [] |
|
201 | c = [] |
General Comments 0
You need to be logged in to leave comments.
Login now