]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/vfs.py
Don't import * from helpers
[bup.git] / lib / bup / vfs.py
index fffff8238cc6c467f7bba8908cfc1bd583251d47..00e1b8dbe97e1d2ce9b87a8ee8937423e3ac1d62 100644 (file)
@@ -3,9 +3,11 @@
 The vfs.py library makes it possible to expose contents from bup's repository
 and abstracts internal name mangling and storage from the exposition layer.
 """
+
 import os, re, stat, time
+
 from bup import git, metadata
-from helpers import *
+from helpers import debug1, debug2
 from bup.git import BUP_NORMAL, BUP_CHUNKED, cp
 from bup.hashsplit import GIT_MODE_TREE, GIT_MODE_FILE
 
@@ -434,7 +436,7 @@ class Dir(Node):
                 self._bupm = File(self, mangled_name, GIT_MODE_FILE, sha,
                                   bupmode)
                 continue
-            (name,bupmode) = git.demangle_name(mangled_name)
+            name, bupmode = git.demangle_name(mangled_name, mode)
             if bupmode == git.BUP_CHUNKED:
                 mode = GIT_MODE_FILE
             if stat.S_ISDIR(mode):
@@ -527,7 +529,7 @@ class TagDir(Node):
                                             repo_dir=self._repo_dir)[0]
                 commithex = sha.encode('hex')
                 target = '../.commit/%s/%s' % (commithex[:2], commithex[2:])
-                tag1 = FakeSymlink(self, name, target, repo_dir, self._repo_dir)
+                tag1 = FakeSymlink(self, name, target, self._repo_dir)
                 tag1.ctime = tag1.mtime = date
                 self._subs[name] = tag1
 
@@ -544,8 +546,6 @@ class BranchList(Node):
     def _mksubs(self):
         self._subs = {}
 
-        tags = git.tags(repo_dir = self._repo_dir)
-
         revs = list(git.rev_list(self.hash.encode('hex'),
                                  repo_dir=self._repo_dir))
         latest = revs[0]
@@ -558,11 +558,6 @@ class BranchList(Node):
             n1.ctime = n1.mtime = date
             self._subs[ls] = n1
 
-            for tag in tags.get(commit, []):
-                t1 = FakeSymlink(self, tag, target, self._repo_dir)
-                t1.ctime = t1.mtime = date
-                self._subs[tag] = t1
-
         (date, commit) = latest
         commithex = commit.encode('hex')
         target = '../.commit/%s/%s' % (commithex[:2], commithex[2:])