equal
deleted
inserted
replaced
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 |