##// END OF EJS Templates
jsonchangeset: set manifest node to "null" for workingctx...
Yuya Nishihara -
r24603:e74f819e default
parent child Browse files
Show More
@@ -1296,7 +1296,11 class jsonchangeset(changeset_printer):
1296 ", ".join('"%s"' % c.hex() for c in ctx.parents()))
1296 ", ".join('"%s"' % c.hex() for c in ctx.parents()))
1297
1297
1298 if self.ui.debugflag:
1298 if self.ui.debugflag:
1299 self.ui.write(',\n "manifest": "%s"' % hex(ctx.manifestnode()))
1299 if rev is None:
1300 jmanifestnode = 'null'
1301 else:
1302 jmanifestnode = '"%s"' % hex(ctx.manifestnode())
1303 self.ui.write(',\n "manifest": %s' % jmanifestnode)
1300
1304
1301 self.ui.write(',\n "extra": {%s}' %
1305 self.ui.write(',\n "extra": {%s}' %
1302 ", ".join('"%s": "%s"' % (j(k), j(v))
1306 ", ".join('"%s": "%s"' % (j(k), j(v))
@@ -1666,6 +1666,27 working-directory revision requires spec
1666 }
1666 }
1667 ]
1667 ]
1668
1668
1669 $ hg log -r 'wdir()' -Tjson --debug
1670 [
1671 {
1672 "rev": null,
1673 "node": null,
1674 "branch": "default",
1675 "phase": "draft",
1676 "user": "test",
1677 "date": [*, 0], (glob)
1678 "desc": "",
1679 "bookmarks": [],
1680 "tags": ["tip"],
1681 "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"],
1682 "manifest": null,
1683 "extra": {"branch": "default"},
1684 "modified": [],
1685 "added": [],
1686 "removed": []
1687 }
1688 ]
1689
1669 Check that adding an arbitrary name shows up in log automatically
1690 Check that adding an arbitrary name shows up in log automatically
1670
1691
1671 $ cat > ../names.py <<EOF
1692 $ cat > ../names.py <<EOF
General Comments 0
You need to be logged in to leave comments. Login now