Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Command to update tmsu database after moving a directory tree with lots of tagged files?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
____________ ________  
View profile  
 More options Jul 22 2012, 2:00 am
From: ____________ ________ <rwx...@tut.by>
Date: Sun, 22 Jul 2012 09:00:30 +0300
Local: Sun, Jul 22 2012 2:00 am
Subject: Command to update tmsu database after moving a directory tree with lots of tagged files?

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Ruane  
View profile  
 More options Jul 22 2012, 3:22 am
From: Paul Ruane <oni...@gmail.com>
Date: Sun, 22 Jul 2012 08:22:34 +0100
Local: Sun, Jul 22 2012 3:22 am
Subject: Re: Command to update tmsu database after moving a directory tree with lots of tagged files?

Hi,

The command you are after is called 'tmsu repair'. This will handle file
moves and file content changes, i.e. moved files with the same fingerprint
are identified and unmoved files with a different fingerprint are updated.

You can run 'tmsu help repair' for documentation or see the page in the
wiki: https://bitbucket.org/oniony/tmsu/wiki/repair_command.

Thanks,
Paul
On 22 Jul 2012 07:00, "____________ ________" <rwx...@tut.by> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »