mercurial/ui.py
branchstable
changeset 26820 71d5238f92e9
parent 26781 1aee2ab0f902
child 26896 5e46123e6c35
child 27392 00aa37c65e0a
equal deleted inserted replaced
26819:ba7eeeac9603 26820:71d5238f92e9
  1024             self[name] = path(name, rawloc=loc)
  1024             self[name] = path(name, rawloc=loc)
  1025 
  1025 
  1026         # Handle default-push, which is a one-off that defines the push URL for
  1026         # Handle default-push, which is a one-off that defines the push URL for
  1027         # the "default" path.
  1027         # the "default" path.
  1028         defaultpush = ui.config('paths', 'default-push')
  1028         defaultpush = ui.config('paths', 'default-push')
  1029         if defaultpush and 'default' in self:
  1029         if defaultpush:
       
  1030             # "default-push" can be defined without "default" entry. This is a
       
  1031             # bit weird, but is allowed for backwards compatibility.
       
  1032             if 'default' not in self:
       
  1033                 self['default'] = path('default', rawloc=defaultpush)
  1030             self['default']._pushloc = defaultpush
  1034             self['default']._pushloc = defaultpush
  1031 
  1035 
  1032     def getpath(self, name, default=None):
  1036     def getpath(self, name, default=None):
  1033         """Return a ``path`` from a string, falling back to a default.
  1037         """Return a ``path`` from a string, falling back to a default.
  1034 
  1038