Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#27023 closed task (blessed) (fixed)

As a developer, I should be able to easily get and apply patches from trac

Reported by: jorbin's profile jorbin Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

getting and applying patches from core.trac.wordpress.org can be a bit of a hassle. Find the ticket, look at the patch, scroll to the bottom. Download the original. What if it was as easy as entering a trac url? or ticket number? Or the not raw patch url?

That is what this aims to solve.

To use:

grunt patch # This will look for patches in your root checkout
grunt patch:18380 # This will look for patches on ticket 18380 and let you choose which one to install
grunt patch:https://core.trac.wordpress.org/ticket/18380 # same as above
grunt patch:https://core.trac.wordpress.org/attachment/ticket/18380/18380.4.diff # Will download and apply that specific patch

Attachments (5)

27023.diff (369 bytes) - added by jorbin 9 years ago.
27023.2.diff (372 bytes) - added by jorbin 9 years ago.
spaces, not tabs (fml)
27023.3.diff (804 bytes) - added by jorbin 9 years ago.
27023.4.diff (807 bytes) - added by jorbin 9 years ago.
27023.5.diff (807 bytes) - added by jorbin 9 years ago.

Download all attachments as: .zip

Change History (26)

@jorbin
9 years ago

This ticket was mentioned in IRC in #wordpress-dev by jorbin_work. View the logs.


9 years ago

@jorbin
9 years ago

spaces, not tabs (fml)

#2 follow-ups: @nacin
9 years ago

This is awesome.

When asking for all patches for a ticket, it would be awesome if it could show you the author of the patch and the relative time since it was uploaded (as Trac shows). I'm trying to do it myself but my JS regex-fu is a little weak today.

#3 in reply to: ↑ 2 ; follow-up: @Denis-de-Bernardy
9 years ago

Replying to nacin:

This is awesome.

dup of #9724

Version 0, edited 9 years ago by Denis-de-Bernardy (next)

#4 in reply to: ↑ 2 @jorbin
9 years ago

Replying to nacin:

When asking for all patches for a ticket, it would be awesome if it could show you the author of the patch and the relative time since it was uploaded (as Trac shows). I'm trying to do it myself but my JS regex-fu is a little weak today.

Agreed. Also, Done. Also included the size of the patch.

#5 @bassgang
9 years ago

First usage looks fine for me, will try to use it more in future.

This ticket was mentioned in IRC in #wordpress-dev by bassgang. View the logs.


9 years ago

#8 @ocean90
9 years ago

  • Milestone changed from Awaiting Review to 3.9

#9 in reply to: ↑ 3 @SergeyBiryukov
9 years ago

Replying to Denis-de-Bernardy:

It's also a dup of #9724, which I never understood why you closed as workforme.

If I had to guess, it's because build tools didn't belong to the core repository at the time. However, you could always add them to relevant Codex pages.

This ticket was mentioned in IRC in #wordpress-dev by jorbin. View the logs.


9 years ago

@jorbin
9 years ago

This ticket was mentioned in IRC in #wordpress-dev by jorbin. View the logs.


9 years ago

@jorbin
9 years ago

@jorbin
9 years ago

#12 @jorbin
9 years ago

Fixed a bug where only having one patch|diff in your directory caused patching to fail. Thanks @nacin for the report.

Also updated some spacing, grammar, and wording of the instructions. Thanks @nacin @evarlese and @helen

This ticket was mentioned in IRC in #wordpress-dev by jorbin. View the logs.


9 years ago

This ticket was mentioned in IRC in #wordpress-dev by jorbin. View the logs.


9 years ago

This ticket was mentioned in IRC in #wordpress-dev by jorbin. View the logs.


9 years ago

#16 @nacin
9 years ago

In 27299:

Developer tools: grunt-patch-wordpress from jorbin, for applying patches directly from Trac.

Mapped to grunt patch, which declares usage. Requires npm install to install.

props jorbin. props helen, evarlese for help with grammar/instructions.
see #27023.

#17 follow-up: @helen
9 years ago

Noticing a couple things:

  • If I apply a patch that was done within /src or before /src, it fails - I think it should be smart about it the same way it does for the other way around (which does work).
  • I'd also want to see successfully modified files.

#18 in reply to: ↑ 17 @jorbin
9 years ago

Replying to helen:

  • If I apply a patch that was done within /src or before /src, it fails - I think it should be smart about it the same way it does for the other way around (which does work).

This is tracked at https://github.com/aaronjorbin/grunt-patch-wordpress/issues/3 I'm going to start working on adding it next week.

  • I'd also want to see successfully modified files.

I like this idea. Thanks!

#19 @nacin
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed
  • Type changed from enhancement to task (blessed)

As the library continues to improve, we can start to incorporate this into our documentation for sure.

#20 @nacin
9 years ago

In 27721:

Update grunt-patch-wordpress to 0.2.0.

props jorbin, yoavf, sabreuse.
see #27023.

#21 @nacin
9 years ago

In 27848:

Update grunt-patch-wordpress to 0.2.1 which applies patches with a/ b/ paths.

props jorbin.
see #27023.

Note: See TracTickets for help on using tickets.