Re: Question about postreview.py get_repository_info

2011-01-13 Thread Dan
Hi Christian,

You mean post a review request to http://reviews.reviewboard.org/?

On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
 Hi Dan,

 You're correct, this is a bug, and your fix looks fine. We'll have to
 get that fix in. Want to post a review request?

 Christian



 On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
  Here is a more accurate description:

  In ReviewBoardServer.get_repository_info, it calls
  ReviewBoardServer.api_get to fetch the repository info from sever,
  from my debug, it show the return json is something like (if the
  repository is svn)

  {
      stat: ok,
      repository: {
          path: http://192.168.1.131/svn/Android;,
          tool: Subversion,
          id: 2,
          links: {
              info: {
                  href: http://192.168.1.131:81/api/repositories/2/
  info/,
                  method: GET
              },
              self: {
                  href: http://192.168.1.131:81/api/repositories/
  2/,
                  method:
                  GET
              }
          },
      name: local-android
      }
  }

  from the data structure of the json, we can see that use url =
  rsp['links']['info']['href'] of course will get a array key
  exception.
  should use url = rsp['repository']['links']['info']['href'].

  Is this a bug?

  On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
  Hi

  Here I have a problem with postreview.py when publish a review
  request, could anyone please have a look?

  My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
  fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
  and configed the constants necessary.

  When I run postreivew, it throws a array index exception at line 677:
  url = rsp['links']['info']['href'], The whole piece of code is

      def get_repository_info(self, rid):
          
          Returns detailed information about a specific repository.
          
          if self.deprecated_api:
              url = 'api/json/repositories/%s/info/' % rid
          else:
              rsp = self.api_get(
                  '%s%s/' % (self.root_resource['links']['repositories']
  ['href'],
                             rid))
              url = rsp['links']['info']['href']

          rsp = self.api_get(url)

          return rsp['info']

  I added debug info for rep, it did not contain the links index
  indeed, but it contained a repository index.

  Then I manually went to check the xml from reviewboard server, and
  found the structure of the xml is like this
      rsp
          repository
              links
                  info
                      href
  so I changed line 677 to url = rsp[repository]['links']['info']
  ['href'], finally it worked.

  Though it worked, I still did not know the reason and whether my
  change is right or wrong. I think it is unlike to be a bug of
  reviewboard, but I am too lazy to read all the code :-) so, could
  anyone kindly tell me that what the real problem is and what should I
  do?

  Any help will be highly appreciated!

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

 --
 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Question about postreview.py get_repository_info

2011-01-13 Thread Christian Hammond
Yeah, though I just committed the fix. Can you make sure it works
correctly on your end?

Christian

--
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com



On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
 Hi Christian,

 You mean post a review request to http://reviews.reviewboard.org/?

 On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
 Hi Dan,

 You're correct, this is a bug, and your fix looks fine. We'll have to
 get that fix in. Want to post a review request?

 Christian



 On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
  Here is a more accurate description:

  In ReviewBoardServer.get_repository_info, it calls
  ReviewBoardServer.api_get to fetch the repository info from sever,
  from my debug, it show the return json is something like (if the
  repository is svn)

  {
      stat: ok,
      repository: {
          path: http://192.168.1.131/svn/Android;,
          tool: Subversion,
          id: 2,
          links: {
              info: {
                  href: http://192.168.1.131:81/api/repositories/2/
  info/,
                  method: GET
              },
              self: {
                  href: http://192.168.1.131:81/api/repositories/
  2/,
                  method:
                  GET
              }
          },
      name: local-android
      }
  }

  from the data structure of the json, we can see that use url =
  rsp['links']['info']['href'] of course will get a array key
  exception.
  should use url = rsp['repository']['links']['info']['href'].

  Is this a bug?

  On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
  Hi

  Here I have a problem with postreview.py when publish a review
  request, could anyone please have a look?

  My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
  fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
  and configed the constants necessary.

  When I run postreivew, it throws a array index exception at line 677:
  url = rsp['links']['info']['href'], The whole piece of code is

      def get_repository_info(self, rid):
          
          Returns detailed information about a specific repository.
          
          if self.deprecated_api:
              url = 'api/json/repositories/%s/info/' % rid
          else:
              rsp = self.api_get(
                  '%s%s/' % (self.root_resource['links']['repositories']
  ['href'],
                             rid))
              url = rsp['links']['info']['href']

          rsp = self.api_get(url)

          return rsp['info']

  I added debug info for rep, it did not contain the links index
  indeed, but it contained a repository index.

  Then I manually went to check the xml from reviewboard server, and
  found the structure of the xml is like this
      rsp
          repository
              links
                  info
                      href
  so I changed line 677 to url = rsp[repository]['links']['info']
  ['href'], finally it worked.

  Though it worked, I still did not know the reason and whether my
  change is right or wrong. I think it is unlike to be a bug of
  reviewboard, but I am too lazy to read all the code :-) so, could
  anyone kindly tell me that what the real problem is and what should I
  do?

  Any help will be highly appreciated!

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

 --
 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 --
 Want to help the Review Board project? Donate today at 
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to 
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


