Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHGe6df205a876c: templatekw: remove pycompat.iteritems()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/templatekw.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
d3d00e3a7796 | 10717d6ba4fd | Gregory Szorc | Feb 21 2022, 1:13 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | D12339 ui: use input() directly | |
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
all_paths = urlutil.list_paths(repo.ui) | all_paths = urlutil.list_paths(repo.ui) | ||||
urls = util.sortdict((k, p.rawloc) for k, p in all_paths) | urls = util.sortdict((k, p.rawloc) for k, p in all_paths) | ||||
def makemap(k): | def makemap(k): | ||||
ps = paths[k] | ps = paths[k] | ||||
d = {b'name': k} | d = {b'name': k} | ||||
if len(ps) == 1: | if len(ps) == 1: | ||||
d[b'url'] = ps[0].rawloc | d[b'url'] = ps[0].rawloc | ||||
sub_opts = pycompat.iteritems(ps[0].suboptions) | sub_opts = ps[0].suboptions.items() | ||||
sub_opts = util.sortdict(sorted(sub_opts)) | sub_opts = util.sortdict(sorted(sub_opts)) | ||||
d.update(sub_opts) | d.update(sub_opts) | ||||
path_dict = util.sortdict() | path_dict = util.sortdict() | ||||
for p in ps: | for p in ps: | ||||
sub_opts = util.sortdict(sorted(p.suboptions.items())) | sub_opts = util.sortdict(sorted(p.suboptions.items())) | ||||
path_dict[b'url'] = p.rawloc | path_dict[b'url'] = p.rawloc | ||||
path_dict.update(sub_opts) | path_dict.update(sub_opts) | ||||
d[b'urls'] = [path_dict] | d[b'urls'] = [path_dict] |