]> arthur.barton.de Git - bup.git/blobdiff - cmd/split-cmd.py
Add author and committer arguments to new_commit()
[bup.git] / cmd / split-cmd.py
index 2ad5721853eff6530102b45dca8e13fc258064c5..e813dd7d2658b4420ab21f9b9a7f4f78a7b9fc06 100755 (executable)
@@ -4,9 +4,12 @@ bup_python="$(dirname "$0")/bup-python" || exit $?
 exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
+
 import os, sys, time
+
 from bup import hashsplit, git, options, client
-from bup.helpers import *
+from bup.helpers import (handle_ctrl_c, hostname, log, parse_num, qprogress,
+                         reprogress, saved_errors, userfullname, username)
 
 
 optspec = """
@@ -176,7 +179,9 @@ if opt.tree:
 if opt.commit or opt.name:
     msg = 'bup split\n\nGenerated by command:\n%r\n' % sys.argv
     ref = opt.name and ('refs/heads/%s' % opt.name) or None
-    commit = pack_writer.new_commit(oldref, tree, date, msg)
+    userline = '%s <%s@%s>' % (userfullname(), username(), hostname())
+    commit = pack_writer.new_commit(tree, oldref, userline, date, None,
+                                    userline, date, None, msg)
     if opt.commit:
         print commit.encode('hex')