Some commits were on the master branch but not yet on the next branch due to a
pull request to master after those two branches diverged. This merge
ensures that next ⊇ master.
For `-f /dev/stdin`, the `pathname` of the parsing context will be empty
as for any other streamed input.
`instance_t::include_directive` did not work as expected for `-f /dev/stdin`
and relative file names. One would expect them to be relative to the current
directory rather than `/dev`.
This will lead to `While parsing file ""` messages. This could be
adjusted to read `While parsing standard input`, but maybe it's not
worth the special cases.
This commit also fixes bug 788: behaviour of source_context for '-f -'
`session_t::read_data` did not set context.pathname to `/dev/stdin`
for the special case `-f -`. I chose to adjust `source_context` too
as there is no sensible context if no file name is provided.
Aliases are now expanded not only if they occur by themselves, but also
if they occur as the beginning of a multi-part account. Given <alias
Food=Expenses:Food> the account <Food:Tomatos> should now be expanded to
<Expenses:Food:Tomatos>.
Added two compare structs for std::map to use. I tried to override
the < operator got a clean compile but map wasn't picking it up, I
couldn't figure out why so I took the less elegant route.
ledger would abort with the following error message:
TypeError: No Python class registered for C++ class boost::optional<std::string>
The changes pass a CallPolicy to make_getter when adding the transaction
code property for python, so that the correct to_python conversion is
made. For details see:
http://www.boost.org/doc/libs/1_52_0/libs/python/doc/v2/faq.html#topythonconversionfailed
The --time-colon option will display the value for a seconds
based commodity as real hours and minutes.
For example 8100 seconds by default will be displayed as 2.25
whereas with the --time-colon option they will be displayed
as 2:15.
'filename' returns the complete path/filename of the file containg the current xact.
This is inconvenient for some displays. filebase returns only the base name. For
completeness added filepath as well.
This was caused by both 'A' and 'bucket' using
default_account_directive. This function was still stripping the 'A'
directive, so the first character of the account name used with 'bucket'
was cut off. Maybe the code for the other directives should be changed
accordingly for consistency (put line + 1 in call instead of function).