Closed Bug 756316 Opened 9 years ago Closed 9 years ago

Cleanup nsMsgLocalMailFolder::GetSubFolders

Categories

(MailNews Core :: Backend, defect)

defect
Not set
minor

Tracking

(thunderbird14 fixed, thunderbird15 fixed)

RESOLVED FIXED
Thunderbird 16.0
Tracking Status
thunderbird14 --- fixed
thunderbird15 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(1 file, 4 obsolete files)

Attached patch fix (obsolete) — Splinter Review
Found that the codes in GetSubFolders() are redundant because the most of the codes done in DiscoverSubFolders().
Attachment #624957 - Flags: review?(dbienvenu)
Attached patch fix (obsolete) — Splinter Review
I am sorry that the previous patch can not be compiled.
Assignee: nobody → hiikezoe
Attachment #624957 - Attachment is obsolete: true
Attachment #624957 - Flags: review?(dbienvenu)
Attachment #624967 - Flags: review?(dbienvenu)
Comment on attachment 624967 [details] [diff] [review]
fix

This patch causes the problem that folder name is not translated.
Attachment #624967 - Flags: review?(dbienvenu)
Depends on: 757310
Comment on attachment 624967 [details] [diff] [review]
fix

As a general rule, I'd rather have less code duplicated code in the pluggable stores and more in the core classes, like nsMsgLocalMailFolder, to lessen the burden on new pluggable store implementors. So I'd prefer removing this cdoe from the pluggable stores, if possible.
(In reply to David :Bienvenu from comment #3)
> Comment on attachment 624967 [details] [diff] [review]
> fix
> 
> As a general rule, I'd rather have less code duplicated code in the
> pluggable stores and more in the core classes, like nsMsgLocalMailFolder, to
> lessen the burden on new pluggable store implementors. So I'd prefer
> removing this cdoe from the pluggable stores, if possible.

At first, I tried to remove the codes in pluggable stores but I quited because directory structure depends on the pluggable store. 

Anyway you are absolutely right. There are still the codes independent from directory structure. Those codes should be in nsLocalMailFolder.cpp.
Attached patch Fix (obsolete) — Splinter Review
This patch needs the fix for bug 759237.
Attachment #624967 - Attachment is obsolete: true
Attachment #627857 - Flags: review?(dbienvenu)
Depends on: 759237
No longer depends on: 757310
Attached patch Fix (obsolete) — Splinter Review
The previous patch allowed to be more cleaned up.
Attachment #627857 - Attachment is obsolete: true
Attachment #627857 - Flags: review?(dbienvenu)
Attachment #627873 - Flags: review?(dbienvenu)
Blocks: 749574
Comment on attachment 627873 [details] [diff] [review]
Fix

this is slightly bit-rotted, perhaps by my slight tweaks to your addsubfolders patch. Since I probably bit-rotted you, I'll try to fix it myself and upload a de-bitrotted patch. This looks like a nice cleanup.
I'll try this patch...
Attachment #627873 - Attachment is obsolete: true
Attachment #627873 - Flags: review?(dbienvenu)
Attachment #628539 - Flags: review?(dbienvenu)
Comment on attachment 628539 [details] [diff] [review]
de-bitrotted patch

looks good, thx very much for the patch!
Attachment #628539 - Flags: review?(dbienvenu) → review+
https://hg.mozilla.org/comm-central/rev/9c0bd4891167
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
Comment on attachment 628539 [details] [diff] [review]
de-bitrotted patch

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on c-c, etc.): 
Risk to taking this patch (and alternatives if risky):

[Triage Comment]
landing this on aurora and beta makes landing the fix for bug 751652 quite a bit easier. I'm going to land it on aurora and I think we should consider it for beta.
Attachment #628539 - Flags: approval-comm-beta?
Attachment #628539 - Flags: approval-comm-aurora+
(In reply to David :Bienvenu from comment #11)
> landing this on aurora and beta makes landing the fix for bug 751652 quite a
> bit easier. I'm going to land it on aurora and I think we should consider it
> for beta.

I think that's the wrong bug number.
sorry, bug 751562
Comment on attachment 628539 [details] [diff] [review]
de-bitrotted patch

It looks lowish risk, so a=me.
Attachment #628539 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.