____________ ________
unread,Jul 22, 2012, 2:00:30 AM7/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tm...@googlegroups.com
Greetings, new tmsu user here.
I've fiddled a bit with tmsu and there's one particular scenario that I'm not happy with. So I've created some throwaway files, added some tags. Mounted the virtual filesystem using `tmsu mount`. Then I have moved a tagged file to another directory. I have noticed two things:
1. The symlink for this file in corresponding directory for tag inside virtual filesystem got broken.
2. Doing `tmsu tags file` against the file in his new location yields no results, so it looks like moving a file breaks its tag associations.
This behavior is the expected one, since tmsu can't know when I move tagged files - it's a standalone program not a daemon that would watch for files being moved via some inotify-like mechanism.
However, when looking in the database that tmsu is using, there's that "fingerprint" column in the "file" table that looks like a cryptographic hash and is probably using for tracking uniqueness of files.
Is there a command that can tell tmsu sync its database against changes in the filesystem (as in moving/renaming a directory)? It would walk a given directory tree, match every file there against fingerprints in the database and automatically add tags for it. After that it can iterate over all files in the database and purge the records of missing files. I see that directory + name columns in the file table form an absolute file path, which may change when a file gets moved to another directory / gets renamed.
I quickly went over tmsu docs and couldn't find how to achieve such a sync.
Please point me to the right place to read about it if I've overlooked something in the docs. Otherwise please consider this a feature request, I see this as a major show stopper while using tmsu in scenarios when files get often moved / renamed. The sync functionality could solve problem 2. from my scenario automatically, without having to manually reassign all the tags after moving / renaming a file (which would be a pain for a lot of files). Problem 1. would be solved by remounting the virtual filesystem after performing the described above sync.