t,tree output a tree id
c,commit output a commit id
n,name= name of backup set to update (if any)
+d,date= date for the commit (seconds since the epoch)
v,verbose increase log output (can be used more than once)
q,quiet don't show progress meter
smaller= only back up files smaller than n bytes
if opt.bwlimit:
client.bwlimit = parse_num(opt.bwlimit)
+if opt.date:
+ date = parse_date_or_fatal(opt.date, o.fatal)
+else:
+ date = time.time()
+
is_reverse = os.environ.get('BUP_SERVER_REVERSE')
if is_reverse and opt.remote:
o.fatal("don't use -r in reverse mode; it's automatic")
shalist = shalists.pop()
tree = force_tree or w.new_tree(shalist)
if shalists:
- shalists[-1].append(('40000', part, tree))
+ shalists[-1].append(('40000',
+ git.mangle_name(part, 040000, 40000),
+ tree))
else: # this was the toplevel, so put it back for sanity
shalists.append(shalist)
return tree
add_error(e)
lastskip_name = ent.name
else:
- (mode, id) = hashsplit.split_to_blob_or_tree(w, [f])
+ (mode, id) = hashsplit.split_to_blob_or_tree(w, [f], False)
else:
if stat.S_ISDIR(ent.mode):
assert(0) # handled above
if opt.commit or opt.name:
msg = 'bup save\n\nGenerated by command:\n%r' % sys.argv
ref = opt.name and ('refs/heads/%s' % opt.name) or None
- commit = w.new_commit(oldref, tree, msg)
+ commit = w.new_commit(oldref, tree, date, msg)
if opt.commit:
print commit.encode('hex')