Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Trying to do drush make on a make file containing the lines:
projects[media][version] = 1.3
projects[media][patch][] = https://drupal.org/files/1301774-remove-form-autosubmit-12.patch
I get this error:
The patch 'https://drupal.org/files/1301774-remove-form-autosubmit-12.patch' is not hosted on drupal.org.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2008764-7.https-tests-only.patch | 2.59 KB | dww |
#7 | 2008764-7.https_.patch | 2.19 KB | dww |
#7 | 2008764-7.https_.interdiff.txt | 675 bytes | dww |
#4 | 2008764-allow-https.patch | 2.24 KB | beeradb |
#2 | 2008764-allow-https.patch | 1.74 KB | beeradb |
Comments
Comment #1
dwwYup, that's a bug. It's hard-coded to only look for http. It's just using strpos() on a string literal. We probably want preg_match() and a regexp.
Comment #2
beeradb CreditAttribution: beeradb commentedAnd here we are. There is some fuzz in the patch as well, removing trailing whitespace from a line.
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedLooks good to me.
Comment #4
beeradb CreditAttribution: beeradb commentedUpdated regex for readability, and also changed the help text to specify it's a regex not a URL.
Comment #5
dwwExcellent, thanks!
A) Can we please add another unit test about this?
B) Why
preg_grep()
on an array with one element instead of just usingpreg_match()
?C) This should probably be postponed on #2012054: PHPunit tests are currently failing in master
Thanks again,
-Derek
Comment #6
dwwNow that #2012054: PHPunit tests are currently failing in master is done, I'm working on a test for this. Stay tuned.
Comment #7
dwwHere's a patch with just the new tests. Without the actual patch applied:
Then, after applying the attached patch (which uses preg_match() instead of preg_grep()), it's all happy:
I think we're good here. Any final objections before I commit/push?
Thanks!
-Derek
Comment #8
beeradb CreditAttribution: beeradb commentedThis look good to me. moving to preg_match over preg_grep is a good move. not sure what I was thinking.
Ran the tests locally and got the same results, test cases look sane, this is good to go.
Comment #9
dwwPushed #4 as beerabd:
http://drupalcode.org/project/drupalorg_drush.git/commit/0236ec7
And then my tests and fix for preg_match() from #7:
http://drupalcode.org/project/drupalorg_drush.git/commit/0995a6f
Thanks!
-Derek
Comment #10
dwwNow deployed.
Comment #11.0
(not verified) CreditAttribution: commentedFixing markup.