##// END OF EJS Templates
fix file opening for some commands on Windows...
Christian Boos -
r1504:0fcdd126 default
parent child Browse files
Show More
@@ -896,7 +896,7 b' def copy(ui, repo, *pats, **opts):'
896
896
897 def debugancestor(ui, index, rev1, rev2):
897 def debugancestor(ui, index, rev1, rev2):
898 """find the ancestor revision of two revisions in a given index"""
898 """find the ancestor revision of two revisions in a given index"""
899 r = revlog.revlog(file, index, "")
899 r = revlog.revlog(util.opener(os.getcwd()), index, "")
900 a = r.ancestor(r.lookup(rev1), r.lookup(rev2))
900 a = r.ancestor(r.lookup(rev1), r.lookup(rev2))
901 ui.write("%d:%s\n" % (r.rev(a), hex(a)))
901 ui.write("%d:%s\n" % (r.rev(a), hex(a)))
902
902
@@ -969,7 +969,7 b' def debugstate(ui, repo):'
969
969
970 def debugdata(ui, file_, rev):
970 def debugdata(ui, file_, rev):
971 """dump the contents of an data file revision"""
971 """dump the contents of an data file revision"""
972 r = revlog.revlog(file, file_[:-2] + ".i", file_)
972 r = revlog.revlog(util.opener(os.getcwd()), file_[:-2] + ".i", file_)
973 try:
973 try:
974 ui.write(r.revision(r.lookup(rev)))
974 ui.write(r.revision(r.lookup(rev)))
975 except KeyError:
975 except KeyError:
@@ -977,7 +977,7 b' def debugdata(ui, file_, rev):'
977
977
978 def debugindex(ui, file_):
978 def debugindex(ui, file_):
979 """dump the contents of an index file"""
979 """dump the contents of an index file"""
980 r = revlog.revlog(file, file_, "")
980 r = revlog.revlog(util.opener(os.getcwd()), file_, "")
981 ui.write(" rev offset length base linkrev" +
981 ui.write(" rev offset length base linkrev" +
982 " nodeid p1 p2\n")
982 " nodeid p1 p2\n")
983 for i in range(r.count()):
983 for i in range(r.count()):
@@ -988,7 +988,7 b' def debugindex(ui, file_):'
988
988
989 def debugindexdot(ui, file_):
989 def debugindexdot(ui, file_):
990 """dump an index DAG as a .dot file"""
990 """dump an index DAG as a .dot file"""
991 r = revlog.revlog(file, file_, "")
991 r = revlog.revlog(util.opener(os.getcwd()), file_, "")
992 ui.write("digraph G {\n")
992 ui.write("digraph G {\n")
993 for i in range(r.count()):
993 for i in range(r.count()):
994 e = r.index[i]
994 e = r.index[i]
General Comments 0
You need to be logged in to leave comments. Login now