]> arthur.barton.de Git - bup.git/commitdiff
Save was using a quoted instead of octal gitmode.
authorBrandon Low <lostlogic@lostlogicx.com>
Mon, 7 Mar 2011 19:17:40 +0000 (11:17 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 10 Mar 2011 20:57:26 +0000 (12:57 -0800)
This bugged in an assert on python 2.7 for me, and I believe was
incorrect but functional behavior.

Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/save-cmd.py
lib/bup/hashsplit.py

index 24376af0287149ae5ee3720bc4ed9b65f1ba4864..a340dfbedc50ff7e76604e23534973ec4a9ab53f 100755 (executable)
@@ -2,7 +2,7 @@
 import sys, stat, time, math
 from bup import hashsplit, git, options, index, client
 from bup.helpers import *
-from bup.hashsplit import GIT_MODE_TREE, GIT_MODE_FILE
+from bup.hashsplit import GIT_MODE_TREE, GIT_MODE_FILE, GIT_MODE_SYMLINK
 
 
 optspec = """
@@ -283,7 +283,7 @@ for (transname,ent) in r.filter(extra, wantrecurse=wantrecurse_during):
                     add_error(e)
                     lastskip_name = ent.name
                 else:
-                    (mode, id) = ('120000', w.new_blob(rl))
+                    (mode, id) = (GIT_MODE_SYMLINK, w.new_blob(rl))
             else:
                 add_error(Exception('skipping special file "%s"' % ent.name))
                 lastskip_name = ent.name
index 914c2bb5a8e04b532a78e3b860ac2b23216288dc..2c4ec3a286cd0b37b6a1b6371a64075f5195ceda 100644 (file)
@@ -10,6 +10,7 @@ fanout = 16
 
 GIT_MODE_FILE = 0100644
 GIT_MODE_TREE = 040000
+GIT_MODE_SYMLINK = 0120000
 assert(GIT_MODE_TREE != 40000)  # 0xxx should be treated as octal
 
 # The purpose of this type of buffer is to avoid copying on peek(), get(),