add metadata command to get/set metadata

Adds metadata log, and command.

Note that unsetting field values seems to currently be broken.
And in general this has had all of 2 minutes worth of testing.

This commit was sponsored by Julien Lefrique.
This commit is contained in:
Joey Hess 2014-02-12 21:12:22 -04:00
parent 1b79d18a40
commit 9f7e76130e
9 changed files with 312 additions and 32 deletions

View file

@ -145,20 +145,6 @@ a tag was removed:
1287290991.152124s tag +baz
1291237510.141453s tag -bar
The end result is that tags foo and baz are set. This can be simplified:
1291237510.141453s tag +foo +baz -bar
Note the reuse of the most recent timestamp in the simplified version,
rather than putting in the timestamp when the simplification was done.
This ensures that is some other repo is making changes, they won't get
trampled over. For example:
1291237510.141453s tag +foo +baz -bar
1291239999.000000s tag +bar -foo
Now tags bar and baz are set.
# efficient metadata lookup
Looking up metadata for filtering so far requires traversing all keys in