lp:~mterry/duplicity/argv-encode

Created by Michael Terry and last modified
Get this branch:
bzr branch lp:~mterry/duplicity/argv-encode
Only Michael Terry can upload to this branch. If you are Michael Terry please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Michael Terry
Project:
Duplicity
Status:
Merged

Recent revisions

951. By Michael Terry

Encode sys.argv using system filename encoding before printing

950. By ede

recommit: implement fix as suggested by original autor
http://lists.nongnu.org/archive/html/duplicity-talk/2013-11/msg00017.html

949. By Kenneth Loafman

Reformat to be more consistent. Remove tabs.

948. By Kenneth Loafman

* Reverted changes to gdocsbackend.py

947. By Kenneth Loafman

Fix conflicts.

946. By Kenneth Loafman

* Restored missing line from patch of gdocsbackend.py

945. By Kenneth Loafman

* Merged in lp:~mterry/duplicity/encoding
  - This branch hopefully fixes two filename encoding issues:
  - Users in bug 989496 were noticing a UnicodeEncodeError exception which
    happens (as far as I can tell) because some backends (like webdav) are
    returning unicode filenames from list(). When these filenames are combined
    with the utf8 translations of log messages, either (A) the default ascii
    encoding can't handle promoting the utf8 bytes or -- if there aren't any
    utf8 bytes in the translation -- (B) the resulting unicode string raises
    an error later when log.py tries to upgrade the string again to unicode
    for printing.
  - This fix is largely implemented by adding a wrapper for backend list()
    implementations. This wrapper ensures that duplicity internals always see
    a byte string. (I'd like to eventually use this same wrapping strategy to
    implement generic retry support without backends having to add any logic,
    but that's just a thought for the future.)
  - That is, the fix for issue #1 is completely inside backend.py and the
    changes to backends/*.py.
  - The rest of the invasive changes deal with filenames that may not be valid
    utf8. This is much rarer, but possible. For proper handling of this, we
    need to print using unicode, and convert filenames from the system filename
    encoding to unicode, gracefully handling conversion errors. Some of the
    filenames we print are remote names. Who knows what encoding they are in;
    it could be different than the system filename encoding. 99% of the time,
    everything will be utf8 and we're fine. If we do get conversion errors,
    the only effect should be some question mark characters in duplicity
    logging output.
  - I tried to convert as much of the actual codebase to use unicode for
    printing. But I stopped short of adding an assert in log.py to enforce
    unicode, because I didn't want to go through all the backend code and
    manually adjust those bits without being able to test each one.

944. By Kenneth Loafman

Nuke tabs.

943. By Kenneth Loafman

* Merged in lp:~ed.so/duplicity/debian.dav.mkdir
  - upstream debian patch "webdav create folder recursively"
    http://patch-tracker.debian.org/package/duplicity/0.6.22-2

942. By Kenneth Loafman

* Merged in lp:~ed.so/duplicity/debian.paramiko.log
  - upstream debian patch "paramiko logging"
    http://patch-tracker.debian.org/package/duplicity/0.6.22-2

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:duplicity/0.6
This branch contains Public information 
Everyone can see this information.

Subscribers