How to switch hosts?

2011-01-13 Thread skip
I run RB via lighttpd on my desktop machine.  It was recently swapped out
for new hardware, and following company policy, the machine was renamed.
Searching the files in my ~/local/servers/hostname directory, I found
a couple innocuous references to my old hostname:

./review-board/logs/lighttpd-access.log
./review-board/logs/lighttpd-error.log

and several which were in ASCII files (easily modified):

./review-board/conf/settings_local.py
./review-board/conf/lighttpd.conf
./review-board/conf/search-cron.conf
./review-board/htdocs/reviewboard.fcgi

However, I found one SQLite file which contains a reference to the old
hostname:

./review-board/db/reviewboard.db

Can that reference be ignored?  If not, how can I update that file without
losing all my past review stuff?

Thx,

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: How to switch hosts?

2011-01-13 Thread Christian Hammond
Hi Skip,

You should be able to copy the database file and then go into the
admin UI - Settings and change the hostname there. It's really only
used for such things as email generation, to make sure the correct
host is used in the URLs.

You probably would want to migrate your data to MySQL or something,
though. SQLite isn't really made to handle concurrency well, and will
fall over with lots of users.

Christian


On Thursday, January 13, 2011,  s...@pobox.com wrote:
 I run RB via lighttpd on my desktop machine.  It was recently swapped out
 for new hardware, and following company policy, the machine was renamed.
 Searching the files in my ~/local/servers/hostname directory, I found
 a couple innocuous references to my old hostname:

     ./review-board/logs/lighttpd-access.log
     ./review-board/logs/lighttpd-error.log

 and several which were in ASCII files (easily modified):

     ./review-board/conf/settings_local.py
     ./review-board/conf/lighttpd.conf
     ./review-board/conf/search-cron.conf
     ./review-board/htdocs/reviewboard.fcgi

 However, I found one SQLite file which contains a reference to the old
 hostname:

     ./review-board/db/reviewboard.db

 Can that reference be ignored?  If not, how can I update that file without
 losing all my past review stuff?

 Thx,

 --
 Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/

 --
 Want to help the Review Board project? Donate today at 
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to 
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/reviewboard?hl=en

-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Question about postreview.py get_repository_info

2011-01-13 Thread Dan
Yes, it works well on my side, tested on 2 machines.
I will go to post a review.
As for the change description, is some recent change on rb server side
break it? If so, which change is it?

