changeset 68:6fa994fe90fc

Print changeset metadata for export
author mpm@selenic.com
date Fri, 13 May 2005 13:26:00 -0800
parents a182f2561c8e
children ab03c7a52cf2
files hg
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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":