diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-03-09 23:59:16 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-03-09 23:59:16 (GMT) |
commit | a7c38041f2bf8cf878490b5ca4173fe02df601c3 (patch) | |
tree | 83a75fd1291adf674631e3f87e99274b53c48cd1 | |
parent | cfa4180307cb9b3ec4013cb920d5bc179b7ed207 (diff) | |
parent | d3cb04fc3ebb456abe6f9ca1226e4f94bf777789 (diff) |
Merge commit 'refs/top-bases/t/testsuite' into t/testsuite
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | README | 5 | ||||
-rwxr-xr-x | bin/copy-to-journal | 13 | ||||
-rw-r--r-- | configure.ac | 2 |
4 files changed, 15 insertions, 11 deletions
@@ -1,3 +1,6 @@ +v0.87.3 2010-03-08 +* rebuild index on migration #1787 + v0.87.2 2009-12-21 * copy-to-journal dbus error #573 * file descriptor leak in filestore.retrieve() #1550 @@ -8,6 +11,9 @@ v0.87.1 2009-12-01 * Make reading version file more robust (sayamindu) #1562 * Use gobject_timeout_add_seconds to make power usage more efficient (sayamindu) #1567 +v0.86.2 2010-03-08 +* rebuild index on migration #1787 + v0.86.1 2009-10-01 * Screenshot file is not deleted #1445 @@ -27,16 +27,15 @@ Storage format history 1 0.84.x Refactoring, start using indexes -2 0.86.x +2 0.86.0, 0.86.1 Add sorting by title and mtime 3 not-mainstream test versioning support -4 0.88, 0.86.2 +4 0.86.2, 0.88.x version bump to force index rebuild that may have been missed during the migration to version 2 (SL#1787) 5 not-mainstream test versioning support (version bump for SL#1787) - diff --git a/bin/copy-to-journal b/bin/copy-to-journal index d6ae6f3..ca6f872 100755 --- a/bin/copy-to-journal +++ b/bin/copy-to-journal @@ -17,10 +17,11 @@ if os.path.exists("/tmp/olpc-session-bus"): os.environ["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/tmp/olpc-session-bus" from sugar.datastore import datastore +from sugar import mime def build_option_parser(): - usage = "Usage: %prog <file> -m MIMETYPE [-t TITLE] [-d DESC] [-T tag1 [-T tag2 ...]]" + usage = "Usage: %prog <file> [-m MIMETYPE] [-t TITLE] [-d DESC] [-T tag1 [-T tag2 ...]]" parser = optparse.OptionParser(usage=usage) parser.add_option("-t", "--title", action="store", dest="title", @@ -54,17 +55,15 @@ if __name__ == "__main__": parser.print_help() exit(0) - if not options.mimetype: - print 'Error: No MIME-type given.' - parser.print_help() - exit(0) - try: entry = datastore.create() entry.set_file_path(absname) # Set the mimetype to the provided one. - entry.metadata['mime_type'] = options.mimetype + if options.mimetype is None: + entry.metadata['mime_type'] = mime.get_for_file(absname) + else: + entry.metadata['mime_type'] = options.mimetype # If no title is given, use the filename. if options.title: diff --git a/configure.ac b/configure.ac index 0a482fd..c8a3ca9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([sugar-datastore],[0.87.2],[],[sugar-datastore]) +AC_INIT([sugar-datastore],[0.87.3],[],[sugar-datastore]) AC_PREREQ([2.59]) |