On Jan 13, 7:15 pm, Christian Hammond chip...@chipx86.com wrote:
 Yeah, though I just committed the fix. Can you make sure it works
 correctly on your end?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
  Hi Christian,

  You mean post a review request tohttp://reviews.reviewboard.org/?

  On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
  Hi Dan,

  You're correct, this is a bug, and your fix looks fine. We'll have to
  get that fix in. Want to post a review request?

  Christian

  On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
   Here is a more accurate description:

   In ReviewBoardServer.get_repository_info, it calls
   ReviewBoardServer.api_get to fetch the repository info from sever,
   from my debug, it show the return json is something like (if the
   repository is svn)

   {
       stat: ok,
       repository: {
           path: http://192.168.1.131/svn/Android;,
           tool: Subversion,
           id: 2,
           links: {
               info: {
                   href: http://192.168.1.131:81/api/repositories/2/
   info/,
                   method: GET
               },
               self: {
                   href: http://192.168.1.131:81/api/repositories/
   2/,
                   method:
                   GET
               }
           },
       name: local-android
       }
   }

   from the data structure of the json, we can see that use url =
   rsp['links']['info']['href'] of course will get a array key
   exception.
   should use url = rsp['repository']['links']['info']['href'].

   Is this a bug?

   On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
   Hi

   Here I have a problem with postreview.py when publish a review
   request, could anyone please have a look?

   My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
   fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
   and configed the constants necessary.

   When I run postreivew, it throws a array index exception at line 677:
   url = rsp['links']['info']['href'], The whole piece of code is

       def get_repository_info(self, rid):
           
           Returns detailed information about a specific repository.
           
           if self.deprecated_api:
               url = 'api/json/repositories/%s/info/' % rid
           else:
               rsp = self.api_get(
                   '%s%s/' % (self.root_resource['links']['repositories']
   ['href'],
                              rid))
               url = rsp['links']['info']['href']

           rsp = self.api_get(url)

           return rsp['info']

   I added debug info for rep, it did not contain the links index
   indeed, but it contained a repository index.

   Then I manually went to check the xml from reviewboard server, and
   found the structure of the xml is like this
       rsp
           repository
               links
                   info
                       href
   so I changed line 677 to url = rsp[repository]['links']['info']
   ['href'], finally it worked.

   Though it worked, I still did not know the reason and whether my
   change is right or wrong. I think it is unlike to be a bug of
   reviewboard, but I am too lazy to read all the code :-) so, could
   anyone kindly tell me that what the real problem is and what should I
   do?

   Any help will be highly appreciated!

   --
   Want to help the Review Board project? Donate today 
   athttp://www.reviewboard.org/donate/
   Happy user? Let us know athttp://www.reviewboard.org/users/
   -~--~~~~--~~--~--~---
   To unsubscribe from this group, send email to 
   reviewboard+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/reviewboard?hl=en

  --
  --
  Christian Hammond - chip...@chipx86.com
  Review Board -http://www.reviewboard.org
  VMware, Inc. -http://www.vmware.com

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group 

Re: Question about postreview.py get_repository_info

2011-01-13 Thread Dan
Yes, it works well on my side, tested on 2 machines.
I will go to post a review.
As for the change description, is some recent change on rb server side
break it? If so, which change is it?

On Jan 13, 7:15 pm, Christian Hammond chip...@chipx86.com wrote:
 Yeah, though I just committed the fix. Can you make sure it works
 correctly on your end?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
  Hi Christian,

  You mean post a review request tohttp://reviews.reviewboard.org/?

  On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
  Hi Dan,

  You're correct, this is a bug, and your fix looks fine. We'll have to
  get that fix in. Want to post a review request?

  Christian

  On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
   Here is a more accurate description:

   In ReviewBoardServer.get_repository_info, it calls
   ReviewBoardServer.api_get to fetch the repository info from sever,
   from my debug, it show the return json is something like (if the
   repository is svn)

   {
       stat: ok,
       repository: {
           path: http://192.168.1.131/svn/Android;,
           tool: Subversion,
           id: 2,
           links: {
               info: {
                   href: http://192.168.1.131:81/api/repositories/2/
   info/,
                   method: GET
               },
               self: {
                   href: http://192.168.1.131:81/api/repositories/
   2/,
                   method:
                   GET
               }
           },
       name: local-android
       }
   }

   from the data structure of the json, we can see that use url =
   rsp['links']['info']['href'] of course will get a array key
   exception.
   should use url = rsp['repository']['links']['info']['href'].

   Is this a bug?

   On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
   Hi

   Here I have a problem with postreview.py when publish a review
   request, could anyone please have a look?

   My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
   fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
   and configed the constants necessary.

   When I run postreivew, it throws a array index exception at line 677:
   url = rsp['links']['info']['href'], The whole piece of code is

       def get_repository_info(self, rid):
           
           Returns detailed information about a specific repository.
           
           if self.deprecated_api:
               url = 'api/json/repositories/%s/info/' % rid
           else:
               rsp = self.api_get(
                   '%s%s/' % (self.root_resource['links']['repositories']
   ['href'],
                              rid))
               url = rsp['links']['info']['href']

           rsp = self.api_get(url)

           return rsp['info']

   I added debug info for rep, it did not contain the links index
   indeed, but it contained a repository index.

   Then I manually went to check the xml from reviewboard server, and
   found the structure of the xml is like this
       rsp
           repository
               links
                   info
                       href
   so I changed line 677 to url = rsp[repository]['links']['info']
   ['href'], finally it worked.

   Though it worked, I still did not know the reason and whether my
   change is right or wrong. I think it is unlike to be a bug of
   reviewboard, but I am too lazy to read all the code :-) so, could
   anyone kindly tell me that what the real problem is and what should I
   do?

   Any help will be highly appreciated!

   --
   Want to help the Review Board project? Donate today 
   athttp://www.reviewboard.org/donate/
   Happy user? Let us know athttp://www.reviewboard.org/users/
   -~--~~~~--~~--~--~---
   To unsubscribe from this group, send email to 
   reviewboard+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/reviewboard?hl=en

  --
  --
  Christian Hammond - chip...@chipx86.com
  Review Board -http://www.reviewboard.org
  VMware, Inc. -http://www.vmware.com

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group 

