mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
hgk: ctx.parents() problem introduced by 781913965579
This commit is contained in:
parent
71bb2f4e7d
commit
3035d96fcf
@ -102,10 +102,9 @@ def catcommit(ui, repo, n, prefix, ctx=None):
|
||||
nlprefix = '\n' + prefix;
|
||||
if ctx is None:
|
||||
ctx = repo[n]
|
||||
(p1, p2) = ctx.parents()
|
||||
ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
|
||||
if p1: ui.write("parent %s\n" % short(p1.node()))
|
||||
if p2: ui.write("parent %s\n" % short(p2.node()))
|
||||
for p in ctx.parents():
|
||||
ui.write("parent %s\n" % short(p.node()))
|
||||
date = ctx.date()
|
||||
description = ctx.description().replace("\0", "")
|
||||
lines = description.splitlines()
|
||||
|
11
tests/test-hgk
Executable file
11
tests/test-hgk
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "[extensions]" >> $HGRCPATH
|
||||
echo "hgk=" >> $HGRCPATH
|
||||
|
||||
hg init repo
|
||||
cd repo
|
||||
echo a > a
|
||||
hg ci -Am adda
|
||||
hg debug-cat-file commit 0
|
||||
|
9
tests/test-hgk.out
Normal file
9
tests/test-hgk.out
Normal file
@ -0,0 +1,9 @@
|
||||
adding a
|
||||
tree a0c8bcbbb45c
|
||||
parent 000000000000
|
||||
author test 0 0
|
||||
committer test 0 0
|
||||
revision 0
|
||||
branch default
|
||||
|
||||
adda
|
Loading…
Reference in New Issue
Block a user