]> arthur.barton.de Git - bup.git/commitdiff
vfs: remove support for /foo/TAG (keep /.tag/TAG)
authorRob Browning <rlb@defaultvalue.org>
Sun, 26 Jul 2015 15:26:35 +0000 (10:26 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 1 Aug 2015 19:38:01 +0000 (14:38 -0500)
Don't interleave the tags with the branch save dates in the VFS.  Doing
so meant that any access to the /branch required retrieving all tags in
the repository.  It also introduced the possibility of duplicate tag and
date names.

Tags are still available in the global /.tag directory.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Documentation/bup-tag.md
lib/bup/vfs.py
t/test-ls.sh

index 28d52337240c49d6142f68005eae02f92bf8999e..49416a4502ed1484f81c0383fd37f362f8ee041b 100644 (file)
@@ -31,13 +31,6 @@ bup exposes the contents of backups with current tags, via any command that
 lists or shows backups. They can be found under the /.tag directory.  For
 example, the 'ftp' command will show the tag named 'tag1' under /.tag/tag1.
 
-Tags are also exposed under the branches from which they can be reached. For
-example, if you create a tag named 'important' under branch 'computerX', you
-will also be able to retrieve the contents of the backup that was tagged under
-/computerX/important. This is done as a convenience, and should the branch
-'computerX' be deleted, the contents of the tagged backup will be available
-through /.tag/important as long as the tag is not deleted.
-
 # OPTIONS
 
 -d, \--delete
index f1c6a7bcbe0dacd24f83416b63a670ddb5d717c8..2c1f4ebfa81c42eca82c0838a0095f19cf5d6827 100644 (file)
@@ -544,8 +544,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 +556,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:])
index 0b8fbcf839d741ee6d4c69342200c6e61bdf8aa1..01c85963c5247263ab09e8c09029ea0b3e6d003a 100755 (executable)
@@ -60,8 +60,7 @@ WVPASSEQ "$(WVPASS bup ls /.tag)" "some-tag"
 
 WVPASSEQ "$(WVPASS bup ls /src)" \
 "1977-09-05-125600
-latest
-some-tag"
+latest"
 
 WVPASSEQ "$(WVPASS bup ls src/latest/"$tmpdir"/src)" "executable
 fifo
@@ -206,7 +205,6 @@ WVPASSEQ "$(bup ls -ld "src/latest$tmpdir/src" | tr -s ' ' ' ')" \
 WVSTART "ls (backup set - long)"
 WVPASSEQ "$(bup ls -l src | cut -d' ' -f 1-2)" \
 "l--------- ?/?
-l--------- ?/?
 l--------- ?/?"