Re: Question about postreview.py get_repository_info

2011-01-13 Thread Dan
Yes, it works well on my side, tested on 2 machines.
I will go to post a review.
As for the change description, is some recent change on rb server side
break it? If so, which change is it?

On Jan 13, 7:15 pm, Christian Hammond chip...@chipx86.com wrote:
 Yeah, though I just committed the fix. Can you make sure it works
 correctly on your end?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
  Hi Christian,

  You mean post a review request tohttp://reviews.reviewboard.org/?

  On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
  Hi Dan,

  You're correct, this is a bug, and your fix looks fine. We'll have to
  get that fix in. Want to post a review request?

  Christian

  On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
   Here is a more accurate description:

   In ReviewBoardServer.get_repository_info, it calls
   ReviewBoardServer.api_get to fetch the repository info from sever,
   from my debug, it show the return json is something like (if the
   repository is svn)

   {
       stat: ok,
       repository: {
           path: http://192.168.1.131/svn/Android;,
           tool: Subversion,
           id: 2,
           links: {
               info: {
                   href: http://192.168.1.131:81/api/repositories/2/
   info/,
                   method: GET
               },
               self: {
                   href: http://192.168.1.131:81/api/repositories/
   2/,
                   method:
                   GET
               }
           },
       name: local-android
       }
   }

   from the data structure of the json, we can see that use url =
   rsp['links']['info']['href'] of course will get a array key
   exception.
   should use url = rsp['repository']['links']['info']['href'].

   Is this a bug?

   On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
   Hi

   Here I have a problem with postreview.py when publish a review
   request, could anyone please have a look?

   My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
   fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
   and configed the constants necessary.

   When I run postreivew, it throws a array index exception at line 677:
   url = rsp['links']['info']['href'], The whole piece of code is

       def get_repository_info(self, rid):
           
           Returns detailed information about a specific repository.
           
           if self.deprecated_api:
               url = 'api/json/repositories/%s/info/' % rid
           else:
               rsp = self.api_get(
                   '%s%s/' % (self.root_resource['links']['repositories']
   ['href'],
                              rid))
               url = rsp['links']['info']['href']

           rsp = self.api_get(url)

           return rsp['info']

   I added debug info for rep, it did not contain the links index
   indeed, but it contained a repository index.

   Then I manually went to check the xml from reviewboard server, and
   found the structure of the xml is like this
       rsp
           repository
               links
                   info
                       href
   so I changed line 677 to url = rsp[repository]['links']['info']
   ['href'], finally it worked.

   Though it worked, I still did not know the reason and whether my
   change is right or wrong. I think it is unlike to be a bug of
   reviewboard, but I am too lazy to read all the code :-) so, could
   anyone kindly tell me that what the real problem is and what should I
   do?

   Any help will be highly appreciated!

   --
   Want to help the Review Board project? Donate today 
   athttp://www.reviewboard.org/donate/
   Happy user? Let us know athttp://www.reviewboard.org/users/
   -~--~~~~--~~--~--~---
   To unsubscribe from this group, send email to 
   reviewboard+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/reviewboard?hl=en

  --
  --
  Christian Hammond - chip...@chipx86.com
  Review Board -http://www.reviewboard.org
  VMware, Inc. -http://www.vmware.com

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group 

