Skip to content
Snippets Groups Projects
  1. Oct 23, 2019
  2. Oct 29, 2019
  3. Oct 27, 2019
  4. Oct 30, 2019
  5. Oct 25, 2019
  6. Oct 27, 2019
  7. Oct 25, 2019
    • Denis Laxalde's avatar
      packaging: remove version info from Breaks+Replaces in Debian package · 8fda98a68427
      Denis Laxalde authored
      The versioned Breaks: and Replaces: cause problem when trying to install
      our package over the one in Debian.
      
        $ sudo apt install ./packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        Note, selecting 'mercurial' instead of './packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb'
        Some packages could not be installed. This may mean that you have
        requested an impossible situation or if you are using the unstable
        distribution that some required packages have not yet been created
        or been moved out of Incoming.
        The following information may help to resolve the situation:
      
        The following packages have unmet dependencies:
         mercurial : Breaks: mercurial-common (< 5.2~rc0+15-buster-a2ff3aff81d2) but 5.2~rc0-1 is to be installed
        E: Unable to correct problems, you have held broken packages.
      
      Removing version information resolves the situation.
      8fda98a68427
  8. Oct 24, 2019
    • Denis Laxalde's avatar
      py3: fix generated non-ascii message in test-notify.t · 90ee1f61504e
      Denis Laxalde authored
      The resulting "Subject:" header contains an encoded word in Python 3 so
      we have to add distinct outputs for Python 3 but underlying values are
      the same:
      
          >>> from email.header import decode_header
          >>> decode_header('=?utf-8?b?w6AuLi4=?=')
          [(b'\xc3\xa0...', 'utf-8')]
      90ee1f61504e
    • Denis Laxalde's avatar
      py3: decode encoding literal before passing to .decode() · 910827a2cb20
      Denis Laxalde authored
      bytes.decode(<encoding>) wants an str as "encoding" parameter,
      it raises a TypeError if given a bytestring. encoding.encoding and
      encoding.fallbackencoding are bytes values.
      910827a2cb20
    • Denis Laxalde's avatar
      py3: decode payload of notify email · 33506cb43642
      Denis Laxalde authored
      This fixes one UnicodeEncodeError in test-notify.t:422 when testing the
      notify hook with non-ascii content (there are more later). We only
      decode on Python 3, since it's not safe for sure on Python 2.
      33506cb43642
    • Denis Laxalde's avatar
    • Denis Laxalde's avatar
      py3: use stdlib's parseaddr() to get sender header in notify extension · ac33550f63e8
      Denis Laxalde authored
      In Python 3, email headers are unicode string so using
      stringutil.email() will not work as it compares with bytestring. So
      let's use email.utils.parseaddr() from the stdlib which has a consistent
      behavior across Python versions. The same is done in patchbomb
      extension already.
      ac33550f63e8
    • Denis Laxalde's avatar
      py3: use a BytesParser in notify extension · ef81de93143e
      Denis Laxalde authored
      This is the first step to make the "long line" case in test-notify.t
      pass by fixing a UnicodeDecodeError on Python 3.
      
      We alias a parsebytes() in mail module, similarly as we already have a
      parse() function for Python 2 and Python 3 compatibility.
      ef81de93143e
    • Denis Laxalde's avatar
      py3: fix headencode() with display=False · 7d4f2e4899c5
      Denis Laxalde authored
      We previously called str() on a email.header.Header object. On Python 2,
      this returns a bytestring and the __str__ method is actually an alias to
      .encode() method. On Python 3, __str__ does not perform encoding (and
      returns a unicode string). To keep a consistent behavior across Python
      versions, we explicitly use .encode() and we wrap the result with
      encoding.strtolocal() to get a bytestring in all cases. As a side effect
      of forcing bytes conversion, we need to decode back in _addressencode().
      
      This is to make test-notify.t pass on Python 3.
      
      Also note that headers are now encoded in some patchbomb tests; this is
      because the charset is not always "us-ascii" ("iso-8859-1" otherwise) on
      Python 3.
      7d4f2e4899c5
    • Denis Laxalde's avatar
      mail: catch LookupError in headdecode() · 866bd2cf764b
      Denis Laxalde authored
      We already catch this exception in _encode() (called by headencode()).
      It gets raised when running test-notify.t with Python 3.
      866bd2cf764b
    • Denis Laxalde's avatar
      py3: account for extra line break in email headers in test-notify.t · 84c15836a2d7
      Denis Laxalde authored
      Long headers appears to be wrapped with new lines. In test-notify.t, we
      have a "filter.py" that replaces "\n" by " ", so we get an extra space
      in a Message-Id with a long value.
      84c15836a2d7
  9. Oct 10, 2019
  10. Oct 23, 2019
    • Ian Moody's avatar
      py3: use %d instead of %s when formatting an int into a bytestring · a2ff3aff81d2
      Ian Moody authored
      The latter wasn't noticed before since no tests exercise --confirm at all, let
      alone on an existing DREV.
      The former is only hit during an intermittent network issue during amending at
      the end of a phabsend, so doesn't seem testable.
      
      Differential Revision: https://phab.mercurial-scm.org/D7153
      a2ff3aff81d2
    • Denis Laxalde's avatar
      packaging: ship only a single binary Debian package · 7b638d25b8e4
      Denis Laxalde authored
      We merge the mercurial and mercurial-common binary packages into a
      single mercurial package. This is essentially to ease installation (and
      upgrade) using a simple "dpkg -i" command. This also simplifies
      debian/rules by removing arch (in)dependent cleanups during
      installation.
      
      We have the mercurial binary Breaks: and Replaces: mercurial-common so
      that the latter will be removed upon upgrade.
      
      Also note the change from "override_dh_install" to
      "override_dh_auto_install" in debian/rules: this is because we do not
      want "make install" to be run automatically as we need the
      --install-layout=deb of "setup.py install" (otherwise, files would end
      up in $DESTDIR/usr/local).
      7b638d25b8e4
    • Denis Laxalde's avatar
      packaging: avoid running bare "make install" in debian/rules · 11c85873e106
      Denis Laxalde authored
      We change the "override_dh_install" target to "override_dh_auto_install"
      in debian/rules (see dh_auto_install(1) for details). This is because we
      do not want "make install" to be run automatically as we need the
      --install-layout=deb of "setup.py install". Otherwise, files end up in
      $DESTDIR/usr/local. At the moment, this is not a problem since files
      installed in debian/tmp (the default location) are not packed into
      binary packages (because there are debian/mercurial and
      debian/mercurial-common directories). This is cleaner to avoid running
      make more than needed.
      11c85873e106
    • Denis Laxalde's avatar
    • Denis Laxalde's avatar
      4caf88845082
  11. Oct 22, 2019
  12. Oct 21, 2019
Loading