MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / parseLegacy

Method parseLegacy

src/Task.cpp:742–777  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// No legacy formats are currently supported as of 2.4.0.

Source from the content-addressed store, hash-verified

740////////////////////////////////////////////////////////////////////////////////
741// No legacy formats are currently supported as of 2.4.0.
742void Task::parseLegacy(const std::string& line) {
743 switch (determineVersion(line)) {
744 // File format version 1, from 2006-11-27 - 2007-12-31, v0.x+ - v0.9.3
745 case 1:
746 throw std::string(
747 "Taskwarrior no longer supports file format 1, originally used between 27 November 2006 "
748 "and 31 December 2007.");
749
750 // File format version 2, from 2008-1-1 - 2009-3-23, v0.9.3 - v1.5.0
751 case 2:
752 throw std::string(
753 "Taskwarrior no longer supports file format 2, originally used between 1 January 2008 "
754 "and 12 April 2009.");
755
756 // File format version 3, from 2009-3-23 - 2009-05-16, v1.6.0 - v1.7.1
757 case 3:
758 throw std::string(
759 "Taskwarrior no longer supports file format 3, originally used between 23 March 2009 and "
760 "16 May 2009.");
761
762 // File format version 4, from 2009-05-16 - today, v1.7.1+
763 case 4:
764 break;
765
766 default:
767#ifdef PRODUCT_TASKWARRIOR
768 std::stringstream message;
769 message << "Invalid fileformat at line '" << line << '\'';
770 Context::getContext().debug(message.str());
771#endif
772 throw std::string("Unrecognized Taskwarrior file format or blank line in data.");
773 break;
774 }
775
776 recalc_urgency = true;
777}
778
779////////////////////////////////////////////////////////////////////////////////
780std::string Task::composeJSON(bool decorate /*= false*/) {

Callers

nothing calls this directly

Calls 1

debugMethod · 0.45

Tested by

no test coverage detected