Closed Bug 582113 Opened 14 years ago Closed 14 years ago

[stats] Restore ability to pass two files to the script (for split days)

Categories

(Camino Graveyard :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alqahira, Assigned: alqahira)

References

Details

Attachments

(1 file)

Attached patch FixSplinter Review
Sam informed me I didn't read his instructions carefully enough, and one of my changes broke the ability to gather stats in a single pass for days that are split across log files. This is a sort-of hacky but flexible patch that lets you pass three arguments *or* two arguments where the second argument is a "quoted list" of files, so you don't have to remember to do something differently when working with 2 files vs 1 file. (Using the "quoted list" option, you can in fact process arbitrary number of files at once, if necessary--please, no!) It loses up the ability to pass the filenames in with a path (or name) that contains spaces in it (e.g., /Users/smokey/Cm admin/logs/); I'm not sure how to fix that. I'm running the script from inside the folder with the log files, so it's not really an issue for me, though I'd like to fix it if possible. This patch depends on the (corrected) patch for bug 581905 being applied.
Attachment #460368 - Flags: review?(samuel.sidler)
Maybe we could change every "$file" to "$2" "$3" (or the like) and also assign $3 to space if it's not defined, and fix both issues…?
(In reply to comment #1) > Maybe we could change every "$file" to "$2" "$3" (or the like) and also assign > $3 to space if it's not defined, and fix both issues…? Nope, we're either going to have one or the other.
(In reply to comment #0) > I'm running the script from inside the folder with the log files, so > it's not really an issue for me, though I'd like to fix it if possible. As am I. And since we're the only two running it... who cares? Hacky is fine. I'm testing this now.
Comment on attachment 460368 [details] [diff] [review] Fix This works as expected. I tested two different days last year when we had logs split. Ship it.
Attachment #460368 - Flags: review?(samuel.sidler) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: