~canonical-launchpad-branches/launchpad/+git/bzr-personal:cjwatson/export-git-repositories-new

Last commit made on 2019-09-26
Get this branch:
git clone -b cjwatson/export-git-repositories-new https://git.launchpad.net/~canonical-launchpad-branches/launchpad/+git/bzr-personal
Members of Canonical Launchpad Branches can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
cjwatson/export-git-repositories-new
Repository:
lp:~canonical-launchpad-branches/launchpad/+git/bzr-personal

Recent commits

290c39f... by Colin Watson

Fix GitRepositorySet.new, and export it on the webservice.

This was previously untested, and had been broken since r18222.

Now that namespace.createRepository can create the repository on the hosting
service, we can safely export this to create a bare repository via the API.
For example, this allows snapcraft to create a temporary repository, issue
an access token to it, and push code to it, all without needing to configure
an SSH key.

ad0604f... by Colin Watson

Push Git hosting creation down from XML-RPC endpoint to model.

Having the creation of the actual repository on disk be done by the XML-RPC
endpoint makes it difficult to expose other methods of creating
repositories.

I rearranged how target and owner defaults are set. We have to create the
repository on the hosting service as the last step to avoid problems with
rolling back transactions, so pushing this part down to the model also
requires pushing down target/owner default handling, and the callback
mechanism previously in place wasn't very suited to that.

I had to adjust the permission check in
GitRepositorySet.setDefaultRepository slightly, because pushing down
target/owner default handling is easier if the Unauthorized exception
message is more accurate. setDefaultRepositoryForOwner already raised
exceptions with accurate messages.

4a386ec... by Launchpad PQM Bot

[testfix][r=cjwatson][no-qa] Fix doctests to cope with added
 Content-Security-Policy header.

0c11e90... by Colin Watson

Fix doctests to cope with added Content-Security-Policy header.

e65c9fe... by Launchpad PQM Bot

[r=bloodearnest][no-qa] Set "Content-Security-Policy: frame-ancestors
 'self';
 " as well as "X-Frame-Options: SAMEORIGIN", for improved browser
 compatibility.

d830e01... by Launchpad PQM Bot

[r=bloodearnest][no-qa] Remove parts of lp.code.mail.patches that are
 unmodified from bzrlib.

d0b28b6... by Launchpad PQM Bot

[r=wgrant][bug=1824399] Add and export
 IGitRepository.issueAccessToken.

82c8f6a... by Colin Watson

Remove parts of lp.code.mail.patches that are unmodified from bzrlib.

lp.code.mail.patches was cloned-and-hacked from bzrlib.patches in order to
support git diffs, but at the time we were in a rush and ended up copying
the whole module rather than just the parts we needed to change. This
removes all the parts that were identical except for trivial details like
whitespace.

This will simplify porting to breezy.

8d307d8... by Colin Watson

Set "Content-Security-Policy: frame-ancestors self;" as well as "X-Frame-Options: SAMEORIGIN", for improved browser compatibility.

0c3dbb3... by Launchpad PQM Bot

[r=wgrant][bug=1824399][incr] Make the Git XML-RPC API honour user
 macaroons.