binwiederhier/syncany — pull request #5 by fabrice-rossi (2013-11-19 14:20:29+00:00)
Title: New output formats for the log command

Hi Philipp,

As promised, some modifications of the log command output. There are now two output formats (full and last).

In the "last" format, one line is printed for each file, the last version known by the database. The display is close to the one you used with two differences: the current path is used at the beginning of the line and the file Id is printed in hexadecimal.

The "full" format is similar to the original log display with the above modifications. In addition, it prints (as the name says) all the versions in reverse order. Moreover, it displays as a "title" the current path of the file and its id. On the junit test, this gives:
file1 b3bd89d064113fbe
2 19-11-13 13:48:48 rw-rw-r-- 20480 FILE CHANGED 31ee116172cba1aee6aad0481d277617ea10ed4a
1 19-11-13 13:48:48 rw-rw-r-- 20480 FILE NEW 18af5de85e119d23f47cdd30189a3f541a899561
file3 890d8a5a57b42077
1 19-11-13 13:48:48 rw-rw-r-- 20480 FILE NEW 6857f6fde61dc8dab1914e7b99481240947c4879
file2 25a1a0f66269d61a
1 19-11-13 13:48:48 rw-rw-r-- 20480 FILE NEW 2512bae3417cde59c3134f8a59e26cc81d102ea7

The implementation is straightforward but a bit convolved, I'll send later an email about my thoughts on the CLI internal design.

Best regards,

Fabrice