Re: Question about postreview.py get_repository_info

2011-01-13 Thread Dan
Yes, it works well on my side, tested on 2 machines.
I will go to post a review.
As for the change description, is some recent change on rb server side
break it? If so, which change is it?

On Jan 13, 7:15 pm, Christian Hammond chip...@chipx86.com wrote:
 Yeah, though I just committed the fix. Can you make sure it works
 correctly on your end?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
  Hi Christian,

  You mean post a review request tohttp://reviews.reviewboard.org/?

  On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
  Hi Dan,

  You're correct, this is a bug, and your fix looks fine. We'll have to
  get that fix in. Want to post a review request?

  Christian

  On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
   Here is a more accurate description:

   In ReviewBoardServer.get_repository_info, it calls
   ReviewBoardServer.api_get to fetch the repository info from sever,
   from my debug, it show the return json is something like (if the
   repository is svn)

   {
       stat: ok,
       repository: {
           path: http://192.168.1.131/svn/Android;,
           tool: Subversion,
           id: 2,
           links: {
               info: {
                   href: http://192.168.1.131:81/api/repositories/2/
   info/,
                   method: GET
               },
               self: {
                   href: http://192.168.1.131:81/api/repositories/
   2/,
                   method:
                   GET
               }
           },
       name: local-android
       }
   }

   from the data structure of the json, we can see that use url =
   rsp['links']['info']['href'] of course will get a array key
   exception.
   should use url = rsp['repository']['links']['info']['href'].

   Is this a bug?

   On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
   Hi

   Here I have a problem with postreview.py when publish a review
   request, could anyone please have a look?

   My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
   fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
   and configed the constants necessary.

   When I run postreivew, it throws a array index exception at line 677:
   url = rsp['links']['info']['href'], The whole piece of code is

       def get_repository_info(self, rid):
           
           Returns detailed information about a specific repository.
           
           if self.deprecated_api:
               url = 'api/json/repositories/%s/info/' % rid
           else:
               rsp = self.api_get(
                   '%s%s/' % (self.root_resource['links']['repositories']
   ['href'],
                              rid))
               url = rsp['links']['info']['href']

           rsp = self.api_get(url)

           return rsp['info']

   I added debug info for rep, it did not contain the links index
   indeed, but it contained a repository index.

   Then I manually went to check the xml from reviewboard server, and
   found the structure of the xml is like this
       rsp
           repository
               links
                   info
                       href
   so I changed line 677 to url = rsp[repository]['links']['info']
   ['href'], finally it worked.

   Though it worked, I still did not know the reason and whether my
   change is right or wrong. I think it is unlike to be a bug of
   reviewboard, but I am too lazy to read all the code :-) so, could
   anyone kindly tell me that what the real problem is and what should I
   do?

   Any help will be highly appreciated!

   --
   Want to help the Review Board project? Donate today 
   athttp://www.reviewboard.org/donate/
   Happy user? Let us know athttp://www.reviewboard.org/users/
   -~--~~~~--~~--~--~---
   To unsubscribe from this group, send email to 
   reviewboard+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/reviewboard?hl=en

  --
  --
  Christian Hammond - chip...@chipx86.com
  Review Board -http://www.reviewboard.org
  VMware, Inc. -http://www.vmware.com

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group 

Re: Question about postreview.py get_repository_info

2011-01-13 Thread Dan
Yes, it works well on my side, tested on 2 machines.
I will go to post a review.
As for the change description, is some recent change on rb server side
break it? If so, which change is it?

