[Webkit-unassigned] [Bug 9322] Teach svn-create-patch to sort its output
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Mon Jun 5 22:36:15 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=9322
ddkilzer at kilzer.net changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|webkit- |ddkilzer at kilzer.net
|unassigned at opendarwin.org |
Status|NEW |ASSIGNED
Attachment #8725| |review?
Flag| |
------- Comment #1 from ddkilzer at kilzer.net 2006-06-05 22:36 PDT -------
Created an attachment (id=8725)
--> (http://bugzilla.opendarwin.org/attachment.cgi?id=8725&action=view)
Patch v1
I took no prisoners in cleaning up the perl code, but I may have been too
aggressive. (I was tempted to remove 'use' statements, too, but held off.)
Changes (in no particular order):
- Sorted 'use' statements alphabetically.
- Reworded some die() messages.
- Extracted path canonicalization to canonicalizePath() method and switched to
using standard Perl modules instead of regular expressions assuming forward
slashes.
- Moved non-subroutine code together (or moved all subroutines to the end of
the file) and added an 'exit 0;' statement so you know where the main code
ends. Subroutines are alphabetized.
- Moved list-of-path cleanup into the else block of the first if/else statement
because it's only needed there. If no arguments are given, "." is used by
default and is the only path needed. Changed a while() loop to a for() loop
since I thought it read better; also replaced another regex with dirname().
- Created new generateFileList() subroutine. It uses "svn diff" instead of
"svn stat" since (a) "svn diff" was roughly 4x faster than "svn stat" in a
local test and (b) it's easier to know if a file is binary or not using "svn
diff".
- Completely gutted diff() and renamed to generateDiff(). It only has to
handle creating a patch for one file at a time now. I also removed all of the
chdir() business since Subversion handles the full paths quite nicely. That
cleaned up a lot of logic in the patch path fix-up as well. Should I have kept
this code?
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list