##// END OF EJS Templates
path: deprecated the `pushloc` attribute...
marmoute -
r50601:f27fbb90 default
parent child Browse files
Show More
@@ -736,7 +736,7 b' def pathsuboption(option, attr):'
736 736 return register
737 737
738 738
739 @pathsuboption(b'pushurl', b'pushloc')
739 @pathsuboption(b'pushurl', b'_pushloc')
740 740 def pushurlpathoption(ui, path, value):
741 741 u = url(value)
742 742 # Actually require a URL.
@@ -848,7 +848,8 b' class path:'
848 848 ``ui`` is the ``ui`` instance the path is coming from.
849 849 ``name`` is the symbolic name of the path.
850 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 854 If ``name`` is not defined, we require that the location be a) a local
854 855 filesystem path with a .hg directory or b) a URL. If not,
@@ -924,10 +925,18 b' class path:'
924 925 return self
925 926 new = self.copy()
926 927 new.main_path = self
927 if self.pushloc:
928 new._setup_url(self.pushloc)
928 if self._pushloc:
929 new._setup_url(self._pushloc)
929 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 940 def _validate_path(self):
932 941 # When given a raw location but not a symbolic name, validate the
933 942 # location is valid.
General Comments 0
You need to be logged in to leave comments. Login now