##// END OF EJS Templates
hgk: ctx.parents() problem introduced by 2d54e7c1e69d
Patrick Mezard -
r6800:cc7114d9 default
parent child Browse files
Show More
@@ -0,0 +1,11 b''
1 #!/bin/sh
2
3 echo "[extensions]" >> $HGRCPATH
4 echo "hgk=" >> $HGRCPATH
5
6 hg init repo
7 cd repo
8 echo a > a
9 hg ci -Am adda
10 hg debug-cat-file commit 0
11
@@ -0,0 +1,9 b''
1 adding a
2 tree a0c8bcbbb45c
3 parent 000000000000
4 author test 0 0
5 committer test 0 0
6 revision 0
7 branch default
8
9 adda
@@ -102,10 +102,9 b' def catcommit(ui, repo, n, prefix, ctx=N'
102 nlprefix = '\n' + prefix;
102 nlprefix = '\n' + prefix;
103 if ctx is None:
103 if ctx is None:
104 ctx = repo[n]
104 ctx = repo[n]
105 (p1, p2) = ctx.parents()
106 ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
105 ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
107 if p1: ui.write("parent %s\n" % short(p1.node()))
106 for p in ctx.parents():
108 if p2: ui.write("parent %s\n" % short(p2.node()))
107 ui.write("parent %s\n" % short(p.node()))
109 date = ctx.date()
108 date = ctx.date()
110 description = ctx.description().replace("\0", "")
109 description = ctx.description().replace("\0", "")
111 lines = description.splitlines()
110 lines = description.splitlines()
General Comments 0
You need to be logged in to leave comments. Login now