1
0
Fork 0
flightgear/scripts
Florent Rougon 6d323bbbdc terrasync.py: prepare the terrain for --mode and --report
- Add computeHash() utility function that can work with any file-like
  object (e.g., a connected socket).

- Rename hash_of_file() to hashForFile(), and of course implement it
  using our new computeHash().

- Add class HTTPSocketRequest derived from HTTPGetCallback. It allows
  one to process data from the network without storing it to a file (it
  uses the file-like interface provided by http.client.HTTPResponse).

  The callback returns the http.client.HTTPResponse object, which can be
  conveniently used in a 'with' statement.

- Simplify the API of TerraSync.updateDirectory(): its 'dirIndexHash'
  argument must now be a hash (a string); the None object is not allowed
  anymore (with the soon-to-come addition of --mode=check, having to
  deal with this special case in updateDirectory() would make the logic
  too difficult to follow, or we would have to really completely
  separate check-only mode from update mode, which would entail code
  duplication).

  Since TerraSync.updateDirectory() must now always have a hash to work
  with, compute the hash of the root '.dirindex' file from the server in
  TerraSync.start(), using our new HTTPSocketRequest class---which was
  written for this purpose, since that will have to work in check-only
  mode (but not only), where we don't want to write any file to disk.

- TerraSync.updateFile(): correctly handle the case where a directory
  inside the TerraSync repository is (now) a file according to the
  server: the directory must be recursively removed before the file can
  be downloaded in the place formerly occupied by the directory.

- Add stub class Report. Its methods do nothing for now, but are already
  called in a couple of appropriate places. The class will be completed
  in a future commit, of course.
2018-02-03 11:22:56 +01:00
..
atis Update ATIS voice generation scripts 2012-10-13 15:45:15 +02:00
completion Mark enhanced lighting options and --adf as deprecated 2017-06-04 16:56:17 +02:00
debug Goodbye automake. 2011-11-01 11:15:53 +00:00
example Goodbye automake. 2011-11-01 11:15:53 +00:00
java/FGClient #718: java client example not compiling 2012-03-27 21:06:29 +02:00
perl Goodbye automake. 2011-11-01 11:15:53 +00:00
python terrasync.py: prepare the terrain for --mode and --report 2018-02-03 11:22:56 +01:00
syntax gedit syntaxhighlight/snippet support for Nasal. 2013-11-07 14:30:03 +01:00
tools Fix syntax for IF DEFINED conditionals 2010-11-14 23:32:37 +00:00
CMakeLists.txt Add CMake Linux install directives for the icons and the .desktop file 2017-05-24 22:47:01 +02:00