Page MenuHomePhabricator

Add support for downloading branches, commit's and tags from diffusion gui
AbandonedPublic

Authored by Paladox on May 13 2016, 9:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 8, 5:45 PM
Unknown Object (File)
Wed, May 31, 1:37 PM
Unknown Object (File)
Mar 27 2023, 1:30 PM
Unknown Object (File)
Mar 25 2023, 10:20 AM
Unknown Object (File)
Mar 19 2023, 4:00 PM
Unknown Object (File)
Mar 19 2023, 4:00 PM
Unknown Object (File)
Mar 13 2023, 2:06 PM
Unknown Object (File)
Mar 11 2023, 6:01 PM
Subscribers
None

Details

Reviewers
mmodell
demon
Luke081515
greg
Patch without arc
git checkout -b D233 && curl -L https://phabricator.wikimedia.org/D233?download=true | git apply
Summary

This adds support for downloading from our github mirror.

The two formats supported by downloading are zip and gz (.tar.gz).

This will require all repos to have the same name as the mirror repo
otherwise downloading from the branch will not work.

Change-Id: Ifad2292404202ef3180f28cfdf690d423429dfc3

Diff Detail

Repository
rPHAB Phabricator
Branch
wmf/stable
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 517
Build 776: arc lint + arc unit

Event Timeline

Paladox retitled this revision from to Add support for downloading branches from diffusion gui.
Paladox updated this object.
Paladox edited the test plan for this revision. (Show Details)

Added support for downloading commits and tags.

Note not all commit's or branches or tags will be able to be downloaded if they are not on the github mirror.

Notably until we switch to phabricator mirroring the repos open patches will not be able to be downloaded from the mirrors due to gerrit not supporting that.

Adds the download zip and gz button to commit so when viewing a commit and looking at diff it now shows the download button on the right. It downloads from our github mirror.

Paladox retitled this revision from Add support for downloading branches from diffusion gui to Add support for downloading branches, commit's and tags from diffusion gui.May 14 2016, 3:02 PM
Paladox updated this object.
Luke081515 edited edge metadata.

Looks good for me, and worked at a test enviourment.

This revision is now accepted and ready to land.May 14 2016, 9:20 PM

Talked to @demon about this on the Release-Engineering-Team team meeting today. His opinion, and I agree completely, is that we should hold off on this until we have repositories replicating from diffusion to github, then we can use the github url that is configured in phabricator to make sure that the link to download is actually pointing to the right URL rather than depending on $repository->getName() which might not always match.

More specifically, we can use the conduit method diffusion.uri.edit as documented here and here

In D233#4824, @mmodell wrote:

More specifically, we can use the conduit method diffusion.uri.edit as documented here and here

@mmodell But if the repo is git@github.com and not https://github.com then it wont work.

Do you know how we can get the mirror url from GitHub. Not sure what code to do that. I was thinking that but then I didn't know which code does that and if the url is like git@github that wont work unless your in a git client.

In D233#4825, @Paladox wrote:
In D233#4824, @mmodell wrote:

More specifically, we can use the conduit method diffusion.uri.edit as documented here and here

@mmodell But if the repo is git@github.com and not https://github.com then it wont work.

Why would we replicate over SSH?

In D233#4827, @demon wrote:
In D233#4825, @Paladox wrote:
In D233#4824, @mmodell wrote:

More specifically, we can use the conduit method diffusion.uri.edit as documented here and here

@mmodell But if the repo is git@github.com and not https://github.com then it wont work.

Why would we replicate over SSH?

@demon We woulden't replicate over ssh for download's unless I'm wrong I thaught it would be easy to just use GitHub links for the download instead of building a back-end for downloads in diffusion.

@demon looking at https://phabricator.wikimedia.org/diffusion/MW/manage/uris/ it shows we are using https not ssh. @mmodell is there code we can use to detect a mirror ui please.