mercurial/util.py
changeset 37873 bb1b15acfd06
parent 37844 8fb9985382be
child 37961 8298e55fc9a4
equal deleted inserted replaced
37872:51a2f8d199c7 37873:bb1b15acfd06
  2715         attrs = []
  2715         attrs = []
  2716         for a in ('scheme', 'user', 'passwd', 'host', 'port', 'path',
  2716         for a in ('scheme', 'user', 'passwd', 'host', 'port', 'path',
  2717                   'query', 'fragment'):
  2717                   'query', 'fragment'):
  2718             v = getattr(self, a)
  2718             v = getattr(self, a)
  2719             if v is not None:
  2719             if v is not None:
  2720                 attrs.append('%s: %r' % (a, v))
  2720                 attrs.append('%s: %r' % (a, pycompat.bytestr(v)))
  2721         return '<url %s>' % ', '.join(attrs)
  2721         return '<url %s>' % ', '.join(attrs)
  2722 
  2722 
  2723     def __bytes__(self):
  2723     def __bytes__(self):
  2724         r"""Join the URL's components back into a URL string.
  2724         r"""Join the URL's components back into a URL string.
  2725 
  2725