Skip to content

Commit d774693

Browse files
authored
Merge pull request #121 from vigneshraman/wip/vignesh/checkout-nodeid
checkout: print treeid and checkout nodeid by default
2 parents a0d7fcf + adf5b8d commit d774693

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

kcidev/subcommands/checkout.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ def checkout(
147147
if resp and "message" in resp:
148148
click.secho(resp["message"], fg="green")
149149

150+
if resp and "node" in resp:
151+
node = resp.get("node")
152+
treeid = node.get("treeid")
153+
checkout_nodeid = node.get("id")
154+
155+
if treeid:
156+
click.secho(f"treeid: {treeid}", fg="green")
157+
if checkout_nodeid:
158+
click.secho(f"checkout_nodeid: {checkout_nodeid}", fg="green")
159+
150160
if watch and isinstance(resp, dict):
151161
node = resp.get("node")
152162
treeid = node.get("treeid")

0 commit comments

Comments
 (0)