On Jan 13, 7:15 pm, Christian Hammond chip...@chipx86.com wrote:
 Yeah, though I just committed the fix. Can you make sure it works
 correctly on your end?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
  Hi Christian,

  You mean post a review request tohttp://reviews.reviewboard.org/?

  On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
  Hi Dan,

  You're correct, this is a bug, and your fix looks fine. We'll have to
  get that fix in. Want to post a review request?

  Christian

  On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
   Here is a more accurate description:

   In ReviewBoardServer.get_repository_info, it calls
   ReviewBoardServer.api_get to fetch the repository info from sever,
   from my debug, it show the return json is something like (if the
   repository is svn)

   {
       stat: ok,
       repository: {
           path: http://192.168.1.131/svn/Android;,
           tool: Subversion,
           id: 2,
           links: {
               info: {
                   href: http://192.168.1.131:81/api/repositories/2/
   info/,
                   method: GET
               },
               self: {
                   href: http://192.168.1.131:81/api/repositories/
   2/,
                   method:
                   GET
               }
           },
       name: local-android
       }
   }

   from the data structure of the json, we can see that use url =
   rsp['links']['info']['href'] of course will get a array key
   exception.
   should use url = rsp['repository']['links']['info']['href'].

   Is this a bug?

   On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
   Hi

   Here I have a problem with postreview.py when publish a review
   request, could anyone please have a look?

   My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
   fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
   and configed the constants necessary.

   When I run postreivew, it throws a array index exception at line 677:
   url = rsp['links']['info']['href'], The whole piece of code is

       def get_repository_info(self, rid):
           
           Returns detailed information about a specific repository.
           
           if self.deprecated_api:
               url = 'api/json/repositories/%s/info/' % rid
           else:
               rsp = self.api_get(
                   '%s%s/' % (self.root_resource['links']['repositories']
   ['href'],
                              rid))
               url = rsp['links']['info']['href']

           rsp = self.api_get(url)

           return rsp['info']

   I added debug info for rep, it did not contain the links index
   indeed, but it contained a repository index.

   Then I manually went to check the xml from reviewboard server, and
   found the structure of the xml is like this
       rsp
           repository
               links
                   info
                       href
   so I changed line 677 to url = rsp[repository]['links']['info']
   ['href'], finally it worked.

   Though it worked, I still did not know the reason and whether my
   change is right or wrong. I think it is unlike to be a bug of
   reviewboard, but I am too lazy to read all the code :-) so, could
   anyone kindly tell me that what the real problem is and what should I
   do?

   Any help will be highly appreciated!

   --
   Want to help the Review Board project? Donate today 
   athttp://www.reviewboard.org/donate/
   Happy user? Let us know athttp://www.reviewboard.org/users/
   -~--~~~~--~~--~--~---
   To unsubscribe from this group, send email to 
   reviewboard+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/reviewboard?hl=en

  --
  --
  Christian Hammond - chip...@chipx86.com
  Review Board -http://www.reviewboard.org
  VMware, Inc. -http://www.vmware.com

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group 

Re: Question about postreview.py get_repository_info

2011-01-13 Thread Christian Hammond
No need to post a review request anymore, it's now fixed in RBTools It
was a breakage in post-review, not Review Board. That code was pretty
new, as we just recently updated it to use the new API.

Christian

--
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com



