]> arthur.barton.de Git - bup.git/blobdiff - cmd/split-cmd.py
Change index; include atime; pack time as xstat timespec; use ns in memory.
[bup.git] / cmd / split-cmd.py
index b243c61400e918fdae1b19a907177c38a61ea2a1..de1cffe54511cf22b495c570d29dbe32c7ebf0e4 100755 (executable)
@@ -8,7 +8,7 @@ optspec = """
 bup split <-t|-c|-b|-n name|--copy|--noop> [--bench] [filenames...]
 --
  Modes:
-b,blobs    output a series of blob ids
+b,blobs    output a series of blob ids.  Implies --fanout=0.
 t,tree     output a tree id
 c,commit   output a commit id
 n,name=    save the result under the given name
@@ -24,8 +24,9 @@ keep-boundaries  don't let one chunk span two input files
 bench      print benchmark timings to stderr
 max-pack-size=  maximum bytes in a single pack
 max-pack-objects=  maximum number of objects in a single pack
-fanout=    maximum number of blobs in a single tree
+fanout=    average number of blobs in a single tree
 bwlimit=   maximum bytes/sec to transmit to server
+#,compress=  set compression level to # (0-9, 9 is highest) [1]
 """
 o = options.Options(optspec)
 (opt, flags, extra) = o.parse(sys.argv[1:])
@@ -61,7 +62,6 @@ if opt.date:
 else:
     date = time.time()
 
-
 total_bytes = 0
 def prog(filenum, nbytes):
     global total_bytes
@@ -84,13 +84,13 @@ refname = opt.name and 'refs/heads/%s' % opt.name or None
 if opt.noop or opt.copy:
     cli = pack_writer = oldref = None
 elif opt.remote or is_reverse:
-    cli = client.Client(opt.remote)
+    cli = client.Client(opt.remote, compression_level=opt.compress)
     oldref = refname and cli.read_ref(refname) or None
     pack_writer = cli.new_packwriter()
 else:
     cli = None
     oldref = refname and git.read_ref(refname) or None
-    pack_writer = git.PackWriter()
+    pack_writer = git.PackWriter(compression_level=opt.compress)
 
 if opt.git_ids:
     # the input is actually a series of git object ids that we should retrieve