Show More
@@ -736,7 +736,7 b' def pathsuboption(option, attr):' | |||||
736 | return register |
|
736 | return register | |
737 |
|
737 | |||
738 |
|
738 | |||
739 | @pathsuboption(b'pushurl', b'pushloc') |
|
739 | @pathsuboption(b'pushurl', b'_pushloc') | |
740 | def pushurlpathoption(ui, path, value): |
|
740 | def pushurlpathoption(ui, path, value): | |
741 | u = url(value) |
|
741 | u = url(value) | |
742 | # Actually require a URL. |
|
742 | # Actually require a URL. | |
@@ -848,7 +848,8 b' class path:' | |||||
848 | ``ui`` is the ``ui`` instance the path is coming from. |
|
848 | ``ui`` is the ``ui`` instance the path is coming from. | |
849 | ``name`` is the symbolic name of the path. |
|
849 | ``name`` is the symbolic name of the path. | |
850 | ``rawloc`` is the raw location, as defined in the config. |
|
850 | ``rawloc`` is the raw location, as defined in the config. | |
851 | ``pushloc`` is the raw locations pushes should be made to. |
|
851 | ``_pushloc`` is the raw locations pushes should be made to. | |
|
852 | (see the `get_push_variant` method) | |||
852 |
|
853 | |||
853 | If ``name`` is not defined, we require that the location be a) a local |
|
854 | If ``name`` is not defined, we require that the location be a) a local | |
854 | filesystem path with a .hg directory or b) a URL. If not, |
|
855 | filesystem path with a .hg directory or b) a URL. If not, | |
@@ -924,10 +925,18 b' class path:' | |||||
924 | return self |
|
925 | return self | |
925 | new = self.copy() |
|
926 | new = self.copy() | |
926 | new.main_path = self |
|
927 | new.main_path = self | |
927 | if self.pushloc: |
|
928 | if self._pushloc: | |
928 | new._setup_url(self.pushloc) |
|
929 | new._setup_url(self._pushloc) | |
929 | return new |
|
930 | return new | |
930 |
|
931 | |||
|
932 | def pushloc(self): | |||
|
933 | """compatibility layer for the deprecated attributes""" | |||
|
934 | from .. import util # avoid a cycle | |||
|
935 | ||||
|
936 | msg = "don't use path.pushloc, use path.get_push_variant()" | |||
|
937 | util.nouideprecwarn(msg, b"6.5") | |||
|
938 | return self._pushloc | |||
|
939 | ||||
931 | def _validate_path(self): |
|
940 | def _validate_path(self): | |
932 | # When given a raw location but not a symbolic name, validate the |
|
941 | # When given a raw location but not a symbolic name, validate the | |
933 | # location is valid. |
|
942 | # location is valid. |
General Comments 0
You need to be logged in to leave comments.
Login now