On Thu, Jan 13, 2011 at 7:53 PM, Dan birb...@gmail.com wrote:
 Yes, it works well on my side, tested on 2 machines.
 I will go to post a review.
 As for the change description, is some recent change on rb server side
 break it? If so, which change is it?

 On Jan 13, 7:15 pm, Christian Hammond chip...@chipx86.com wrote:
 Yeah, though I just committed the fix. Can you make sure it works
 correctly on your end?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com

 On Thu, Jan 13, 2011 at 12:29 AM, Dan birb...@gmail.com wrote:
  Hi Christian,

  You mean post a review request tohttp://reviews.reviewboard.org/?

  On Jan 13, 1:33 pm, Christian Hammond chip...@chipx86.com wrote:
  Hi Dan,

  You're correct, this is a bug, and your fix looks fine. We'll have to
  get that fix in. Want to post a review request?

  Christian

  On Wednesday, January 12, 2011, Dan birb...@gmail.com wrote:
   Here is a more accurate description:

   In ReviewBoardServer.get_repository_info, it calls
   ReviewBoardServer.api_get to fetch the repository info from sever,
   from my debug, it show the return json is something like (if the
   repository is svn)

   {
       stat: ok,
       repository: {
           path: http://192.168.1.131/svn/Android;,
           tool: Subversion,
           id: 2,
           links: {
               info: {
                   href: http://192.168.1.131:81/api/repositories/2/
   info/,
                   method: GET
               },
               self: {
                   href: http://192.168.1.131:81/api/repositories/
   2/,
                   method:
                   GET
               }
           },
       name: local-android
       }
   }

   from the data structure of the json, we can see that use url =
   rsp['links']['info']['href'] of course will get a array key
   exception.
   should use url = rsp['repository']['links']['info']['href'].

   Is this a bug?

   On Jan 11, 9:24 pm, Dan birb...@gmail.com wrote:
   Hi

   Here I have a problem with postreview.py when publish a review
   request, could anyone please have a look?

   My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py
   fromhttps://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa03...,
   and configed the constants necessary.

   When I run postreivew, it throws a array index exception at line 677:
   url = rsp['links']['info']['href'], The whole piece of code is

       def get_repository_info(self, rid):
           
           Returns detailed information about a specific repository.
           
           if self.deprecated_api:
               url = 'api/json/repositories/%s/info/' % rid
           else:
               rsp = self.api_get(
                   '%s%s/' % (self.root_resource['links']['repositories']
   ['href'],
                              rid))
               url = rsp['links']['info']['href']

           rsp = self.api_get(url)

           return rsp['info']

   I added debug info for rep, it did not contain the links index
   indeed, but it contained a repository index.

   Then I manually went to check the xml from reviewboard server, and
   found the structure of the xml is like this
       rsp
           repository
               links
                   info
                       href
   so I changed line 677 to url = rsp[repository]['links']['info']
   ['href'], finally it worked.

   Though it worked, I still did not know the reason and whether my
   change is right or wrong. I think it is unlike to be a bug of
   reviewboard, but I am too lazy to read all the code :-) so, could
   anyone kindly tell me that what the real problem is and what should I
   do?

   Any help will be highly appreciated!

   --
   Want to help the Review Board project? Donate today 
   athttp://www.reviewboard.org/donate/
   Happy user? Let us know athttp://www.reviewboard.org/users/
   -~--~~~~--~~--~--~---
   To unsubscribe from this group, send email to 
   reviewboard+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/reviewboard?hl=en

  --
  --
  Christian Hammond - chip...@chipx86.com
  Review Board -http://www.reviewboard.org
  VMware, Inc. -http://www.vmware.com

  --
  Want to help the Review Board project? Donate today 
  athttp://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to 
  reviewboard+unsubscr...@googlegroups.com
  For more options, 

Issue 1943 in reviewboard: [ReviewBoard] Sending e-mail raise exception in Django framework (under some condition)

2011-01-13 Thread reviewboard

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 1943 by Jan.Koprowski: [ReviewBoard] Sending e-mail raise  
exception in Django framework (under some condition)

http://code.google.com/p/reviewboard/issues/detail?id=1943

What version are you running?
ReviewBoard 1.5

What steps will reproduce the problem?
1. Create robot user in admin panel but don't set e-mail for them
2. Send review using post-review on behalf someone using robot username  
publishing it and passing all necessary informations in parameters

3. Look do Apache logs. Django was crashed sending e-mail

What is the expected output? What do you see instead?
E-mail should be send to reviewer and submitter. Instead of that I see  
following in Apache log:
[Tue Jan 11 09:44:36 2011] [error] ERROR:root:Error sending e-mail  
notification with subject 'Review title' to 'Jan Koprowski  
submitter@address,,Christina Hammond reviewer@address': need more  
than 1 value to unpack

[Tue Jan 11 09:44:36 2011] [error] Traceback (most recent call last):
[Tue Jan 11 09:44:36 2011] [error]
File /reviewboard/lib/python2.7/site-packages/ReviewBoard-1.5.00.000.0_intel-py2.7.egg/reviewboard/notifications/email.py,  
line 177, in send_review_mail

