Re: Summary column is shoing None after upgrading to RB 2.5

2015-11-03 Thread Sam
Hello,
Is there any ETA as when we get 2.5.1?
If not today, is there any workaround that I can apply?
Regards,

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RB 2.5 and Comment Categorization extension

2015-11-03 Thread Paul Wolf
I'm having problems getting this extension working on a new RB 2.5 
installation.  I'm able to install the extension, enable it, and configure 
some comment types.  However, when I go to add a review comment, the Type 
'select' has no values.  I've tried restarting my server but that didn't 
help. Has anyone else had problems using this extension with RB 2.5?  
Thanks.

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Summary column is shoing None after upgrading to RB 2.5

2015-11-03 Thread Christian Hammond
It will be today. We're in California (PST timezone), for reference, but it
should be out by early evening our time.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Tue, Nov 3, 2015 at 9:34 AM, Sam  wrote:

> Hello,
> Is there any ETA as when we get 2.5.1?
> If not today, is there any workaround that I can apply?
> Regards,
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade 2.0.20 to 2.5 failing on diffviewer_filediff table

2015-11-03 Thread Christian Hammond
Hi John,

Sounds like there's an index it's trying to apply that already exists. What
you can try doing is dropping that index in MySQL
(diffviewer_filediff_4d02a56a),
and seeing if that allows a fresh upgrade to proceed.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Tue, Nov 3, 2015 at 3:54 AM, John McGowan 
wrote:

