Print changeset metadata for export
authormpm@selenic.com
Fri, 13 May 2005 13:26:00 -0800
changeset 68 6fa994fe90fc
parent 67 a182f2561c8e
child 69 ab03c7a52cf2
Print changeset metadata for export
hg
--- a/hg	Fri May 13 13:12:32 2005 -0800
+++ b/hg	Fri May 13 13:26:00 2005 -0800
@@ -193,7 +193,17 @@
 
 elif cmd == "export":
     node = repo.lookup(args[0])
-    prev = repo.changelog.parents(node)[0]
+    prev, other = repo.changelog.parents(node)
+    change = repo.changelog.read(node)
+    print "# HG changeset patch"
+    print "# User %s" % change[1]
+    print "# Node ID %s" % hg.hex(node)
+    print "# Parent  %s" % hg.hex(prev)
+    print
+    if other != hg.nullid:
+        print "# Parent  %s" % hg.hex(other)
+    print change[4]
+    
     diff(None, prev, node)
 
 elif cmd == "debugchangegroup":