[Tue Jan 11 09:44:36 2011] [error] message.send()
[Tue Jan 11 09:44:36 2011] [error]
File /reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/message.py,  
line 179, in send
[Tue Jan 11 09:44:36 2011] [error] return  
self.get_connection(fail_silently).send_messages([self])
[Tue Jan 11 09:44:36 2011] [error]
File /reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/backends/smtp.py,  
line 85, in send_messages

[Tue Jan 11 09:44:36 2011] [error] sent = self._send(message)
[Tue Jan 11 09:44:36 2011] [error]
File /reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/backends/smtp.py,  
line 104, in _send
[Tue Jan 11 09:44:36 2011] [error] recipients = map(self._sanitize,  
email_message.recipients())
[Tue Jan 11 09:44:36 2011] [error]
File /reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/backends/smtp.py,  
line 95, in _sanitize

[Tue Jan 11 09:44:36 2011] [error] name, domain = email.split('@', 1)
[Tue Jan 11 09:44:36 2011] [error] ValueError: need more than 1 value to  
unpack


What operating system are you using? What browser?
Linux
Apache2
mod_wsgi

Please provide any additional information below.
Cause of this issue is in reviewboard/notification/email.py in function  
send_review_mail (approximately line 122):


from_email = get_email_address_for_user(user)

recipients = set([from_email])

In those lines from_email is empty and add empty element to set of  
recipients.


--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Issue 1944 in reviewboard: post-review .reviewboardrc location calculation is not portable in windows

2011-01-13 Thread reviewboard

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 1944 by mt02caro: post-review .reviewboardrc location calculation  
is not portable in windows

http://code.google.com/p/reviewboard/issues/detail?id=1944

What version are you running?
0.8

What's the URL of the page containing the problem?
-

What steps will reproduce the problem?
1. Put .reviewboardrc in %APPDATA% (for vista this is not ..\Local  
Settings\Application Data (it doesn't exist) but something  
like C:\Users\user\AppData\Roaming, which is not constant, ofcourse.

2. Use post-review and see if it loads the server url correctly.


What is the expected output? What do you see instead?
post-review should load .reviewboardrc from %APPDATA% and  
not %USERPROFILE%\Local Settings\Application Data


What operating system are you using? What browser?
Windows Vista

Please provide any additional information below.

To make post-review portable cross windows versions the homepath  
calculation in post-review.py::main should simply be the APPDATA  
environment variable. Perhaps leave the current calculation as a fallback.


A patch for this has been attached.

Attachments:
post-review.patch  598 bytes

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 1279 in reviewboard: post-review on windows assumes pre-vista hard coded path

2011-01-13 Thread reviewboard


Comment #7 on issue 1279 by chipx86: post-review on windows assumes  
pre-vista hard coded path

http://code.google.com/p/reviewboard/issues/detail?id=1279

Issue 1944 has been merged into this issue.

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 1944 in reviewboard: post-review .reviewboardrc location calculation is not portable in windows

2011-01-13 Thread reviewboard

Updates:
Status: Duplicate
Mergedinto: 1279

Comment #1 on issue 1944 by chipx86: post-review .reviewboardrc location  
calculation is not portable in windows

http://code.google.com/p/reviewboard/issues/detail?id=1944

We need to do a new release, but post-review has used APPDATA in git for a  
while now.


--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 1942 in reviewboard: [ReviewBoard] Unexisted js scripts links in admin page

2011-01-13 Thread reviewboard

Updates:
Status: NeedInfo

Comment #1 on issue 1942 by chipx86: [ReviewBoard] Unexisted js scripts  
links in admin page

http://code.google.com/p/reviewboard/issues/detail?id=1942

Which 1.5 release are you running? 1.5.0? This should be fixed in 1.5.1.

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 1942 in reviewboard: [ReviewBoard] Unexisted js scripts links in admin page

2011-01-13 Thread reviewboard


Comment #2 on issue 1942 by Jan.Koprowski: [ReviewBoard] Unexisted js  
scripts links in admin page

http://code.google.com/p/reviewboard/issues/detail?id=1942

Yes, this is 1.5.0

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.