Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 417:f2d1f5fd0179
[PATCH] file type fixes for the other 'OS'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] file type fixes for the other 'OS'
From: K Thananchayan <thananck@yahoo.com>
Filetype fixes:
All working files and files in the repository are processed as binary.
.hgignore is read as text when constructing ignorelist as this file
is intended to be edited.
manifest hash: c034cdcc54011fd3de9e32f1aa8b2b6f84e1b2b8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCuNoRywK+sNU5EO8RAjarAJ9ScUoFL1A7mpO7qorCy6okhi0nggCcDgpp
dfDl4dALGQA0PqXqtI+T5gU=
=IVxr
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Tue, 21 Jun 2005 19:25:05 -0800 |
parents | a1ecef497721 |
children | 28511fc21073 |
comparison
equal
deleted
inserted
replaced
416:5e9e8b8d2629 | 417:f2d1f5fd0179 |
---|---|
45 else: | 45 else: |
46 date2 = time.asctime() | 46 date2 = time.asctime() |
47 (c, a, d, u) = repo.diffdir(path, node1) | 47 (c, a, d, u) = repo.diffdir(path, node1) |
48 if not node1: | 48 if not node1: |
49 node1 = repo.dirstate.parents()[0] | 49 node1 = repo.dirstate.parents()[0] |
50 def read(f): return file(os.path.join(repo.root, f)).read() | 50 def read(f): return repo.wfile(f).read() |
51 | 51 |
52 if ui.quiet: | 52 if ui.quiet: |
53 r = None | 53 r = None |
54 else: | 54 else: |
55 hexfunc = ui.verbose and hg.hex or hg.short | 55 hexfunc = ui.verbose and hg.hex or hg.short |
270 newer = repo.newer(map(repo.lookup, roots)) | 270 newer = repo.newer(map(repo.lookup, roots)) |
271 for chunk in repo.changegroup(newer): | 271 for chunk in repo.changegroup(newer): |
272 sys.stdout.write(chunk) | 272 sys.stdout.write(chunk) |
273 | 273 |
274 def debugindex(ui, file): | 274 def debugindex(ui, file): |
275 r = hg.revlog(open, file, "") | 275 r = hg.revlog(hg.opener(""), file, "") |
276 print " rev offset length base linkrev"+\ | 276 print " rev offset length base linkrev"+\ |
277 " p1 p2 nodeid" | 277 " p1 p2 nodeid" |
278 for i in range(r.count()): | 278 for i in range(r.count()): |
279 e = r.index[i] | 279 e = r.index[i] |
280 print "% 6d % 9d % 7d % 6d % 7d %s.. %s.. %s.." % ( | 280 print "% 6d % 9d % 7d % 6d % 7d %s.. %s.. %s.." % ( |
281 i, e[0], e[1], e[2], e[3], | 281 i, e[0], e[1], e[2], e[3], |
282 hg.hex(e[4][:5]), hg.hex(e[5][:5]), hg.hex(e[6][:5])) | 282 hg.hex(e[4][:5]), hg.hex(e[5][:5]), hg.hex(e[6][:5])) |
283 | 283 |
284 def debugindexdot(ui, file): | 284 def debugindexdot(ui, file): |
285 r = hg.revlog(open, file, "") | 285 r = hg.revlog(hg.opener(""), file, "") |
286 print "digraph G {" | 286 print "digraph G {" |
287 for i in range(r.count()): | 287 for i in range(r.count()): |
288 e = r.index[i] | 288 e = r.index[i] |
289 print "\t%d -> %d" % (r.rev(e[4]), i) | 289 print "\t%d -> %d" % (r.rev(e[4]), i) |
290 if e[5] != hg.nullid: | 290 if e[5] != hg.nullid: |