simon-git: bob (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Jul 5 08:37:46 BST 2020


TL;DR:
  2f5a63f Python 3 prep: detab Python source.
  cdefc65 P3 prep: use 'as' in except clauses instead of ','.
  1653398 P3 prep: use new '0o700' octal literal syntax.
  e13cbb0 P3 prep: find StringIO in the io module.
  e2951e2 P3 prep: provide a mimicry of os.popen.
  b286d11 P3 prep: stop using the 'types' module.
  5fc9725 P3 prep: make our exception class inherit from Exception.
  2ba235f P3 prep: call methods on strings, not functions in 'string'.
  49357ed Switch bob over to Python 3.
  46d5def Switch bob-deliver to Python 3.

Repository:     https://git.tartarus.org/simon/bob.git
On the web:     https://git.tartarus.org/?p=simon/bob.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2020-07-05 08:37:46

commit 2f5a63f753e1deb420f4b149abbe87d4ca70cea5
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=2f5a63f753e1deb420f4b149abbe87d4ca70cea5;hp=e6979b0832d08edb5b8eb5645dcf48b87c4d6dd5
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jul 3 20:13:58 2020 +0100

    Python 3 prep: detab Python source.
    
    P3 will complain about tab/space mixtures which P2 is happy with. In
    advance of migration, get rid of them.

 bob                 | 274 ++++++++++++++++++++++++++--------------------------
 bob-delegate-server | 122 +++++++++++------------
 2 files changed, 198 insertions(+), 198 deletions(-)

commit cdefc65ba506ac17c46e4168c774483447a333c2
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=cdefc65ba506ac17c46e4168c774483447a333c2;hp=2f5a63f753e1deb420f4b149abbe87d4ca70cea5
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jul 3 20:15:04 2020 +0100

    P3 prep: use 'as' in except clauses instead of ','.
    
    The archaic comma syntax is illegal in P3.

 bob                 | 8 ++++----
 bob-delegate-server | 4 ++--
 checkout.py         | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

commit 1653398d518962321e196c176a5de763a26721c7
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=1653398d518962321e196c176a5de763a26721c7;hp=cdefc65ba506ac17c46e4168c774483447a333c2
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jul 3 20:16:25 2020 +0100

    P3 prep: use new '0o700' octal literal syntax.

 bob-delegate-server | 2 +-
 execute.py          | 2 +-
 parse.py            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

commit e13cbb078309e193f57a4da805aedd0394933bc1
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=e13cbb078309e193f57a4da805aedd0394933bc1;hp=1653398d518962321e196c176a5de763a26721c7
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jul 3 20:19:56 2020 +0100

    P3 prep: find StringIO in the io module.
    
    In P3, StringIO won't be a module in its own right any more.

 bob-delegate-server | 4 ++--
 bob-deliver         | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

commit e2951e2f9320687872d9a7be85e0708410e550db
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=e2951e2f9320687872d9a7be85e0708410e550db;hp=e13cbb078309e193f57a4da805aedd0394933bc1
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jul 4 09:42:15 2020 +0100

    P3 prep: provide a mimicry of os.popen.
    
    It's not exact, but it should be good enough for a hasty port. It
    would be nice to come back and rethink all this code in terms of the
    more basic facilities in 'subprocess', but for the immediate goal of
    porting to P3, that's not necessary.

 bob-delegate-server |  4 ++--
 bob-deliver         |  2 +-
 checkout.py         | 36 ++++++++++++++++++------------------
 misc.py             | 29 +++++++++++++++++++++++++++++
 parse.py            |  6 +++---
 5 files changed, 53 insertions(+), 24 deletions(-)

commit b286d1150f308171a59b811d4ea0e5833ed86f2d
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=b286d1150f308171a59b811d4ea0e5833ed86f2d;hp=e2951e2f9320687872d9a7be85e0708410e550db
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jul 4 09:46:43 2020 +0100

    P3 prep: stop using the 'types' module.
    
    You can do it more easily these days, even in P2.

 execute.py | 3 +--
 parse.py   | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

commit 5fc9725a9a834b75b32649622cafaf538a65160b
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=5fc9725a9a834b75b32649622cafaf538a65160b;hp=b286d1150f308171a59b811d4ea0e5833ed86f2d
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jul 4 09:47:19 2020 +0100

    P3 prep: make our exception class inherit from Exception.
    
    In P3, it'll become illegal to throw anything that doesn't derive from
    at least BaseException.

 misc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 2ba235f55f55a6c72512e5e12ebaf0fbba3d7e07
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=2ba235f55f55a6c72512e5e12ebaf0fbba3d7e07;hp=5fc9725a9a834b75b32649622cafaf538a65160b
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jul 4 09:54:46 2020 +0100

    P3 prep: call methods on strings, not functions in 'string'.

 bob         | 16 ++++++++--------
 checkout.py | 14 +++++++-------
 cmdline.py  |  2 +-
 misc.py     |  2 +-
 parse.py    |  4 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)

commit 49357ed66f1dc5097e6fd1a8fa43913293496dfb
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=49357ed66f1dc5097e6fd1a8fa43913293496dfb;hp=2ba235f55f55a6c72512e5e12ebaf0fbba3d7e07
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jul 4 09:43:50 2020 +0100

    Switch bob over to Python 3.
    
    This isn't just a question of rewriting the #! lines, because now I
    have to also make some changes that wouldn't have also worked in P2.
    
    Mostly this is about bytes vs unicode. I've split my popen_[rw]
    classes into Unicode and binary versions, and said which is which. At
    the moment, because it's the course of least effort, I've switched
    over to binary in only the places I immediately needed to: the whole
    delegate-server wire protocol is binary (it has to transfer tarballs
    and executables) and so is the git cat-file command that retrieves
    commit blobs during checkout / export.
    
    One other smaller change, in parse.py: 'maketrans' is now a static
    method of the str class, not a function in the string module.

 bob                 |  4 ++--
 bob-delegate-server | 58 +++++++++++++++++++++++++++--------------------------
 checkout.py         |  4 ++--
 execute.py          |  7 +++----
 log.py              | 20 +++++++++++-------
 misc.py             | 35 +++++++++++++++++++++++++++++---
 name.py             |  2 +-
 parse.py            | 35 ++++++++++++++++----------------
 8 files changed, 101 insertions(+), 64 deletions(-)

commit 46d5def9f6326f9379dfea0db8e44b44e7a6ac90
web diff https://git.tartarus.org/?p=simon/bob.git;a=commitdiff;h=46d5def9f6326f9379dfea0db8e44b44e7a6ac90;hp=49357ed66f1dc5097e6fd1a8fa43913293496dfb
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jul 5 08:35:19 2020 +0100

    Switch bob-deliver to Python 3.
    
    This is quite fiddly, because _most_ of it has to switch from str to
    bytes, and there are a lot of comparisons like 'if data[n:m] != "\xDD"'
    to which Python 3 (now that 'data' has type 'bytes') will silently
    return False rather than diagnosing the type mismatch. So despite some
    initial manual testing, I don't know I've got all of this right yet.
    I'm going to have to put it into service and see.

 bob-deliver | 63 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 32 insertions(+), 31 deletions(-)



More information about the tartarus-commits mailing list