Mercurial > hg
comparison mercurial/dispatch.py @ 37717:0664be4f0c1f
hg: pass command intents to repo/peer creation (API)
The previous commit introduced a mechanism to declare command intents.
This commit changes the repository and peer instantiation mechanism
so the intents are passed down to each repository and peer type so
they can do with them whatever they please.
Currently, nobody does anything with any intent.
Differential Revision: https://phab.mercurial-scm.org/D3377
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 14 Apr 2018 09:57:44 -0700 |
parents | dfc51a482031 |
children | dc1ed7fe33e4 |
comparison
equal
deleted
inserted
replaced
37716:dfc51a482031 | 37717:0664be4f0c1f |
---|---|
926 repo.ui.fout = ui.fout | 926 repo.ui.fout = ui.fout |
927 repo.ui.ferr = ui.ferr | 927 repo.ui.ferr = ui.ferr |
928 else: | 928 else: |
929 try: | 929 try: |
930 repo = hg.repository(ui, path=path, | 930 repo = hg.repository(ui, path=path, |
931 presetupfuncs=req.prereposetups) | 931 presetupfuncs=req.prereposetups, |
932 intents=func.intents) | |
932 if not repo.local(): | 933 if not repo.local(): |
933 raise error.Abort(_("repository '%s' is not local") | 934 raise error.Abort(_("repository '%s' is not local") |
934 % path) | 935 % path) |
935 repo.ui.setconfig("bundle", "mainreporoot", repo.root, | 936 repo.ui.setconfig("bundle", "mainreporoot", repo.root, |
936 'repo') | 937 'repo') |