Coder Social home page Coder Social logo

Comments (7)

oniony avatar oniony commented on May 23, 2024 1

OK, after looking at issue #20, I've decided I'll include a set of shell functions with TMSU. Currently I have:

  • tmsu-rm
  • tmsu-mv
  • tmsu-mergefiles

This should allow users to do these operations simply without TMSU itself performing any changes to the managed files on disk.

I've created a new issue #35 for this.

from tmsu.

0ion9 avatar 0ion9 commented on May 23, 2024

+1. There are other ways of tracking renames -- for example by hash, like tmsu repair does -- but this is a common task, which really belongs in core TMSU imo.

from tmsu.

oniony avatar oniony commented on May 23, 2024

Hi,

You can easily create a script that does this:

mv $1 $2 && tmsu repair --manual $1 $2

Thanks
Paul

Since tmsu doesn't explicitly monitor filesystem changes, it'd be nice if
there were an analogue of git mv - a move command that also adds the move
to the staging area - for tmsu, that would move the file while updating the
database so that no tag info is lost.


Reply to this email directly or view it on GitHub
#11.

from tmsu.

coldfix avatar coldfix commented on May 23, 2024

Hey, I think this might still be worth adding as a "porcelaine" command. Inexperienced users won't be able to guess tmsu repair --manual and will try to tmsu mv instead. Or maybe provide the possibility for aliases and define mv accordingly.

from tmsu.

oniony avatar oniony commented on May 23, 2024

The problem I have with it is that no commands in TMSU currently make any
modifications on disk*: right now you can trust that TMSU will never modify
your files. Adding a 'mv' command would change this and this changes the
whole relationship with the tool.

I think, as its so easy to alias this in the shell, that its not necessary.
If there's enough demand, however, I would be open to changing my position
on this.

Thanks,
Paul

  • other than to the database file

On Sat, 20 Dec 2014 16:50 Thomas G. [email protected] wrote:

Hey, I think this might still be worth adding as a "porcelaine" command.
Inexperienced users won't be able to guess tmsu repair --manual and will
try to tmsu mv instead. Or maybe provide the possibility for aliases and
define mv accordingly.


Reply to this email directly or view it on GitHub
#11 (comment).

from tmsu.

oniony avatar oniony commented on May 23, 2024

Please leave a +1 comment on this if you would like to see 'mv' subcommand:

$ tmsu mv /old/path /new/path

Which would be equivalent to:

$ mv /old/path /new/path && tmsu repair --manual /old/path /new/path

from tmsu.

coldfix avatar coldfix commented on May 23, 2024

I'd vote rather for some checked version similar to this: (;but maybe not implemented in shell;)

(
 ([[ -e /new/path ]] && ! [[ -e /old/path ]]) ||
 (! [[ -e /new/path ]] && mv /old/path /new/path)
) &&
tmsu repair --manual /old/path new/path

Making 'mv' a short and easy to remember fix when the file was already moved on disk.

from tmsu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.