Closed Bug 449898 Opened 17 years ago Closed 17 years ago

[silme] diff.py L10nPackageDiff: extend getObjects(), getPackages(), implement getType()

Categories

(Mozilla Localizations :: Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: adriank, Assigned: adriank)

Details

Attachments

(1 file, 1 obsolete file)

Here is a small patch which implements a few ideas that I had today: First of all, it makes possible to have tuples as input for this methods. So you will be able to search e.g. for ('added', 'removed', 'modified') without the need of going 3 times through the object list and it should make it easier to sort the object later. Regarding getType(): you may want to know if your object is e.g. of the type 'added' or 'removed'
Attached patch the patch (obsolete) — Splinter Review
Attachment #333034 - Flags: review?(gandalf)
Comment on attachment 333034 [details] [diff] [review] the patch >+ def getType(self, id): >+ if id in self.objects: >+ return self.objects[id]['type'] >+ return False >+ You either want to have it scan for objects and packages and allow to narrow search to objects/packages by argument, or split it into getPackageType, getObjectType. beside of that the patch looks good. Thanks Adrian! Fix that and I'll check it in.
patch with addressed comments from Gandalf. Done by splitting the method
Attachment #333034 - Attachment is obsolete: true
Attachment #333162 - Flags: review?(gandalf)
Attachment #333034 - Flags: review?(gandalf)
Comment on attachment 333162 [details] [diff] [review] patch with addressed comments from Gandalf. Done by splitting the method looks good! good job adrian.
Attachment #333162 - Flags: review?(gandalf) → review+
Sending lib/mozilla/l10n/diff.py Transmitting file data . Committed revision 131.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: