diff 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
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jun 21 19:19:39 2005 -0800
+++ b/mercurial/commands.py	Tue Jun 21 19:25:05 2005 -0800
@@ -47,7 +47,7 @@
         (c, a, d, u) = repo.diffdir(path, node1)
         if not node1:
             node1 = repo.dirstate.parents()[0]
-        def read(f): return file(os.path.join(repo.root, f)).read()
+        def read(f): return repo.wfile(f).read()
 
     if ui.quiet:
         r = None
@@ -272,7 +272,7 @@
         sys.stdout.write(chunk)
 
 def debugindex(ui, file):
-    r = hg.revlog(open, file, "")
+    r = hg.revlog(hg.opener(""), file, "")
     print "   rev    offset  length   base linkrev"+\
           " p1           p2           nodeid"
     for i in range(r.count()):
@@ -282,7 +282,7 @@
             hg.hex(e[4][:5]), hg.hex(e[5][:5]), hg.hex(e[6][:5]))
 
 def debugindexdot(ui, file):
-    r = hg.revlog(open, file, "")
+    r = hg.revlog(hg.opener(""), file, "")
     print "digraph G {"
     for i in range(r.count()):
         e = r.index[i]