1
0
Fork 0
flightgear/scripts/python
Florent Rougon 8693e442d7 terrasync.py: add options --mode and --report
You may now call terrasync.py with --mode=sync or --mode=check. 'sync'
mode is the default and corresponds to terrasync.py's usual behavior.

In 'check' mode, terrasync.py never writes to disk and aborts at the
first mismatch between local and remote data. The exit status in 'check'
mode is:
  - 0 if the program terminated successfully and no mismatch was found
    between the local and remote repositories;
  - 1 in case an error was encountered;
  - 2 if there was a mismatch between local and remote data.

In 'sync' mode, the exit status is:
  - 0 if the program terminated successfully;
  - 1 in case an error was encountered.

A mismatch in 'check' mode is *not* an error, it is just one of the two
expected results. An error is a worse condition (uncaught exception,
network retrieval aborted after retrying failed, stuff like that).

Additionally, calling terrasync.py with --report causes it to print
lists of:
  - files and dirs that were missing or had mismatching hashes (this is
    okay in 'sync' mode: these things have been "fixed" in the target
    directory before the report was printed);
  - files and dirs that have been found to be orphaned (i.e., found
    under the target directory but not mentioned in the corresponding
    .dirindex file). These are the ones removed in 'sync' mode when
    --remove-orphan is passed.
2018-02-03 11:22:56 +01:00
..
demo.py George PATTERSON: 2006-10-29 12:34:26 +00:00
FGFSDemo.py Fixed a bug in FlightGear.py. Splitting name,value,type using whitespace 2002-07-22 23:25:28 +00:00
FlightGear.py George PATTERSON: 2006-10-29 12:34:26 +00:00
nasal_api_doc.py Ignore empty lines in html output. 2012-03-25 10:34:50 +02:00
terrasync.py terrasync.py: add options --mode and --report 2018-02-03 11:22:56 +01:00