> Hi Christian,
>
> I'm also getting the blank Summary box per review but I see someone else
> has commented and will be fixed in 2.5.1. Thanks.
>
> On upgrade from 2.0.20 I'm getting the following:
>
> + rb-site upgrade /var/www/review.bfs.openwave.com
> Rebuilding directory structure
> Updating database. This may take a while.
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
> --  --
> Creating tables ...
> Creating table accounts_trophy
> Creating table attachments_fileattachmenthistory
> Creating table diffviewer_rawfilediffdata
> Creating table notifications_webhooktarget_repositories
> Creating table notifications_webhooktarget
> Creating table webapi_webapitoken
> Upgrading Review Board from 2.0.20 to 2.5
> There are unapplied evolutions for accounts.
> There are unapplied evolutions for attachments.
> There are unapplied evolutions for diffviewer.
> There are unapplied evolutions for notifications.
> There are unapplied evolutions for reviews.
> There are unapplied evolutions for webapi.
> Adding baseline version for new models
> Evolutions in notifications baseline: webhooktarget_extra_state,
> webhooktarget_extra_data_null
> Project signature has changed - an evolution is required
> Installing custom SQL ...
> Installing indexes ...
> Installed 0 object(s) from 0 fixture(s)
> CommandError: Error applying evolution: (1061, "Duplicate key name
> 'diffviewer_filediff_4d02a56a'")
>
> This is a test copy/installation I have running as the "live" version is
> on 1.6.16; I migrate/upgrade every night from 1.6.16 to 2.0.20 which is
> working nicely since the last assistance you gave me. I plan on switching
> the live server to 2.5 (2.5.1).
>
>
> Thanks in advance on any pointers.
>
> - John
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the best way to get the status of the review request automatically

2015-11-03 Thread David Trowbridge
There's no way to get a response that only includes a single field's
contents--it will always be formatted as JSON or XML. However, if you'd
like to reduce the amount of data that gets sent, you can limit it using
/api/review-requests/110/?only-fields=status

-David

On Mon, Nov 2, 2015 at 7:02 PM, Sam  wrote:

> Hello,
>
> What is the best way to get the status of the request as if it is marked
> as "Submitted", "Ship it", "Pending".
>
> What I have found is :
>
>  rbt api-get http://reviewboard.com/api/review-requests/110
> --status=submitted
>
> But this gives me all the attributes of the request.
>
> How do I get just the status for the specific request id? what is
> recommended way to query the request and get specific field?
>
>
>
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Enabling authentication extension

2015-11-03 Thread Graeme Perrow
I am trying to create an authentication extension for reviewboard (running 
2.0.18). I've followed the authentication backend instructions here 

 and 
the installation instructions here 
.
 
But I'm obviously missing something. My extension shows up in the list of 
available extensions, but attempting to enable it results in a "Loading..." 
message that never goes away.

If I look in the log file (specified in the Logging admin page), I see this 
exception:

relative imports require the 'package' argument
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", 
line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", 
line 52, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/vary.py", 
line 19, in inner_func
response = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", line 
497, in __call__
request, method, view, api_format=api_format, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", line 
568, in call_method_view
return view(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", line 
765, in put
return self.update(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 117, in _call
return view_func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 138, in _checklogin
return view_func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 117, in _call
return view_func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 164, in _checkpermissions
response = view_func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 117, in _call
return view_func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 117, in _call
return view_func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
line 287, in _validate
return view_func(*args, **new_kwargs)
  File "/usr/lib/python2.7/site-packages/djblets/extensions/resources.py", 
line 211, in update
self._extension_manager.enable_extension(extension_id)
  File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py", 
line 310, in enable_extension
extension = self._init_extension(ext_class)
  File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py", 
line 608, in _init_extension
self._reset_templatetags_cache()
  File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py", 
line 667, in _reset_templatetags_cache
get_templatetags_modules()
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 
1292, in get_templatetags_modules
import_module(templatetag_module)
  File "/usr/lib/python2.7/site-packages/django/utils/importlib.py", line 
33, in import_module
raise TypeError("relative imports require the 'package' argument")
TypeError: relative imports require the 'package' argument

My actual extension is not listed in the call stack. What am I missing?


-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade 2.0.20 to 2.5 failing on diffviewer_filediff table

2015-11-03 Thread John McGowan
Thanks Christian, that did the trick.

Had to run it for 2 indexes, affected 1/2 million rows in that table :)

drop index diffviewer_filediff_4d02a56a on diffviewer_filediff;
drop index diffviewer_filediff_79f4fcf6 on diffviewer_filediff;

Just waiting on 2.5.1 now.

Thanks again
  John

On Tuesday, 3 November 2015 21:32:30 UTC, Christian Hammond wrote:
>
> Hi John,
>
> Sounds like there's an index it's trying to apply that already exists. 
> What you can try doing is dropping that index in MySQL 
> (diffviewer_filediff_4d02a56a), 
> and seeing if that allows a fresh upgrade to proceed.
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Tue, Nov 3, 2015 at 3:54 AM, John McGowan  > wrote:
>
>> Hi Christian,
>>
>> I'm also getting the blank Summary box per review but I see someone else 
>> has commented and will be fixed in 2.5.1. Thanks.
>>
>> On upgrade from 2.0.20 I'm getting the following:
>>
>> + rb-site upgrade /var/www/review.bfs.openwave.com
>> Rebuilding directory structure
>> Updating database. This may take a while.
>>
>> The log output below, including warnings and errors,
>> can be ignored unless upgrade fails.
>>
>> --  --
>> Creating tables ...
>> Creating table accounts_trophy
>> Creating table attachments_fileattachmenthistory
>> Creating table diffviewer_rawfilediffdata
>> Creating table notifications_webhooktarget_repositories
>> Creating table notifications_webhooktarget
>> Creating table webapi_webapitoken
>> Upgrading Review Board from 2.0.20 to 2.5
>> There are unapplied evolutions for accounts.
>> There are unapplied evolutions for attachments.
>> There are unapplied evolutions for diffviewer.
>> There are unapplied evolutions for notifications.
>> There are unapplied evolutions for reviews.
>> There are unapplied evolutions for webapi.
>> Adding baseline version for new models
>> Evolutions in notifications baseline: webhooktarget_extra_state, 
>> webhooktarget_extra_data_null
>> Project signature has changed - an evolution is required
>> Installing custom SQL ...
>> Installing indexes ...
>> Installed 0 object(s) from 0 fixture(s)
>> CommandError: Error applying evolution: (1061, "Duplicate key name 
>> 'diffviewer_filediff_4d02a56a'")
>>
>> This is a test copy/installation I have running as the "live" version is 
>> on 1.6.16; I migrate/upgrade every night from 1.6.16 to 2.0.20 which is 
>> working nicely since the last assistance you gave me. I plan on switching 
>> the live server to 2.5 (2.5.1).
>>
>>
>> Thanks in advance on any pointers.
>>
>> - John
>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Enabling authentication extension

2015-11-03 Thread Graeme Perrow
That fixed it, thanks! Now I get invalid SQL being executed, but that's a 
different problem.

Graeme


On Tuesday, 3 November 2015 19:33:23 UTC-5, Christian Hammond wrote:
>
> The extension ID has now changed, due to the new location of the 
> extension. You'll probably end up with two entries for this, and they may 
> conflict. Try going into the database editor in the admin UI, clicking 
> Registered Extensions, and deleting the old entry. Then re-run 'setup.py 
> develop' or 'install' or whatever for your extension, restart the server, 
> and see if the situation improves at all.
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Tue, Nov 3, 2015 at 4:17 PM, Graeme Perrow  > wrote:
>
>> I moved the code into sapauth/extension/__init__.py, created an empty 
>> sapauth/__init__.py, and changed setup.py to:
>>
>> setup( name='sapauth',
>>version='1.0',
>>description='SAP Authentication backend for sareviews',
>>author='Graeme Perrow',
>>packages=['sapauth.extension'],
>>entry_points={
>>   'reviewboard.extensions': 'sapauth = 
>> sapauth.extension:SAPExtension',
>>   }
>> )
>>
>> Now when I load the extension page, I see "The extension failed to load 
>> with the following error: " (followed by nothing). There is nothing in the 
>> log file relating to the extension.
>>
>>
>>
>> On Tuesday, 3 November 2015 18:19:37 UTC-5, Christian Hammond wrote:
>>>
>>> You'll need to move your module into a submodule of sap auth, like 
>>> sapauth.extension.
>>>
>>> Christian
>>>
>>>
>>> On Tuesday, November 3, 2015, Graeme Perrow  wrote:
>>>

 Here is setup.py:

 from reviewboard.extensions.packaging import setup

 setup( name='sapauth',
version='1.0',
description='SAP Authentication backend for sareviews',
author='Graeme Perrow',
packages=['sapauth'],
entry_points={
   'reviewboard.extensions': [
   'sapauth = sapauth:SAPExtension',
   ],
   }
 )


 And sapauth/__init__.py (with much of the code removed):

 import sys,urllib2,xml.sax
 import logging
 from django.conf import settings
 from django.contrib.auth.models import User
 from djblets.db.query import get_object_or_none

 from reviewboard.accounts.backends import AuthBackend
 from reviewboard.extensions.base import Extension
 from reviewboard.extensions.hooks import AuthBackendHook

 class sapauth(AuthBackend):
 name = 'SAP'
 backend_id = 'SAP_Auth_1.0'
 supports_registration = False
 supports_change_name = False
 supports_change_email = False
 supports_change_password = False

 def authenticate(self, username, password):
 ...
 #

 def get_user( self, user_id ):
 return get_object_or_none(User, pk=user_id)
 #
 
 def get_or_create_user(self, username, handler=None):
 ...
 #

 class SAPExtension(Extension):
 def initialize(self):
 AuthBackendHook(self, sapauth)
 #



 On Tuesday, 3 November 2015 16:29:55 UTC-5, Christian Hammond wrote:
>
> Hi,
>
> I'd have to see the source of the extension to really be able to tell 
> you more, but it sounds like perhaps the extension or its registration 
> (in 
> setup.py) isn't using absolute module paths to refer to some module.
>
> Would you be able to show me how you're registering it in setup.py, 
> and the class attributes for your extension?
>
> Thanks,
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Tue, Nov 3, 2015 at 12:23 PM, Graeme Perrow  
> wrote:
>
>> I am trying to create an authentication extension for reviewboard 
>> (running 2.0.18). I've followed the authentication backend instructions 
>> here 
>> 
>>  and 
>> the installation instructions here 
>> .
>>  
>> But I'm obviously missing something. My extension shows up in the list 
>> of 
>> available extensions, but attempting to enable it results in a 
>> "Loading..." 
>> message that never goes away.
>>
>> If I look in the log file (specified in the Logging admin page), I 
>> see this exception:
>>
>> relative imports require the 'package' argument
>> Traceback (most recent call last):
>> 

Re: Enabling authentication extension

2015-11-03 Thread Graeme Perrow
I moved the code into sapauth/extension/__init__.py, created an empty 
sapauth/__init__.py, and changed setup.py to:

setup( name='sapauth',
   version='1.0',
   description='SAP Authentication backend for sareviews',
   author='Graeme Perrow',
   packages=['sapauth.extension'],
   entry_points={
  'reviewboard.extensions': 'sapauth = 
sapauth.extension:SAPExtension',
  }
)

Now when I load the extension page, I see "The extension failed to load 
with the following error: " (followed by nothing). There is nothing in the 
log file relating to the extension.



On Tuesday, 3 November 2015 18:19:37 UTC-5, Christian Hammond wrote:
>
> You'll need to move your module into a submodule of sap auth, like 
> sapauth.extension.
>
> Christian
>
> On Tuesday, November 3, 2015, Graeme Perrow  > wrote:
>
>>
>> Here is setup.py:
>>
>> from reviewboard.extensions.packaging import setup
>>
>> setup( name='sapauth',
>>version='1.0',
>>description='SAP Authentication backend for sareviews',
>>author='Graeme Perrow',
>>packages=['sapauth'],
>>entry_points={
>>   'reviewboard.extensions': [
>>   'sapauth = sapauth:SAPExtension',
>>   ],
>>   }
>> )
>>
>>
>> And sapauth/__init__.py (with much of the code removed):
>>
>> import sys,urllib2,xml.sax
>> import logging
>> from django.conf import settings
>> from django.contrib.auth.models import User
>> from djblets.db.query import get_object_or_none
>>
>> from reviewboard.accounts.backends import AuthBackend
>> from reviewboard.extensions.base import Extension
>> from reviewboard.extensions.hooks import AuthBackendHook
>>
>> class sapauth(AuthBackend):
>> name = 'SAP'
>> backend_id = 'SAP_Auth_1.0'
>> supports_registration = False
>> supports_change_name = False
>> supports_change_email = False
>> supports_change_password = False
>>
>> def authenticate(self, username, password):
>> ...
>> #
>>
>> def get_user( self, user_id ):
>> return get_object_or_none(User, pk=user_id)
>> #
>> 
>> def get_or_create_user(self, username, handler=None):
>> ...
>> #
>>
>> class SAPExtension(Extension):
>> def initialize(self):
>> AuthBackendHook(self, sapauth)
>> #
>>
>>
>>
>> On Tuesday, 3 November 2015 16:29:55 UTC-5, Christian Hammond wrote:
>>>
>>> Hi,
>>>
>>> I'd have to see the source of the extension to really be able to tell 
>>> you more, but it sounds like perhaps the extension or its registration (in 
>>> setup.py) isn't using absolute module paths to refer to some module.
>>>
>>> Would you be able to show me how you're registering it in setup.py, and 
>>> the class attributes for your extension?
>>>
>>> Thanks,
>>>
>>> Christian
>>>
>>> -- 
>>> Christian Hammond - chri...@beanbaginc.com
>>> Review Board - https://www.reviewboard.org
>>> Beanbag, Inc. - https://www.beanbaginc.com
>>>
>>> On Tue, Nov 3, 2015 at 12:23 PM, Graeme Perrow  
>>> wrote:
>>>
 I am trying to create an authentication extension for reviewboard 
 (running 2.0.18). I've followed the authentication backend instructions 
 here 
 
  and 
 the installation instructions here 
 .
  
 But I'm obviously missing something. My extension shows up in the list of 
 available extensions, but attempting to enable it results in a 
 "Loading..." 
 message that never goes away.

 If I look in the log file (specified in the Logging admin page), I see 
 this exception:

 relative imports require the 'package' argument
 Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", 
 line 112, in get_response
 response = wrapped_callback(request, *callback_args, 
 **callback_kwargs)
   File 
 "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 
 52, in _wrapped_view_func
 response = view_func(request, *args, **kwargs)
   File 
 "/usr/lib/python2.7/site-packages/django/views/decorators/vary.py", line 
 19, in inner_func
 response = func(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", 
 line 497, in __call__
 request, method, view, api_format=api_format, *args, **kwargs)
   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", 
 line 568, in call_method_view
 return view(request, *args, **kwargs)
   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", 
 line 765, in put
 return self.update(request, *args, **kwargs)
   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
 line 117, in _call

Re: Enabling authentication extension

2015-11-03 Thread Christian Hammond
The extension ID has now changed, due to the new location of the extension.
You'll probably end up with two entries for this, and they may conflict.
Try going into the database editor in the admin UI, clicking Registered
Extensions, and deleting the old entry. Then re-run 'setup.py develop' or
'install' or whatever for your extension, restart the server, and see if
the situation improves at all.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Tue, Nov 3, 2015 at 4:17 PM, Graeme Perrow 
wrote:

> I moved the code into sapauth/extension/__init__.py, created an empty
> sapauth/__init__.py, and changed setup.py to:
>
> setup( name='sapauth',
>version='1.0',
>description='SAP Authentication backend for sareviews',
>author='Graeme Perrow',
>packages=['sapauth.extension'],
>entry_points={
>   'reviewboard.extensions': 'sapauth =
> sapauth.extension:SAPExtension',
>   }
> )
>
> Now when I load the extension page, I see "The extension failed to load
> with the following error: " (followed by nothing). There is nothing in the
> log file relating to the extension.
>
>
>
> On Tuesday, 3 November 2015 18:19:37 UTC-5, Christian Hammond wrote:
>>
>> You'll need to move your module into a submodule of sap auth, like
>> sapauth.extension.
>>
>> Christian
>>
>>
>> On Tuesday, November 3, 2015, Graeme Perrow  wrote:
>>
>>>
>>> Here is setup.py:
>>>
>>> from reviewboard.extensions.packaging import setup
>>>
>>> setup( name='sapauth',
>>>version='1.0',
>>>description='SAP Authentication backend for sareviews',
>>>author='Graeme Perrow',
>>>packages=['sapauth'],
>>>entry_points={
>>>   'reviewboard.extensions': [
>>>   'sapauth = sapauth:SAPExtension',
>>>   ],
>>>   }
>>> )
>>>
>>>
>>> And sapauth/__init__.py (with much of the code removed):
>>>
>>> import sys,urllib2,xml.sax
>>> import logging
>>> from django.conf import settings
>>> from django.contrib.auth.models import User
>>> from djblets.db.query import get_object_or_none
>>>
>>> from reviewboard.accounts.backends import AuthBackend
>>> from reviewboard.extensions.base import Extension
>>> from reviewboard.extensions.hooks import AuthBackendHook
>>>
>>> class sapauth(AuthBackend):
>>> name = 'SAP'
>>> backend_id = 'SAP_Auth_1.0'
>>> supports_registration = False
>>> supports_change_name = False
>>> supports_change_email = False
>>> supports_change_password = False
>>>
>>> def authenticate(self, username, password):
>>> ...
>>> #
>>>
>>> def get_user( self, user_id ):
>>> return get_object_or_none(User, pk=user_id)
>>> #
>>>
>>> def get_or_create_user(self, username, handler=None):
>>> ...
>>> #
>>>
>>> class SAPExtension(Extension):
>>> def initialize(self):
>>> AuthBackendHook(self, sapauth)
>>> #
>>>
>>>
>>>
>>> On Tuesday, 3 November 2015 16:29:55 UTC-5, Christian Hammond wrote:

 Hi,

 I'd have to see the source of the extension to really be able to tell
 you more, but it sounds like perhaps the extension or its registration (in
 setup.py) isn't using absolute module paths to refer to some module.

 Would you be able to show me how you're registering it in setup.py, and
 the class attributes for your extension?

 Thanks,

 Christian

 --
 Christian Hammond - chri...@beanbaginc.com
 Review Board - https://www.reviewboard.org
 Beanbag, Inc. - https://www.beanbaginc.com

 On Tue, Nov 3, 2015 at 12:23 PM, Graeme Perrow 
 wrote:

> I am trying to create an authentication extension for reviewboard
> (running 2.0.18). I've followed the authentication backend instructions
> here
> 
>  and
> the installation instructions here
> .
> But I'm obviously missing something. My extension shows up in the list of
> available extensions, but attempting to enable it results in a 
> "Loading..."
> message that never goes away.
>
> If I look in the log file (specified in the Logging admin page), I see
> this exception:
>
> relative imports require the 'package' argument
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 112,
> in get_response
> response = wrapped_callback(request, *callback_args,
> **callback_kwargs)
>   File
> "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line
> 52, in _wrapped_view_func
> response = view_func(request, *args, **kwargs)

Re: What is the best way to get the status of the review request automatically

2015-11-03 Thread Sam
Thanks for quick reply.
I tried the following and it still return all the field


rbt api-get http://reviewboard.com/api/review-requests/110/?onlyfield=status
{"stat": "ok", "review_request": {"status": "pending", "last_updated": 
"2015-10-28T21:51:08Z", "target_people": [{"href": 
"http://reviewboard.com/api/users/gang/;, "method": "GET", "title": 
"gang"}], "depends_on": [], "description_text_type": "markdown", 
"testing_done_text_type": "markdown", "ship_it_count": 1, 
"close_description_text_type": "plain", "id": 110, "links": {"diffs": 
{"href": "http://reviewboard.com/api/review-requests/110/diffs/;, "method": 
"GET"}, "repository": {"href": 
"http://reviewboard.com/api/repositories/1/;, "method": "GET", "title": 
"engn"}, "changes": {"href": 
"http://reviewboard.com/api/review-requests/110/changes/;, "method": 
"GET"}, "self": {"href": "http://reviewboard.com/api/review-requests/110/;, 
"method": "GET"}, "update": {"href": 
"http://reviewboard.com/api/review-requests/110/;, "method": "PUT"}, 
"last_update": {"href": 
"http://reviewboard.com/api/review-requests/110/last-update/;, "method": 
"GET"}, "reviews": {"href": 
"http://reviewboard.com/api/review-requests/110/reviews/;, "method": 
"GET"}, "draft": {"href": 
"http://reviewboard.com/api/review-requests/110/draft/;, "method": "GET"}, 
"file_attachments": {"href": 
"http://reviewboard.com/api/review-requests/110/file-attachments/;, 
"method": "GET"}, "submitter": {"href": 
"http://reviewboard.com/api/users/sam/;, "method": "GET", "title": "sam"}, 
"delete": {"href": "http://reviewboard.com/api/review-requests/110/;, 
"method": "DELETE"}, "screenshots": {"href": 
"http://reviewboard.com/api/review-requests/110/screenshots/;, "method": 
"GET"}, "diff_context": {"href": 
"http://reviewboard.com/api/review-requests/110/diff-context/;, "method": 
"GET"}}, "changenum": null, "bugs_closed": [], "testing_done": "none", 
"close_description": null, "text_type": null, "time_added": 
"2015-10-28T21:49:37Z", "extra_data": {"calculated_trophies": true}, 
"public": true, "commit_id": null, "blocks": [], "description": "demo3", 
"issue_resolved_count": 0, "issue_open_count": 0, "branch": 
"temp_mojgans_db2_main_rbtool", "approved": true, "url": "/r/110/", 
"absolute_url": "http://reviewboard.com/r/110/;, "target_groups": [], 
"summary": "demo3", "issue_dropped_count": 0, "approval_failure": null}}


-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the best way to get the status of the review request automatically

2015-11-03 Thread Barret Rennie
Hi Sam,

The syntax is "only-fields", not “onlyfield"

Regards,
Barret
> On Nov 3, 2015, at 7:37 PM, Sam  wrote:
> 
> Thanks for quick reply.
> I tried the following and it still return all the field
> 
> 
> rbt api-get http://reviewboard.com/api/review-requests/110/?onlyfield=status
> {"stat": "ok", "review_request": {"status": "pending", "last_updated": 
> "2015-10-28T21:51:08Z", "target_people": [{"href": 
> "http://reviewboard.com/api/users/gang/;, "method": "GET", "title": "gang"}], 
> "depends_on": [], "description_text_type": "markdown", 
> "testing_done_text_type": "markdown", "ship_it_count": 1, 
> "close_description_text_type": "plain", "id": 110, "links": {"diffs": 
> {"href": "http://reviewboard.com/api/review-requests/110/diffs/;, "method": 
> "GET"}, "repository": {"href": "http://reviewboard.com/api/repositories/1/;, 
> "method": "GET", "title": "engn"}, "changes": {"href": 
> "http://reviewboard.com/api/review-requests/110/changes/;, "method": "GET"}, 
> "self": {"href": "http://reviewboard.com/api/review-requests/110/;, "method": 
> "GET"}, "update": {"href": "http://reviewboard.com/api/review-requests/110/;, 
> "method": "PUT"}, "last_update": {"href": 
> "http://reviewboard.com/api/review-requests/110/last-update/;, "method": 
> "GET"}, "reviews": {"href": 
> "http://reviewboard.com/api/review-requests/110/reviews/;, "method": "GET"}, 
> "draft": {"href": "http://reviewboard.com/api/review-requests/110/draft/;, 
> "method": "GET"}, "file_attachments": {"href": 
> "http://reviewboard.com/api/review-requests/110/file-attachments/;, "method": 
> "GET"}, "submitter": {"href": "http://reviewboard.com/api/users/sam/;, 
> "method": "GET", "title": "sam"}, "delete": {"href": 
> "http://reviewboard.com/api/review-requests/110/;, "method": "DELETE"}, 
> "screenshots": {"href": 
> "http://reviewboard.com/api/review-requests/110/screenshots/;, "method": 
> "GET"}, "diff_context": {"href": 
> "http://reviewboard.com/api/review-requests/110/diff-context/;, "method": 
> "GET"}}, "changenum": null, "bugs_closed": [], "testing_done": "none", 
> "close_description": null, "text_type": null, "time_added": 
> "2015-10-28T21:49:37Z", "extra_data": {"calculated_trophies": true}, 
> "public": true, "commit_id": null, "blocks": [], "description": "demo3", 
> "issue_resolved_count": 0, "issue_open_count": 0, "branch": 
> "temp_mojgans_db2_main_rbtool", "approved": true, "url": "/r/110/", 
> "absolute_url": "http://reviewboard.com/r/110/;, "target_groups": [], 
> "summary": "demo3", "issue_dropped_count": 0, "approval_failure": null}}
> 
> 
> 
> -- 
> Supercharge your Review Board with Power Pack: 
> https://www.reviewboard.org/powerpack/ 
> 
> Want us to host Review Board for you? Check out RBCommons: 
> https://rbcommons.com/ 
> Happy user? Let us know! https://www.reviewboard.org/users/ 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to reviewboard+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Enabling authentication extension

2015-11-03 Thread Christian Hammond
You'll need to move your module into a submodule of sap auth, like
sapauth.extension.

Christian

On Tuesday, November 3, 2015, Graeme Perrow  wrote:

>
> Here is setup.py:
>
> from reviewboard.extensions.packaging import setup
>
> setup( name='sapauth',
>version='1.0',
>description='SAP Authentication backend for sareviews',
>author='Graeme Perrow',
>packages=['sapauth'],
>entry_points={
>   'reviewboard.extensions': [
>   'sapauth = sapauth:SAPExtension',
>   ],
>   }
> )
>
>
> And sapauth/__init__.py (with much of the code removed):
>
> import sys,urllib2,xml.sax
> import logging
> from django.conf import settings
> from django.contrib.auth.models import User
> from djblets.db.query import get_object_or_none
>
> from reviewboard.accounts.backends import AuthBackend
> from reviewboard.extensions.base import Extension
> from reviewboard.extensions.hooks import AuthBackendHook
>
> class sapauth(AuthBackend):
> name = 'SAP'
> backend_id = 'SAP_Auth_1.0'
> supports_registration = False
> supports_change_name = False
> supports_change_email = False
> supports_change_password = False
>
> def authenticate(self, username, password):
> ...
> #
>
> def get_user( self, user_id ):
> return get_object_or_none(User, pk=user_id)
> #
>
> def get_or_create_user(self, username, handler=None):
> ...
> #
>
> class SAPExtension(Extension):
> def initialize(self):
> AuthBackendHook(self, sapauth)
> #
>
>
>
> On Tuesday, 3 November 2015 16:29:55 UTC-5, Christian Hammond wrote:
>>
>> Hi,
>>
>> I'd have to see the source of the extension to really be able to tell you
>> more, but it sounds like perhaps the extension or its registration (in
>> setup.py) isn't using absolute module paths to refer to some module.
>>
>> Would you be able to show me how you're registering it in setup.py, and
>> the class attributes for your extension?
>>
>> Thanks,
>>
>> Christian
>>
>> --
>> Christian Hammond - chri...@beanbaginc.com
>> Review Board - https://www.reviewboard.org
>> Beanbag, Inc. - https://www.beanbaginc.com
>>
>> On Tue, Nov 3, 2015 at 12:23 PM, Graeme Perrow 
>> wrote:
>>
>>> I am trying to create an authentication extension for reviewboard
>>> (running 2.0.18). I've followed the authentication backend instructions
>>> here
>>> 
>>>  and
>>> the installation instructions here
>>> .
>>> But I'm obviously missing something. My extension shows up in the list of
>>> available extensions, but attempting to enable it results in a "Loading..."
>>> message that never goes away.
>>>
>>> If I look in the log file (specified in the Logging admin page), I see
>>> this exception:
>>>
>>> relative imports require the 'package' argument
>>> Traceback (most recent call last):
>>>   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py",
>>> line 112, in get_response
>>> response = wrapped_callback(request, *callback_args,
>>> **callback_kwargs)
>>>   File
>>> "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line
>>> 52, in _wrapped_view_func
>>> response = view_func(request, *args, **kwargs)
>>>   File
>>> "/usr/lib/python2.7/site-packages/django/views/decorators/vary.py", line
>>> 19, in inner_func
>>> response = func(*args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py",
>>> line 497, in __call__
>>> request, method, view, api_format=api_format, *args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py",
>>> line 568, in call_method_view
>>> return view(request, *args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py",
>>> line 765, in put
>>> return self.update(request, *args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
>>> line 117, in _call
>>> return view_func(*args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
>>> line 138, in _checklogin
>>> return view_func(*args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
>>> line 117, in _call
>>> return view_func(*args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
>>> line 164, in _checkpermissions
>>> response = view_func(*args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
>>> line 117, in _call
>>> return view_func(*args, **kwargs)
>>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
>>> line 117, in _call
>>> return view_func(*args, **kwargs)
>>>   File 

Re: Posting NEW source files for review?

2015-11-03 Thread Joseph Henry
Unfortunately we are using CVS. 

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Posting NEW source files for review?

2015-11-03 Thread Christian Hammond
That's fine. Just 'cvs add' the file and use RBTools to post, and it should
work.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Tue, Nov 3, 2015 at 5:28 PM, Joseph Henry  wrote:

> Unfortunately we are using CVS.
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 80769: ordinal not in range(128)

2015-11-03 Thread Sam
 I really need an expert advise on this. I still see this failure when I 
try to post the review but when I try to diff the same version of the file 
in clearcase I dont see any issue. I upgraded the RBTools but did not help. 
Really appreciate your input on this?

Traceback (most recent call last):
  File "/wsdb/oemtools/linux/bin/db2rbt", line 9, in 
load_entry_point('RBTools==0.7.5', 'console_scripts', 'rbt')()
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/commands/main.py", line 
133, in main
command.run_from_argv([RB_MAIN, command_name] + args)
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/commands/__init__.py", 
line 622, in run_from_argv
exit_code = self.main(*args) or 0
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/commands/post.py", line 
691, in main
extra_args=extra_args)
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/clients/clearcase.py", 
line 751, in diff
return self._do_diff(changeset)
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/clients/clearcase.py", 
line 882, in _do_diff
dl = self._diff_files(old_file, new_file)
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/clients/clearcase.py", 
line 793, in _diff_files
translate_newlines=False)
  File 
"/home/mojgans/bin/RBTools-0.7.5-py2.6.egg/rbtools/utils/process.py", line 
180, in execute
% (rc, command, data))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 81162: 
ordinal not in range(128)


-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Summary column is shoing None after upgrading to RB 2.5

2015-11-03 Thread Sam
Thanks a lot, RB 2.5.1 fixed this issue

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Enabling authentication extension

2015-11-03 Thread Christian Hammond
Hi,

I'd have to see the source of the extension to really be able to tell you
more, but it sounds like perhaps the extension or its registration (in
setup.py) isn't using absolute module paths to refer to some module.

Would you be able to show me how you're registering it in setup.py, and the
class attributes for your extension?

Thanks,

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Tue, Nov 3, 2015 at 12:23 PM, Graeme Perrow 
wrote:

> I am trying to create an authentication extension for reviewboard (running
> 2.0.18). I've followed the authentication backend instructions here
> 
>  and
> the installation instructions here
> .
> But I'm obviously missing something. My extension shows up in the list of
> available extensions, but attempting to enable it results in a "Loading..."
> message that never goes away.
>
> If I look in the log file (specified in the Logging admin page), I see
> this exception:
>
> relative imports require the 'package' argument
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py",
> line 112, in get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File
> "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line
> 52, in _wrapped_view_func
> response = view_func(request, *args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/django/views/decorators/vary.py",
> line 19, in inner_func
> response = func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py",
> line 497, in __call__
> request, method, view, api_format=api_format, *args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py",
> line 568, in call_method_view
> return view(request, *args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py",
> line 765, in put
> return self.update(request, *args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 117, in _call
> return view_func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 138, in _checklogin
> return view_func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 117, in _call
> return view_func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 164, in _checkpermissions
> response = view_func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 117, in _call
> return view_func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 117, in _call
> return view_func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py",
> line 287, in _validate
> return view_func(*args, **new_kwargs)
>   File "/usr/lib/python2.7/site-packages/djblets/extensions/resources.py",
> line 211, in update
> self._extension_manager.enable_extension(extension_id)
>   File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py",
> line 310, in enable_extension
> extension = self._init_extension(ext_class)
>   File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py",
> line 608, in _init_extension
> self._reset_templatetags_cache()
>   File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py",
> line 667, in _reset_templatetags_cache
> get_templatetags_modules()
>   File "/usr/lib/python2.7/site-packages/django/template/base.py", line
> 1292, in get_templatetags_modules
> import_module(templatetag_module)
>   File "/usr/lib/python2.7/site-packages/django/utils/importlib.py", line
> 33, in import_module
> raise TypeError("relative imports require the 'package' argument")
> TypeError: relative imports require the 'package' argument
>
> My actual extension is not listed in the call stack. What am I missing?
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out 

Re: Enabling authentication extension

2015-11-03 Thread Graeme Perrow

Here is setup.py:

from reviewboard.extensions.packaging import setup

setup( name='sapauth',
   version='1.0',
   description='SAP Authentication backend for sareviews',
   author='Graeme Perrow',
   packages=['sapauth'],
   entry_points={
  'reviewboard.extensions': [
  'sapauth = sapauth:SAPExtension',
  ],
  }
)


And sapauth/__init__.py (with much of the code removed):

import sys,urllib2,xml.sax
import logging
from django.conf import settings
from django.contrib.auth.models import User
from djblets.db.query import get_object_or_none

from reviewboard.accounts.backends import AuthBackend
from reviewboard.extensions.base import Extension
from reviewboard.extensions.hooks import AuthBackendHook

class sapauth(AuthBackend):
name = 'SAP'
backend_id = 'SAP_Auth_1.0'
supports_registration = False
supports_change_name = False
supports_change_email = False
supports_change_password = False

def authenticate(self, username, password):
...
#

def get_user( self, user_id ):
return get_object_or_none(User, pk=user_id)
#

def get_or_create_user(self, username, handler=None):
...
#

class SAPExtension(Extension):
def initialize(self):
AuthBackendHook(self, sapauth)
#



On Tuesday, 3 November 2015 16:29:55 UTC-5, Christian Hammond wrote:
>
> Hi,
>
> I'd have to see the source of the extension to really be able to tell you 
> more, but it sounds like perhaps the extension or its registration (in 
> setup.py) isn't using absolute module paths to refer to some module.
>
> Would you be able to show me how you're registering it in setup.py, and 
> the class attributes for your extension?
>
> Thanks,
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Tue, Nov 3, 2015 at 12:23 PM, Graeme Perrow  > wrote:
>
>> I am trying to create an authentication extension for reviewboard 
>> (running 2.0.18). I've followed the authentication backend instructions 
>> here 
>> 
>>  and 
>> the installation instructions here 
>> .
>>  
>> But I'm obviously missing something. My extension shows up in the list of 
>> available extensions, but attempting to enable it results in a "Loading..." 
>> message that never goes away.
>>
>> If I look in the log file (specified in the Logging admin page), I see 
>> this exception:
>>
>> relative imports require the 'package' argument
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", 
>> line 112, in get_response
>> response = wrapped_callback(request, *callback_args, 
>> **callback_kwargs)
>>   File 
>> "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 
>> 52, in _wrapped_view_func
>> response = view_func(request, *args, **kwargs)
>>   File 
>> "/usr/lib/python2.7/site-packages/django/views/decorators/vary.py", line 
>> 19, in inner_func
>> response = func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", 
>> line 497, in __call__
>> request, method, view, api_format=api_format, *args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", 
>> line 568, in call_method_view
>> return view(request, *args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/resources.py", 
>> line 765, in put
>> return self.update(request, *args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 117, in _call
>> return view_func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 138, in _checklogin
>> return view_func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 117, in _call
>> return view_func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 164, in _checkpermissions
>> response = view_func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 117, in _call
>> return view_func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 117, in _call
>> return view_func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", 
>> line 287, in _validate
>> return view_func(*args, **new_kwargs)
>>   File 
>> "/usr/lib/python2.7/site-packages/djblets/extensions/resources.py", line 
>> 211, in update
>> self._extension_manager.enable_extension(extension_id)
>>   File 

Re: Review Board 2.5.1 is released

2015-11-03 Thread Christian Hammond
There was a breakage caused by the new post-commit review improvements,
which broke a number of clients. We've temporarily reverted this and
released 2.5.1.1, with plans to get that feature fixed up properly for
2.5.2. Sorry for the trouble!

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Tue, Nov 3, 2015 at 5:01 PM, Christian Hammond 
wrote:

> Hey everyone,
>
> We just released Review Board 2.5.1, which contains fixes for missing
> summaries in the dashboard on Python 2.6, payload errors with webhooks,
> usability improvements in the diff viewer, and improvements to post-commit
> review.
>
> You can see the announcement and links to the release notes and our 2.5
> release video at
> https://www.reviewboard.org/news/2015/11/03/review-board-2-5-1-out/
>
> Christian
>
> --
> Christian Hammond - christ...@beanbaginc.com
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.