Bug 27328 - WebKitTools/Scripts/svn-create-patch is broken
Summary: WebKitTools/Scripts/svn-create-patch is broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-15 21:00 PDT by Jeremy Orlow
Modified: 2009-07-16 14:18 PDT (History)
4 users (show)

See Also:


Attachments
Fix for Unusual Perl Behavior (1.08 KB, patch)
2009-07-16 00:00 PDT, Joseph Pecoraro
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2009-07-15 21:00:39 PDT
https://bugs.webkit.org/show_bug.cgi?id=26999 broke svn-create-patch for me

jorlow@jorlow-laptop:/Files/src/webkit
$ WebKitTools/Scripts/svn-create-patch 
svn: '/WebCore/ChangeLog' is not a working copy
svn: '/WebCore/ChangeLog' does not exist
Use of uninitialized value in pattern match (m//) at WebKitTools/Scripts/svn-create-patch line 213.

I rolled it back to the previous version and it worked.  Let me know there's any more information I can provide.
Comment 1 Joseph Pecoraro 2009-07-15 22:49:26 PDT
It seems like its giving you an Absolute Path from Root:
  "/WebCore/ChangeLog"

Instead of just:
  "WebCore/ChangeLog"

Let me look into why that might have happened (because unfortunately it doesn't do that on my machine).
Comment 2 Joseph Pecoraro 2009-07-15 23:11:49 PDT
Hmm.  Well the svn error comes from `svn diff '/path/to/file'` when the file doesn't exist.  That error entirely makes sense because "/WebCore/ChangeLog" doesn't exist.  However the leading slash makes no sense to me and I can't reproduce it on my machine (Mac OS X Perl 5.8.8).

On my system:

  shell> perl -e 'use File::Spec; print File::Spec->abs2rel("/blah","/blah"), "\n"'
  .

Try running that on your system to see if you get something other then ".".  If that is the case then I can stop scratching my head.

Or we could just always strip a leading slash from $prefix because it should never happen anyways.  What do the stronger perl programmers think?
Comment 3 Jeremy Orlow 2009-07-15 23:15:10 PDT
"""
jorlow@jorlow-laptop:/Files/src/webkit
$ perl -e 'use File::Spec; print File::Spec->abs2rel("/blah","/blah"), "\n"'
.
"""

In other words, it printed ".".

Note that the script runs when I do it inside WebCore...just not in the root directory of the tree.
Comment 4 Joseph Pecoraro 2009-07-16 00:00:26 PDT
Created attachment 32838 [details]
Fix for Unusual Perl Behavior

Perl seems to have been acting differently on our machines.  This handles the special case that was acting differently.  Its been tested on Jeremy Orlow's system (thanks for taking the time!) and worked.
Comment 5 Adam Barth 2009-07-16 14:16:10 PDT
Will land.
Comment 6 Adam Barth 2009-07-16 14:18:06 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/svn-create-patch
Committed r45985
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/svn-create-patch
r45985 = 4bf341915a24384819820406067959d02c3eeab8 (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
http://trac.webkit.org/changeset/45985