Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/utils/urlutil.py @ 50931:ceac1bd816f7
path-suboption: use str for "_pushloc" suboptions
That second argument refer to an attribute and do not needs to be bytes.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 30 Aug 2023 00:49:52 +0200 |
parents | b59ad4292c7a |
children | 35885dbdc927 |
comparison
equal
deleted
inserted
replaced
50930:b59ad4292c7a | 50931:ceac1bd816f7 |
---|---|
693 def display_bool(value): | 693 def display_bool(value): |
694 """display a boolean suboption back to the user""" | 694 """display a boolean suboption back to the user""" |
695 return b'yes' if value else b'no' | 695 return b'yes' if value else b'no' |
696 | 696 |
697 | 697 |
698 @pathsuboption(b'pushurl', b'_pushloc') | 698 @pathsuboption(b'pushurl', '_pushloc') |
699 def pushurlpathoption(ui, path, value): | 699 def pushurlpathoption(ui, path, value): |
700 u = url(value) | 700 u = url(value) |
701 # Actually require a URL. | 701 # Actually require a URL. |
702 if not u.scheme: | 702 if not u.scheme: |
703 msg = _(b'(paths.%s:pushurl not a URL; ignoring: "%s")\n') | 703 msg = _(b'(paths.%s:pushurl not a URL; ignoring: "%s")\n') |