While tracking an iusse I came to https://gerrit.wikimedia.org/r/#/c/7986/ (example case) In the list of files I clicked on https://gerrit.wikimedia.org/r/#/c/7986/14/includes/UserMailer.php
Now I am "desperately seeking" a link to _show the raw file content after the commit in the __browser__,__ _but only found a link "(Download)" which starts a zip download. This is not what I wanted.
Is there a solution which I have overlooked? Tom
Le 11/12/12 10:42, Thomas Gries a écrit :
While tracking an iusse I came to https://gerrit.wikimedia.org/r/#/c/7986/ (example case) In the list of files I clicked on https://gerrit.wikimedia.org/r/#/c/7986/14/includes/UserMailer.php
Now I am "desperately seeking" a link to _show the raw file content after the commit in the __browser__,__ _but only found a link "(Download)" which starts a zip download. This is not what I wanted.
Is there a solution which I have overlooked?
You can get the patch locally using: - the checkout / patch links under each patchset. - git-review if you want to look at last patchset
Another way is to use Gitweb. When looking at the Gerrit change on https://gerrit.wikimedia.org/r/#/c/7986/ , you will find next to each patchset entry a "gitweb" link. That points to a page showing the commit metadata and the list of files changed with 4 links diff, blob, blame and history. Blob is what you are looking for :)
On 11 December 2012 11:42, Thomas Gries mail@tgries.de wrote:
While tracking an iusse I came to https://gerrit.wikimedia.org/r/#/c/7986/ (example case) In the list of files I clicked on https://gerrit.wikimedia.org/r/#/c/7986/14/includes/UserMailer.php
Now I am "desperately seeking" a link to _show the raw file content after the commit in the __browser__,__ _but only found a link "(Download)" which starts a zip download. This is not what I wanted.
Is there a solution which I have overlooked?
If you just want to view the content, in diff view click Preferences, on the left bottom choose Whole File as context and click Update. It is no good for copy-pasting though.
-Niklas
-- Niklas Laxström
This is actually my biggest annoyance with gerrit—that I can't view raw code from the change view. I can't fathom why they have a zip download link, but not a view link. Then I could copy code without copying all the line numbers.
Ryan Kaldari
On 12/11/12 9:25 AM, Niklas Laxström wrote:
On 11 December 2012 11:42, Thomas Gries mail@tgries.de wrote:
While tracking an iusse I came to https://gerrit.wikimedia.org/r/#/c/7986/ (example case) In the list of files I clicked on https://gerrit.wikimedia.org/r/#/c/7986/14/includes/UserMailer.php
Now I am "desperately seeking" a link to _show the raw file content after the commit in the __browser__,__ _but only found a link "(Download)" which starts a zip download. This is not what I wanted.
Is there a solution which I have overlooked?
If you just want to view the content, in diff view click Preferences, on the left bottom choose Whole File as context and click Update. It is no good for copy-pasting though.
-Niklas
-- Niklas Laxström
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I found a solution to the problem: If a gerrit administrator declares the mimetypes of the files to be safe they will be displayed in-browser rather than downloaded as zip files: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_i...
Could someone edit the gerrit.config file to declare php, javascript, and css files as 'safe'?
Ryan Kaldari
On 12/11/12 10:47 AM, Ryan Kaldari wrote:
This is actually my biggest annoyance with gerrit—that I can't view raw code from the change view. I can't fathom why they have a zip download link, but not a view link. Then I could copy code without copying all the line numbers.
Ryan Kaldari
On 12/11/12 9:25 AM, Niklas Laxström wrote:
On 11 December 2012 11:42, Thomas Gries mail@tgries.de wrote:
While tracking an iusse I came to https://gerrit.wikimedia.org/r/#/c/7986/ (example case) In the list of files I clicked on https://gerrit.wikimedia.org/r/#/c/7986/14/includes/UserMailer.php
Now I am "desperately seeking" a link to _show the raw file content after the commit in the __browser__,__ _but only found a link "(Download)" which starts a zip download. This is not what I wanted.
Is there a solution which I have overlooked?
If you just want to view the content, in diff view click Preferences, on the left bottom choose Whole File as context and click Update. It is no good for copy-pasting though.
-Niklas
-- Niklas Laxström
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 12/12/12 09:09, Ryan Kaldari wrote:
I found a solution to the problem: If a gerrit administrator declares the mimetypes of the files to be safe they will be displayed in-browser rather than downloaded as zip files: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_i...
Could someone edit the gerrit.config file to declare php, javascript, and css files as 'safe'?
Ryan Kaldari
I don't think we should set javascript mimetype as safe. Not when using its own one at least.
On Wed, Dec 12, 2012 at 3:09 AM, Ryan Kaldari rkaldari@wikimedia.org wrote:
I found a solution to the problem: If a gerrit administrator declares the mimetypes of the files to be safe they will be displayed in-browser rather than downloaded as zip files: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_i...
Could someone edit the gerrit.config file to declare php, javascript, and css files as 'safe'?
That doesn't quite work the way you're thinking--it's for us to define mimetypes that Gerrit should show diffs of (rather than a zip download of the file). All text- based filetypes are already shown by the browser as diffs, but most binary filetypes aren't shown on diff. Images originally suffered this problem, but we fixed it[0].
There's not a config switch for what the OP is asking for--but feel free to file a bug upstream[1] :)
-Chad
[0] https://bugzilla.wikimedia.org/show_bug.cgi?id=36852 [1] https://code.google.com/p/gerrit/issues/list
On 12/12/12 4:44 AM, Chad wrote:
On Wed, Dec 12, 2012 at 3:09 AM, Ryan Kaldari rkaldari@wikimedia.org wrote:
I found a solution to the problem: If a gerrit administrator declares the mimetypes of the files to be safe they will be displayed in-browser rather than downloaded as zip files: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_i...
Could someone edit the gerrit.config file to declare php, javascript, and css files as 'safe'?
That doesn't quite work the way you're thinking--it's for us to define mimetypes that Gerrit should show diffs of (rather than a zip download of the file). All text- based filetypes are already shown by the browser as diffs, but most binary filetypes aren't shown on diff. Images originally suffered this problem, but we fixed it[0].
There's not a config switch for what the OP is asking for--but feel free to file a bug upstream[1] :)
Are you sure? This doesn't jibe with what the Gerrit developers say in the support forums: https://groups.google.com/forum/#!topic/repo-discuss/h7Bvgns5cyY/discussion
Ryan Kaldari
On Wed, Dec 12, 2012 at 1:46 PM, Ryan Kaldari rkaldari@wikimedia.org wrote:
On 12/12/12 4:44 AM, Chad wrote:
On Wed, Dec 12, 2012 at 3:09 AM, Ryan Kaldari rkaldari@wikimedia.org wrote:
I found a solution to the problem: If a gerrit administrator declares the mimetypes of the files to be safe they will be displayed in-browser rather than downloaded as zip files:
https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_i...
Could someone edit the gerrit.config file to declare php, javascript, and css files as 'safe'?
That doesn't quite work the way you're thinking--it's for us to define mimetypes that Gerrit should show diffs of (rather than a zip download of the file). All text- based filetypes are already shown by the browser as diffs, but most binary filetypes aren't shown on diff. Images originally suffered this problem, but we fixed it[0].
There's not a config switch for what the OP is asking for--but feel free to file a bug upstream[1] :)
Are you sure? This doesn't jibe with what the Gerrit developers say in the support forums: https://groups.google.com/forum/#!topic/repo-discuss/h7Bvgns5cyY/discussion
Yes, I'm pretty sure. That thread is confusing.
Before we enabled this for images, you used to have to download images as a zip rather than in diffs. I'm pretty sure it has no affect on the "download" buttons serving zips on those pages...but we can test.
See bug 36852[0] for history. Also fun is which mimetypes to use[1] ;-)
-Chad
[0] https://bugzilla.wikimedia.org/show_bug.cgi?id=36852 [1] http://cweiske.de/tagebuch/php-mimetype.htm
Le 11/12/12 19:47, Ryan Kaldari wrote:
Then I could copy code without copying all the line numbers.
We could apply 'user-select: none;' to the element containing the line number. It is not supported on all browsers though.
I think I used that in our old Special:CodeReview. I could not find the patch though.
On Tue, Dec 11, 2012 at 10:47 AM, Ryan Kaldari rkaldari@wikimedia.org wrote:
This is actually my biggest annoyance with gerrit—that I can't view raw code from the change view. I can't fathom why they have a zip download link, but not a view link. Then I could copy code without copying all the line numbers.
+1 this is a huge pain point for me too.
On Tue, Dec 11, 2012 at 10:47 AM, Ryan Kaldari rkaldari@wikimedia.org wrote:
This is actually my biggest annoyance with gerrit—that I can't view raw code from the change view. I can't fathom why they have a zip download link, but not a view link. Then I could copy code without copying all the line numbers.
+1 this is a huge pain point for me too.
+1 as well. The zip download is weird for a code review tool :)
Subbu.
I started this thread.
I filed this bug https://bugzilla.wikimedia.org/show_bug.cgi?id=42989 Gerrit: show link for raw file content in gerrit "diff" views (a solution is proposed inside) It has been closed as "RESOLVED INVALID" instead of deploying a solution to Gerrit.
As a solution of the problem (show a raw file content) has not been found (GitHub shows raw file contents, SVN browser ViewVC shows raw file contents) example https://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/AJAXPoll/AJAXPol...
I feel unhappy. Very unhappy.
On 12/12/2012 03:26 PM, Thomas Gries wrote:
I started this thread.
I filed this bug https://bugzilla.wikimedia.org/show_bug.cgi?id=42989 Gerrit: show link for raw file content in gerrit "diff" views (a solution is proposed inside) It has been closed as "RESOLVED INVALID" instead of deploying a solution to Gerrit.
Ryan said Chad will test the suggested config change, and if that doesn't work, Ryan will talk to the Gerrit devs.
Matt Flaschen
wikitech-l@lists.wikimedia.org