Hello SyncEvolution users!

I'm considering a change in the behavior of SyncEvolution's command
line. See the commit message below for details. The implementation is
currently in the for-master/cmdline-output branch. I'm posting this here
because I hope to get some feedback whether this change makes sense and
warn users about the change.

Ove, your Maemo UI still works by parsing the output, right? Beware that
you'll have to capture both stdout and stderr to get all output, if this
change gets in. I also updated some of the output strings - I don't
expect that to affect your UI, though.

commit 1fe3100c34aaed518fb28a0e2535ffae8e8971ee
Author: Patrick Ohly <[email protected]>
Date:   Wed Apr 11 14:38:54 2012 +0200

    command line: use both stdout and stderr
    
    Traditionally, the "syncevolution" command line tool mixed its
    INFO/ERROR/DEBUG messages into the normal stdout. This has the major
    drawback that error messages get lost during operations like
       syncevolution --export - @default addressbook | grep "John Doe"
    
    Now anything which not the expected result of the operation is always
    sent to stderr. Obviously this includes ERROR messages. INFO and DEBUG
    are harder to decide. Because they usually convey meta information
    about the running operation, they are also sent to stderr.
    
    This changes the behavior of
       syncevolution --run foo eds_event | less
    
    "less" will capture only the following output:
    
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    Local data changes to be applied during synchronization:
    *** eds_event ***
    no changes
    
    Synchronization successful.
    
    Changes applied during synchronization:
    +---------------|-----------------------|-----------------------|-CON-+
    |               |         LOCAL         |        REMOTE         | FLI |
    |        Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
    +---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
    |     eds_event |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
    |     two-way, 0 KB sent by client, 0 KB received                     |
    |     item(s) in database backup: 2 before sync, 2 after it           |
    +---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
    |          start Wed Apr 11 14:34:11 2012, duration 0:03min           |
    |               synchronization completed successfully                |
    +---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
    
    Data modified locally during synchronization:
    *** eds_event ***
    no changes
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    To get the traditional behavior with bash or sh as shell, use
       syncevolution --run foo eds_event 2>&1 | less
...

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to