Closed
Bug 458445
Opened 18 years ago
Closed 17 years ago
[silme] Clean code in silme.core.diff, silme.fp.* and silme.io.*
Categories
(Mozilla Localizations :: Infrastructure, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zbraniecki, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
|
16.29 KB,
patch
|
adriank
:
review+
|
Details | Diff | Splinter Review |
I have to clean code in silme.core.diff (merge with silme.playground.diff?) and silme.fp and silme.io.
| Reporter | ||
Comment 1•18 years ago
|
||
I'm currently working on this.
diff has been moved to silme.diff, silme.playground has been removed (l10nObjectDiff landed in silme.diff.l10nobject) and I'm currently cleaning Diff objects.
Status: NEW → ASSIGNED
| Reporter | ||
Comment 2•18 years ago
|
||
ok, diff API is more stable now, working on performance
| Reporter | ||
Comment 3•18 years ago
|
||
this should do the trick
Attachment #344468 -
Flags: review?(akalla)
| Reporter | ||
Updated•18 years ago
|
Attachment #344468 -
Attachment is patch: true
Attachment #344468 -
Attachment mime type: application/octet-stream → text/plain
| Reporter | ||
Comment 4•18 years ago
|
||
update
Attachment #344468 -
Attachment is obsolete: true
Attachment #344516 -
Flags: review?(akalla)
Attachment #344468 -
Flags: review?(akalla)
Updated•18 years ago
|
Attachment #344516 -
Flags: review?(akalla) → review+
| Reporter | ||
Comment 6•17 years ago
|
||
http://hg.mozilla.org/users/zbraniecki_mozilla.com/silme/rev/078355727e97
What happened in this changeset is a huge cleanup for silme.fp. It removes whole silme.fp.object chunk which was not needed anymore and replaces it with smart loading.
So, instead of manually importing:
import silme.fp.object.dtd
import silme.fp.object.properties
you can simply do:
silme.format.Manager.get('dtd')
which will try to load dtd module and register it properly.
You can also do:
silme.format.Manager.register_all()
in order to load all available format parsers.
Next step is to decide what we want to do with silme.fp.diff.* (I'm leaning toward removing it for now since it doesn't work) and making it possible to block loading new types.
Case scenario is that if I decided which format parsers I want to support (say, properties, dtd) I should be able to say "no more". Currently if script finds new type of file it will try to load proper format parser.
| Reporter | ||
Comment 7•17 years ago
|
||
http://hg.mozilla.org/users/zbraniecki_mozilla.com/silme/rev/6a60c150cce6
http://hg.mozilla.org/users/zbraniecki_mozilla.com/silme/rev/038ff737bcca
Those two are adding diff functionality to silme.format.text.Serializer and are removing whole silme.fp.*
Wohoo! :)
| Reporter | ||
Comment 8•17 years ago
|
||
So in order to get this working what you have to change in your script is:
1) remove any import silme.fp - use import silme.format instead
2) switch any reference to silme.fp.Manager to silme.format.Manager
3) to add support for format - silme.format.Manager.register('dtd') or silme.format.Manager.register_all()
4) if you rely on silme.io.* to choose the right format, it'll do that. :)
5) if you get format from path use silme.format.Manager.get(path=foo) if you get from name silme.format.Manager.get(name=foo)
That's all!
I'll revise that tomorrow, but this sounds like done :)
| Reporter | ||
Comment 9•17 years ago
|
||
yup, that's fixed!
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•