Code review comment for lp:~thumper/launchpad/branch-subscription-subscribed-by

Tim Penhey (thumper) wrote :

On Fri, 28 May 2010 13:58:22 you wrote:
> Review: Needs Information release-critical
>
> > === modified file 'lib/lp/code/browser/branch.py'
> > --- lib/lp/code/browser/branch.py 2010-05-20 04:01:34 +0000
> > +++ lib/lp/code/browser/branch.py 2010-05-27 04:47:25 +0000
> > @@ -354,6 +354,7 @@
> >
> > def initialize(self):
> > self.notices = []
> >
> > + # TODO: FIXME - this is almost certainly not what we want.
> >
> > self._add_subscription_notice()
>
> What do you want to do here?

Looks like it isn't used:

=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py 2010-05-25 03:13:25 +0000
+++ lib/lp/code/browser/branch.py 2010-05-28 09:43:31 +0000
@@ -354,19 +354,6 @@

     def initialize(self):
         self.notices = []
- # TODO: FIXME - this is almost certainly not what we want.
- self._add_subscription_notice()
-
- def _add_subscription_notice(self):
- """Add the appropriate notice after posting the subscription form."""
- if self.user and self.request.method == 'POST':
- newsub = self.request.form.get('subscribe', None)
- if newsub == 'Subscribe':
- self.context.subscribe(self.user, self.user)
- self.notices.append("You have subscribed to this branch.")
- elif newsub == 'Unsubscribe':
- self.context.unsubscribe(self.user, self.user)
- self.notices.append("You have unsubscribed from this
branch.")

     def user_is_subscribed(self):
         """Is the current user subscribed to this branch?"""

« Back to merge proposal