Merge branch '2.4.5' of ssh://git.tasktools.org/tm/task into 2.4.5

This commit is contained in:
Paul Beckingham 2015-07-03 21:01:58 -04:00
commit 59b576f9d4
6 changed files with 14 additions and 7 deletions

View file

@ -25,6 +25,8 @@
- Enable "task sync" support by default. "cmake -DENABLE_SYNC=OFF" allows
disabling it and building Taskwarrior without libgnutls available.
- An attempt to add or remove a virtual tag is now an error (thanks to Scott M).
- json.array now defaults to "on", making "export" output a JSON array that
can be parsed by most JSON libraries without changes.
------ current release ---------------------------

View file

@ -394,9 +394,12 @@ Enables or disables access to Taskwarrior internals and task metadata on the
command line. Defaults to on.
.TP
.B json.array=off
Determines whether the query command encloses the JSON output in '[...]' to
create a properly-formed JSON array. Defaults to off.
.B json.array=on
Determines whether the export command encloses the JSON output in '[...]' and
adds ',' after each exported task object to create a properly-formed JSON
array.
With json.array=off, export writes raw JSON objects to STDOUT, one per line.
Defaults to on.
.TP
.B _forcecolor=no

View file

@ -106,7 +106,7 @@ std::string Config::_defaults =
"xterm.title=no # Sets xterm title for some commands\n"
"expressions=infix # Prefer infix over postfix expressions\n"
"dom=on # Support DOM access\n"
"json.array=off # Enclose JSON output in [ ]\n"
"json.array=on # Enclose JSON output in [ ]\n"
"abbreviation.minimum=2 # Shortest allowed abbreviation\n"
"\n"
"# Dates\n"

View file

@ -48,7 +48,7 @@ class TestExportCommand(TestCase):
self.t(('add', 'test'))
def export(self, identifier):
return json.loads(self.t((str(identifier), 'export'))[1].strip())
return json.loads(self.t((str(identifier), 'rc.json.array=off', 'export'))[1].strip())
def assertType(self, value, type):
self.assertEqual(isinstance(value, type), True)

View file

@ -44,7 +44,8 @@ $source_dir =~ s{[^/]+$}{..};
if (open my $fh, '>', $rc)
{
print $fh "data.location=.\n",
"verbose=no\n";
"verbose=no\n",
"json.array=off";
close $fh;
}

View file

@ -44,7 +44,8 @@ if (open my $fh, '>', $rc)
"verbose=off\n",
"confirmation=no\n",
"defaultwidth=100\n",
"dateformat=m/d/Y\n";
"dateformat=m/d/Y\n",
"json.array=off";
close $fh;
}