Re: Emails not sent when publishing review request from webapi

2010-09-02 Thread RShelley
I have narrowed this down further.

I created a service account in Reviewboard for post-review to create
Review Requests via the webapi.  That service account is conveniently
called post-review.  If I create a Review Request from post-review
(the CLI) and NOT publish it, then go to RB, login as post-review
and execute the webapi URL to publish the Review Request, it will be
published but emails will NOT be sent out.  However, if I create the
Review Request from the CLI and not publish it (same as before), then
login to RB as MY account (not post-review) and execute the webapi
call to publish, the emails ARE sent out.  This is curious because
I've tried setting post-review as a Superuser, and still no emails
were sent.

Any ideas?

-Ryan

On Sep 1, 6:31 pm, RShelley 12gaugeme...@gmail.com wrote:
 This has me pretty baffled.  I wrote a Java API awhile ago to publish
 a review request, among other things.  The API does in fact publish
 the request (it's visible to users, and is no longer in draft mode),
 however, emails are not being sent to the groups and reviewers on the
 request.  If I post a Review to a Review Request, the emails send just
 fine.

 The strange thing is, if I use the --publish command of post-review,
 it works fine and emails are sent.  I looked at the source code for
 post-review and the webapi URL in there is the same as what I'm using
 (/api/json/reviewrequests/ID/publish/, POST, no fields).  If I put
 the publish URL into my browser and do it, it also works.  I double
 checked that my publish call is a POST, and that I am logging in via
 the webapi (I imagine the publish would fail if I wasn't).  I looked
 at the source for reviewboard itself, and there's nothing I can see
 out of the ordinary for sending the emails.  The account I'm
 publishing with I've even set to superuser just in case there was a
 permission issue, and that didn't solve it either.  I have also
 verified that the groups/reviewers are added BEFORE the publish call
 is made.  If I leave it as is, published, and re-run it to republish
 it, emails are still never sent out to the groups and reviewers (so I
 don't think it's something to do with things not being saved timely
 enough) - and in fact, the Review Request will be updated and
 republished with the diffs from the original publish (sans emails).

 The RB logs show no errors.  Frustratingly, this was working until a
 recent power outage had us restart all our servers... and that really
 makes no sense.

 I'm at a loss at this point.  I'm not sure what to try next or where
 to look.  Anyone have any ideas?

 We're on RB 1.5

 Thanks!

 -Ryan

-- 
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: Emails not sent when publishing review request from webapi

2010-09-02 Thread RShelley
Gah! Ok... I found the problem, and it's pretty silly on my part.  The
account I was posting/publishing the review requests from did not have
an email address.  Problem solved.

-Ryan

On Sep 2, 9:20 am, RShelley 12gaugeme...@gmail.com wrote:
 I have narrowed this down further.

 I created a service account in Reviewboard for post-review to create
 Review Requests via the webapi.  That service account is conveniently
 called post-review.  If I create a Review Request from post-review
 (the CLI) and NOT publish it, then go to RB, login as post-review
 and execute the webapi URL to publish the Review Request, it will be
 published but emails will NOT be sent out.  However, if I create the
 Review Request from the CLI and not publish it (same as before), then
 login to RB as MY account (not post-review) and execute the webapi
 call to publish, the emails ARE sent out.  This is curious because
 I've tried setting post-review as a Superuser, and still no emails
 were sent.

 Any ideas?

 -Ryan

 On Sep 1, 6:31 pm, RShelley 12gaugeme...@gmail.com wrote:



  This has me pretty baffled.  I wrote a Java API awhile ago to publish
  a review request, among other things.  The API does in fact publish
  the request (it's visible to users, and is no longer in draft mode),
  however, emails are not being sent to the groups and reviewers on the
  request.  If I post a Review to a Review Request, the emails send just
  fine.

  The strange thing is, if I use the --publish command of post-review,
  it works fine and emails are sent.  I looked at the source code for
  post-review and the webapi URL in there is the same as what I'm using
  (/api/json/reviewrequests/ID/publish/, POST, no fields).  If I put
  the publish URL into my browser and do it, it also works.  I double
  checked that my publish call is a POST, and that I am logging in via
  the webapi (I imagine the publish would fail if I wasn't).  I looked
  at the source for reviewboard itself, and there's nothing I can see
  out of the ordinary for sending the emails.  The account I'm
  publishing with I've even set to superuser just in case there was a
  permission issue, and that didn't solve it either.  I have also
  verified that the groups/reviewers are added BEFORE the publish call
  is made.  If I leave it as is, published, and re-run it to republish
  it, emails are still never sent out to the groups and reviewers (so I
  don't think it's something to do with things not being saved timely
  enough) - and in fact, the Review Request will be updated and
  republished with the diffs from the original publish (sans emails).

  The RB logs show no errors.  Frustratingly, this was working until a
  recent power outage had us restart all our servers... and that really
  makes no sense.

  I'm at a loss at this point.  I'm not sure what to try next or where
  to look.  Anyone have any ideas?

  We're on RB 1.5

  Thanks!

  -Ryan

-- 
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: Emails not sent when publishing review request from webapi

2010-09-02 Thread RShelley
We switched from having to authenticate to the SMTP gateway (gmail) to
an internal SMTP gateway that doesn't require it.  Gmail didn't need
an email address for the user because it was able to pull it from the
authenticating user.  The internal SMTP gateway is open, so without
one it doesn't know how to route it properly.  Reviewboard was
probably sending it successfully, but our gateway was dropping it.
PEBCAK

-Ryan

On Sep 2, 11:55 am, Christian Hammond chip...@chipx86.com wrote:
 Glad that's all it was! That makes a lot more sense :)

 Christian

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



 On Thu, Sep 2, 2010 at 9:29 AM, RShelley 12gaugeme...@gmail.com wrote:
  Gah! Ok... I found the problem, and it's pretty silly on my part.  The
  account I was posting/publishing the review requests from did not have
  an email address.  Problem solved.

  -Ryan

  On Sep 2, 9:20 am, RShelley 12gaugeme...@gmail.com wrote:
   I have narrowed this down further.

   I created a service account in Reviewboard for post-review to create
   Review Requests via the webapi.  That service account is conveniently
   called post-review.  If I create a Review Request from post-review
   (the CLI) and NOT publish it, then go to RB, login as post-review
   and execute the webapi URL to publish the Review Request, it will be
   published but emails will NOT be sent out.  However, if I create the
   Review Request from the CLI and not publish it (same as before), then
   login to RB as MY account (not post-review) and execute the webapi
   call to publish, the emails ARE sent out.  This is curious because
   I've tried setting post-review as a Superuser, and still no emails
   were sent.

   Any ideas?

   -Ryan

   On Sep 1, 6:31 pm, RShelley 12gaugeme...@gmail.com wrote:

This has me pretty baffled.  I wrote a Java API awhile ago to publish
a review request, among other things.  The API does in fact publish
the request (it's visible to users, and is no longer in draft mode),
however, emails are not being sent to the groups and reviewers on the
request.  If I post a Review to a Review Request, the emails send just
fine.

The strange thing is, if I use the --publish command of post-review,
it works fine and emails are sent.  I looked at the source code for
post-review and the webapi URL in there is the same as what I'm using
(/api/json/reviewrequests/ID/publish/, POST, no fields).  If I put
the publish URL into my browser and do it, it also works.  I double
checked that my publish call is a POST, and that I am logging in via
the webapi (I imagine the publish would fail if I wasn't).  I looked
at the source for reviewboard itself, and there's nothing I can see
out of the ordinary for sending the emails.  The account I'm
publishing with I've even set to superuser just in case there was a
permission issue, and that didn't solve it either.  I have also
verified that the groups/reviewers are added BEFORE the publish call
is made.  If I leave it as is, published, and re-run it to republish
it, emails are still never sent out to the groups and reviewers (so I
don't think it's something to do with things not being saved timely
enough) - and in fact, the Review Request will be updated and
republished with the diffs from the original publish (sans emails).

The RB logs show no errors.  Frustratingly, this was working until a
recent power outage had us restart all our servers... and that really
makes no sense.

I'm at a loss at this point.  I'm not sure what to try next or where
to look.  Anyone have any ideas?

We're on RB 1.5

Thanks!

-Ryan

  --
  Want to help the Review Board project? Donate today at
 http://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.comreviewboard%2bunsubscr...@googlegr 
  oups.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


Error updating diff

2010-09-02 Thread RShelley
I just opened a bug for this:

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

But chances are it's my own problem, but I'm not sure.

I was able to create a Review Request on reviews.reviewboard.org with
a diff generated with git diff --full-index, but when I try to
update the diff with a revised diff (a delta from the first diff) I
get an error (see the bug tracker).  Is this something I'm doing
wrong?  It took the original diff just fine, but the delta diff it
balks at.  I've tried it both with --full-index and without, and
I've tried it as a delta from the first diff, and as a delta from the
origin.

-Ryan

-- 
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: post-review and P4PASSWD

2010-09-01 Thread RShelley
Ok, I can understand that.  But I don't think that check should be
during the def_repository_info function.  I imagine the
check_install function should probably happen somewhere higher up at
the beginning of the process instead of it's current location where
the error that would come back from a P4 install not finding the p4
executable is currently that a checkout couldn't be found.  That led
me astray for quite some time.

On Aug 29, 3:42 pm, Christian Hammond chip...@chipx86.com wrote:
 With the exception, would this be used to print an error and fail if p4
 isn't found?

 The reason we return None upon failure is that not all installs will use p4,
 and it actually shouldn't be failing if p4 is not installed. That check
 there is to see if p4 help can be run, and if not, we assume that that type
 of repository is just simply not supported on this system.

 I might be misunderstanding, though.

 What may be nice is to have some sort of option that lists all supported
 repository types, or checks if a certain provided type is supported, so that
 the calling script could verify this (basically an assertion check) before
 calling post-review with the necessary options.

 Christian

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



 On Thu, Aug 26, 2010 at 4:02 PM, RShelley 12gaugeme...@gmail.com wrote:
  Well, I got past the P4PASSWD issue and then began getting the error
  The current directory does not contain a checkout from a supported
  source code repository.  After much digging, I found that the error
  is actually wrong.

  The PerforceClient's def_repository_info function checks for a P4
  install first:

     def get_repository_info(self):
         if not check_install('p4 help'):
             return None

         data = execute([p4, info], ignore_errors=True)

  If p4 cannot be found for p4 help, it returns None, and the
  calling function assumes that a repository wasn't found, not that P4
  couldn't be found.  As it turns out, the service running this script
  is changing the PATH and post-review cannot find P4, so this check
  fails.  More specifically, this is running from Hudson, and a recent
  upgrade of the app changed how environment variables cascaded to child
  processes, so when Hudson was upgraded, the PATH environment variables
  weren't propagated, and post-review couldn't find P4.

  I'd like to suggest that this if check actually throw an exception,
  and not simply returns None.  Thoughts?

  -Ryan

  On Aug 26, 1:47 am, Christian Hammond chip...@chipx86.com wrote:
   I think it's definitely reasonable to have a parameter for this.

   The perforce.py mentioned above would be for Review Board. With
  post-review,
   you'd be looking for postreview.py in rbtools.

   What I'd advise is to check out a copy of rbtools from Git and add a
   --p4-ticket parameter. It shouldn't be too hard. You can see how the
  other
   options work (which are defined near the bottom of the file), and make
  use
   of the passed option to pass the right thing to p4. I don't know about
  the
   ticketing stuff well enough to know what needs to be passed or set. If
  you
   can get it working, though, I'll commit a patch so you won't have to
   maintain a fork for too long.

   Christian

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

   On Wed, Aug 25, 2010 at 4:46 PM, RShelley 12gaugeme...@gmail.com
  wrote:
Dana, that sums it up pretty well.  My problem is that the post-commit
command isn't being run by the user, it's run from a script on another
box (so it's not using P4V).  p4 login is called first to attempt to
login and obtain a ticket and then I can use the ticket for future
commands, but post-review doesn't accept a ticket parameter and p4
isn't taking it from the environment.  If I could pass it to post-
review with the rest of the p4 properties, it'd be splendid.

On Aug 25, 3:04 pm, Dana Lacoste dlaco...@aperio.com wrote:
 So, to summarize in case someone is searching through these archives
 later:

 Perforce, when security is turned on (this is a p4d server setting)
  will
 have different restrictions on what can and can't be done with the
 password on the CLIENT (i.e. you can't necessarily simply set an
 environment variable and run with it.  For reference, see the P4
 SysAdmin Guide athttp://
   www.perforce.com/perforce/r10.1/manuals/p4sag/03_superuser.html#1
 081537 )

 User RShelley is running into issues with this and is having
  difficulty.

http://reviews.reviewboard.org/r/1537/diff/hasapatch (which was
 discarded) which handles this situation for user tag_98007work.

 But, if you're on Windows (or potentially in some other
  environments),
 you're quite possibly using a .egg/.exe compiled version of Review
 Board and therefore it may

Emails not sent when publishing review request from webapi

2010-09-01 Thread RShelley
This has me pretty baffled.  I wrote a Java API awhile ago to publish
a review request, among other things.  The API does in fact publish
the request (it's visible to users, and is no longer in draft mode),
however, emails are not being sent to the groups and reviewers on the
request.  If I post a Review to a Review Request, the emails send just
fine.

The strange thing is, if I use the --publish command of post-review,
it works fine and emails are sent.  I looked at the source code for
post-review and the webapi URL in there is the same as what I'm using
(/api/json/reviewrequests/ID/publish/, POST, no fields).  If I put
the publish URL into my browser and do it, it also works.  I double
checked that my publish call is a POST, and that I am logging in via
the webapi (I imagine the publish would fail if I wasn't).  I looked
at the source for reviewboard itself, and there's nothing I can see
out of the ordinary for sending the emails.  The account I'm
publishing with I've even set to superuser just in case there was a
permission issue, and that didn't solve it either.  I have also
verified that the groups/reviewers are added BEFORE the publish call
is made.  If I leave it as is, published, and re-run it to republish
it, emails are still never sent out to the groups and reviewers (so I
don't think it's something to do with things not being saved timely
enough) - and in fact, the Review Request will be updated and
republished with the diffs from the original publish (sans emails).

The RB logs show no errors.  Frustratingly, this was working until a
recent power outage had us restart all our servers... and that really
makes no sense.

I'm at a loss at this point.  I'm not sure what to try next or where
to look.  Anyone have any ideas?

We're on RB 1.5

Thanks!

-Ryan

-- 
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: post-review and P4PASSWD

2010-08-26 Thread RShelley
Well, I got past the P4PASSWD issue and then began getting the error
The current directory does not contain a checkout from a supported
source code repository.  After much digging, I found that the error
is actually wrong.

The PerforceClient's def_repository_info function checks for a P4
install first:

def get_repository_info(self):
if not check_install('p4 help'):
return None

data = execute([p4, info], ignore_errors=True)

If p4 cannot be found for p4 help, it returns None, and the
calling function assumes that a repository wasn't found, not that P4
couldn't be found.  As it turns out, the service running this script
is changing the PATH and post-review cannot find P4, so this check
fails.  More specifically, this is running from Hudson, and a recent
upgrade of the app changed how environment variables cascaded to child
processes, so when Hudson was upgraded, the PATH environment variables
weren't propagated, and post-review couldn't find P4.

I'd like to suggest that this if check actually throw an exception,
and not simply returns None.  Thoughts?

-Ryan

On Aug 26, 1:47 am, Christian Hammond chip...@chipx86.com wrote:
 I think it's definitely reasonable to have a parameter for this.

 The perforce.py mentioned above would be for Review Board. With post-review,
 you'd be looking for postreview.py in rbtools.

 What I'd advise is to check out a copy of rbtools from Git and add a
 --p4-ticket parameter. It shouldn't be too hard. You can see how the other
 options work (which are defined near the bottom of the file), and make use
 of the passed option to pass the right thing to p4. I don't know about the
 ticketing stuff well enough to know what needs to be passed or set. If you
 can get it working, though, I'll commit a patch so you won't have to
 maintain a fork for too long.

 Christian

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



 On Wed, Aug 25, 2010 at 4:46 PM, RShelley 12gaugeme...@gmail.com wrote:
  Dana, that sums it up pretty well.  My problem is that the post-commit
  command isn't being run by the user, it's run from a script on another
  box (so it's not using P4V).  p4 login is called first to attempt to
  login and obtain a ticket and then I can use the ticket for future
  commands, but post-review doesn't accept a ticket parameter and p4
  isn't taking it from the environment.  If I could pass it to post-
  review with the rest of the p4 properties, it'd be splendid.

  On Aug 25, 3:04 pm, Dana Lacoste dlaco...@aperio.com wrote:
   So, to summarize in case someone is searching through these archives
   later:

   Perforce, when security is turned on (this is a p4d server setting) will
   have different restrictions on what can and can't be done with the
   password on the CLIENT (i.e. you can't necessarily simply set an
   environment variable and run with it.  For reference, see the P4
   SysAdmin Guide athttp://
 www.perforce.com/perforce/r10.1/manuals/p4sag/03_superuser.html#1
   081537 )

   User RShelley is running into issues with this and is having difficulty.

  http://reviews.reviewboard.org/r/1537/diff/hasa patch (which was
   discarded) which handles this situation for user tag_98007work.

   But, if you're on Windows (or potentially in some other environments),
   you're quite possibly using a .egg/.exe compiled version of Review
   Board and therefore it may be difficult to implement patches to the .py
   Python source.  If you use the interpreted version, then you can apply
   the patch and things might work for you (if your environment is like
   that of user tag_98007work )

   Does that seem to sum things up OK?

   Note that I don't see any of the problems described here, but I had to
   do the following to get post-review to work for everyone:
   1 - Everyone has to have the following environment set: P4PORT, P4USER,
   P4CLIENT (NOT P4PASSWD!)
   2 - Everyone has to be running P4V when they run post-review (I actually
   added it as a tool to P4V so the users can right click on any changelist
   and hit submit to reviewboard and nobody needs to use a command
   line/shell command at all)
   With perforce 2009.2/2010.1 this works fine with no problems : the
   ticket from P4V is visible to the p4 command line (called from
   post-review) and everything's fine (this is using latest RBTools
   installed with the command easy_install -U RBTools and review board
   1.5 beta 2)

   Dana Lacoste

   -Original Message-
   From: reviewboard@googlegroups.com [mailto:reviewbo...@googlegroups.com]

   On Behalf Of RShelley
   Sent: Wednesday, August 25, 2010 1:37 PM
   To: reviewboard
   Subject: Re: post-review and P4PASSWD

   My head hurts... Perforce consistently gives me reasons to not like
   it... Git can't come soon enough.

   Thanks for trying, I appreciate it!

  --
  Want to help the Review Board project? Donate today at
 http

post-review and P4PASSWD

2010-08-25 Thread RShelley
I've been struggling recently getting post-review to pick up the
P4PASSWD properly.  We have post-review as part of a script and we
first run p4 login -p to get a ticket and then put that ticket in
the environment.  Subsequent p4 describe -P ticket changelist
commands work fine, but post-review gives the P4PASSWORD is invalid
or unset error.  I've tried everything I can think of.  Is there any
way at all that we can get post-review to accept a --p4-ticket
argument and that can translate into -P ticket arguments on the P4
commands?

-- 
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: post-review and P4PASSWD

2010-08-25 Thread RShelley
Where would perforce.py be located?  I've hunted around and can't find
it.

On Aug 25, 9:28 am, tag_98007work tag98007w...@gmail.com wrote:
 I was having P4PASSWD issues until I patched the perforce.py file with
 the changes fromhttp://reviews.reviewboard.org/r/1537/diff/.  After I patched 
 the file
 I restarted the server (don't know if that's needed or not)

 On Aug 25, 8:56 am, RShelley 12gaugeme...@gmail.com wrote:



  I've been struggling recently getting post-review to pick up the
  P4PASSWD properly.  We have post-review as part of a script and we
  first run p4 login -p to get a ticket and then put that ticket in
  the environment.  Subsequent p4 describe -P ticket changelist
  commands work fine, but post-review gives the P4PASSWORD is invalid
  or unset error.  I've tried everything I can think of.  Is there any
  way at all that we can get post-review to accept a --p4-ticket
  argument and that can translate into -P ticket arguments on the P4
  commands?

-- 
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: post-review and P4PASSWD

2010-08-25 Thread RShelley
I'm on Linux and I found the site-packages, but I don't have any
directories under it, just the eggs.

I also tried:   find / -name perforce.py
and that didn't come up with anything

On Aug 25, 12:22 pm, tag_98007work tag98007w...@gmail.com wrote:
 It's located under reviewboard/scmtools.  The full path for mine is: /
 usr/lib/python2.5/site-packages/ReviewBoard-1.5rc1-py2.5.egg/
 reviewboard/scmtools.  Obviously this is a Unix install.  I'm not
 quite sure where it would be for windows.  Does that help?

 On Aug 25, 11:50 am, RShelley 12gaugeme...@gmail.com wrote:



  Where would perforce.py be located?  I've hunted around and can't find
  it.

  On Aug 25, 9:28 am, tag_98007work tag98007w...@gmail.com wrote:

   I was having P4PASSWD issues until I patched the perforce.py file with
   the changes fromhttp://reviews.reviewboard.org/r/1537/diff/.  After I 
   patched the file
   I restarted the server (don't know if that's needed or not)

   On Aug 25, 8:56 am, RShelley 12gaugeme...@gmail.com wrote:

I've been struggling recently getting post-review to pick up the
P4PASSWD properly.  We have post-review as part of a script and we
first run p4 login -p to get a ticket and then put that ticket in
the environment.  Subsequent p4 describe -P ticket changelist
commands work fine, but post-review gives the P4PASSWORD is invalid
or unset error.  I've tried everything I can think of.  Is there any
way at all that we can get post-review to accept a --p4-ticket
argument and that can translate into -P ticket arguments on the P4
commands?- Hide quoted text -

  - Show quoted text -

-- 
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: post-review and P4PASSWD

2010-08-25 Thread RShelley
My head hurts... Perforce consistently gives me reasons to not like
it... Git can't come soon enough.

Thanks for trying, I appreciate it!


On Aug 25, 1:20 pm, tag_98007work tag98007w...@gmail.com wrote:
 hmm, at one point (I'm having issues and attmpting to re-install,
 whole 'nother story) my ReviewBoard-1.5rc1-py2.5.egg was a top level
 directory. Under that was the scmtools directory.  So I'm not quite
 sure how to resolve that they egg isn't a directory.

 On Aug 25, 1:11 pm, RShelley 12gaugeme...@gmail.com wrote:



  I'm on Linux and I found the site-packages, but I don't have any
  directories under it, just the eggs.

  I also tried:   find / -name perforce.py
  and that didn't come up with anything

  On Aug 25, 12:22 pm, tag_98007work tag98007w...@gmail.com wrote:

   It's located under reviewboard/scmtools.  The full path for mine is: /
   usr/lib/python2.5/site-packages/ReviewBoard-1.5rc1-py2.5.egg/
   reviewboard/scmtools.  Obviously this is a Unix install.  I'm not
   quite sure where it would be for windows.  Does that help?

   On Aug 25, 11:50 am, RShelley 12gaugeme...@gmail.com wrote:

Where would perforce.py be located?  I've hunted around and can't find
it.

On Aug 25, 9:28 am, tag_98007work tag98007w...@gmail.com wrote:

 I was having P4PASSWD issues until I patched the perforce.py file with
 the changes fromhttp://reviews.reviewboard.org/r/1537/diff/.  After I 
 patched the file
 I restarted the server (don't know if that's needed or not)

 On Aug 25, 8:56 am, RShelley 12gaugeme...@gmail.com wrote:

  I've been struggling recently getting post-review to pick up the
  P4PASSWD properly.  We have post-review as part of a script and we
  first run p4 login -p to get a ticket and then put that ticket in
  the environment.  Subsequent p4 describe -P ticket changelist
  commands work fine, but post-review gives the P4PASSWORD is invalid
  or unset error.  I've tried everything I can think of.  Is there 
  any
  way at all that we can get post-review to accept a --p4-ticket
  argument and that can translate into -P ticket arguments on the 
  P4
  commands?- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -

-- 
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


Hudson plugin for Reviewboard

2010-05-05 Thread rshelley
I'd like to let everyone know that I've released an open source plugin
for Hudson Continuous Integration (http://www.hudson-ci.org) to
integrate with Reviewboard.

http://wiki.hudson-ci.org/display/HUDSON/Reviewboard+Plugin

The plugin allows an admin to configure a build to monitor SCM
changelists for external ID patterns (such as JIRA) and create or
update review requests from those changes.  This initial version only
supports Perforce changesets, but additional SCM changelists should be
relatively easy to integrate in future revisions.

For our in-house implementation, we have different Hudson builds for
different projects, each with their own JIRA prefix (ex: PROJ1-1234
would be a JIRA bug ID so the prefix is PROJ1-).  When a build is
triggered by a submission to Perforce, with a description that
includes the JIRA bug ID of the project the commit is associated with
(like PROJ1- JIRA projects), a new Reviewboard review request is
created.  Future commits with that JIRA bug ID in the change
description automatically update the review request the next time
Hudson runs the build.  JIRA is not required, it's simply an example
since it's our bug tracking package.

-Ryan

-- 
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: Reviewing merges

2010-05-02 Thread rshelley
I'm not sure this helps, but when you publish a review request and
then update the review request with a new changeset it will diff again
against the previous diff.  Each update/publish produces a delta that
you can follow.  However, publishing does email the groups/users,
which you may not want.

-Ryan

On Apr 30, 1:52 pm, Andrew aschwa...@gmail.com wrote:
 Hi all.  Is there any support for reviewing merges (changesets with
 two parents)?  I imagine that ideally, it would be a review request
 that has two diffs -- one against the first parent and the other
 against the second parent.

 --
 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 at 
http://groups.google.com/group/reviewboard?hl=en


post-review Perforce User

2010-04-26 Thread RShelley
Failed to execute command: ['p4', 'describe', '-s', '702076']
Access for user 'family' has not been enabled by 'p4 protect'.

I created the Hudson-Reviewboard plugin but when I deployed it to our
remote Hudson server, I realized that Hudson is running as the user
family, so when Hudson calls post-review, and post-review calls p4,
it's executing as the user family and family is not a user in
Perforce, so I'm getting the above error.  Is there a way to run post-
review to pass a username as a command parameter?

-Ryan

-- 
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: post-review Perforce User

2010-04-26 Thread RShelley
Yeah, I was aware of the post-review help options, but not of the
P4USER environment variable.  That resolved one issue, on to the
next :)  Thanks Dana!

On Apr 26, 9:13 am, Dana Lacoste dlaco...@aperio.com wrote:
 But, realistically, you should probably be using the environment
 variables P4USER, P4CLIENT, etc.
 Run p4 help environment for more information.

 Dana

-- 
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


Review update fails with deleted files in SCM

2010-04-07 Thread rshelley
I have a review that has some files that were modified.  Then I
modify (delete) a file, submit my change (post-commit), and run post-
review -r XX path to deleted file and other paths to updated files
to update the review, Reviewboard returns a 400 error and other
changes that were included in the update are ignored.  If the file
cannot be found in the SCM, should RB return 400 or assume the file is
deleted so it doesn't exist in the diff update?  I'm not sure a
missing SCM path is cause for a 400 response that blocks other changes
in the update.  Thoguhts?

-- 
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: post-commit with revision-range

2010-04-06 Thread rshelley
 So with this process, you want to continually
 update an existing review request, and you want it to incorporate the new
 updates alongside the existing ones? So if it's already created with a diff
 modifying 5 files, the next update that adds 2 files will result in a diff
 containing a total of 7?

Yep! Exactly.

 So that won't happen today unless that revision range spans the revision
 originally modifying those 5.

Right.  I'm getting around this by automatically publishing the review
when it gets created or updated.  That seems to be working, and I'm
actually happy about the way that works.  Since I'm writing the plugin
for Hudson, when a build runs, it creates or updates a review request
and then publishes it.  This way the review request emails get sent
out and the author knows when it's been done.  Otherwise they wouldn't
know to go into RB and manually publish it.  So, I'm ok with this
process currently and think that in an automated process like what I'm
doing, updating a diff with new files would defeat the purpose of
automation because it would still require a manual step that I want to
avoid.

 Going to be working toward expanding RBTools to make it easier to write 
 custom scripts such as
 this, so maybe it'd be better there?

Yeah, I'd agree.  I know you're currently developing some APIs and
hooks, but in the interim I've developed a Java API that calls your
RESTful endpoints with the proper params and authentication to update
fields and publish reviews.  Works fine for me for the moment.

Thanks for following back up!

-Ryan

-- 
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


Additional CLI options

2010-04-01 Thread rshelley
I've been able to complete a functional Hudson-Reviewboard plugin
(with many thanks).  With the core functionality of it done, I'm now
looking at how to improve upon it, already.  I know there isn't
currently a command-line option for this (or may not be one if it
doesn't seem to be ideal), but I was wondering if it would be much
effort to make post-review accept a few additional params to help with
automation.  --review-groups=groups (and --review-
people=people) to default the review to a particular set of review
groups and/or people (which I could configure as part of my Hudson-
Reviewboard plugin options) and also --publish to default the
review to be automatically published when created.  Thoughts?  I can
look at helping to add these options if interested, but it will have
to be done on the side (by corporate policy, we're not allowed to
contribute to open source projects... seriously).

-Ryan

-- 
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

To unsubscribe, reply using remove me as the subject.


Reviewboard is awesome...

2010-03-31 Thread rshelley
I'd like to just take a moment and say thanks to the developers of
Reviewboard.  Within the scope of my Proof of Concept I've had an
opportunity to use the tool in-depth and I'm thoroughly impressed with
it.  The integration between Perforce and Eclipse has made it
indispensable for me.  Using it for just a short amount of time we've
already found issues that would have been introduced into a build and,
recently, we held off on a production deployment because of issues we
found during reviews of code that would have otherwise been
overlooked.  Once I can convince the rest of my team to get on-board,
I'm sure the quality of our code will increase significantly.  Thanks
again... it's a great addition to our development process!

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: post-commit with revision-range

2010-03-30 Thread rshelley
Ok, let me clarify with a concrete scenario.

We use JIRA for our bug tracking.  JIRA generates bug IDs such as
BUG-123.  We also have Hudson for continuous integration, and it's
tied to Perforce to poll for changes, build the changes, and log the
changelists in the build (for release notes).  Our standard process is
to include within our Perforce descriptions the JIRA bug ID our check-
in is for, so Perforce syncs with JIRA to update the issue with the
Perforce files modified to complete the circle.  So now we know what
files were changed to fix what bugs in which build (and in reverse,
what build certain changes were included in by reference through
JIRA).

There are many, many, MANY times where one check-in (and therefore,
one changelist) does not encompass all of the changes required to
resolve the bug, but all changes are tracked by a single JIRA.  We
have a culture of checking-in often and not holding onto files for
days on end until we check-in one massive changelist since we're
developing in a highly collaborative and volatile environment (we
often have people developing within the same file at the same time, so
merges are often done on a daily basis).  This is why we use CI to
build and test the project regularly.  So it doesn't make sense for us
to create dozens of new review requests for new changelists since they
are often updates to a related JIRA.

Now, we're both in agreement that the CLI provides all the
functionality of creating and updating reviews and the developer can
decide what files update what reviews and when to create a new
review.  However, I can't get my developers to use it.  Both Kyle
Hayes and I have been expounding it, documenting it internally,
emailing our team, and we haven't had a single person use it yet.  And
until I have something people will use (or even better, in their view,
is if it's done for them), I can't make it a standard.

So my goal is to create a Hudson plugin to link Perforce and
Reviewboard for post-commit reviews.  Now, I know that Reviewboard has
a field for Bugs, which we currently have linked to JIRA, but I'm not
aware of a way to pass that in as part of post-review, or retrieve
through a CLI query, so I'm looking into mapping a Perforce
changelist, to a JIRA bug (via the bug ID entered in the changelist
description) and the Reviewboard ID.  This mapping should be
relatively trivial.  What isn't trivial is making updates to a review
request when an updated changelist is submit (meaning a second
changelist is submit with the same JIRA bug ID as another changelist
that has an open review request).  This is where my Improvement
request 1562 would have been helpful.

From what I gather in your post, however, is that revision-range
isn't supported by post-review for Perforce which shouldn't be a
problem.  Hudson gives me the depot paths as part of the change set
the build was executed for.  I just want to make sure that if I have 5
files in the review, and I add 2 and update 3 that the review shows 7
files with three deltas and the other 3 files that were in the
original review aren't dropped.

I hope that makes sense and isn't too confusing.  I know post-commit
is a less-than-ideal solution.  I'm pro-pre-commit, but my team is
not.  Well, they're not even really pro-review, but that's going to
change, and I need to start somewhere.  So, unless I make it easy or
transparent to them, they will keep pushing back.  For the time-being,
some review is better than no review!

-- 
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

To unsubscribe, reply using remove me as the subject.


WindowsError: [Error 2] The system cannot find the file specified

2010-03-17 Thread RShelley
Hey folks, I'm evaluating ReviewBoard and trying to get it to work
with our Perforce SCM but we're getting an error when I attempt to run
the post-review command:

(I've abridged the paths with ellipses for brevity)

Error:
---

C:\p4-tp-1.02post-review 657749 -d --p4-client=rshelley-tp-1.02
 svn info
 p4 info
 repository info: Path: perforce:1666, Base path: None, Supports changesets: 
 True
 Generating diff for changenum 657749
 p4 describe -s 657749
 Processing edit of //p4-dol/.../PartitionedCacheManager.java
 Writing //p4-dol/.../PartitionedCacheManager.java#3 to 
 c:\docume~1\rshelley\locals~1\temp\tmptvzskh
 p4 print -o c:\docume~1\rshelley\locals~1\temp\tmptvzskh -q 
 //p4-dol/.../PartitionedCacheManager.java#3
 diff -urNp c:\docume~1\rshelley\locals~1\temp\tmptvzskh 
 c:\p4-tp-1.02\...\PartitionedCacheManager.java
Traceback (most recent call last):
  File C:\Python26\Scripts\post-review-script.py, line 8, in
module
load_entry_point('RBTools==0.2rc1', 'console_scripts', 'post-
review')()
  File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
2760, in main
  File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
1436, in diff
  File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
1733, in _changenum_diff
  File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
1763, in _do_diff
  File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
2348, in execute
  File C:\Python26\lib\subprocess.py, line 621, in __init__
errread, errwrite)
  File C:\Python26\lib\subprocess.py, line 830, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified


Perforce Info:
---
User name: rshelley
Client name: NH-RSHELLEY-D1
Client host: NH-RSHELLEY-D1
Client root: c:\p4-tp-1.02
Current directory: c:\p4-tp-1.02
Client address: 10.196.132.150:2286
Server address: perforce:1666
Server root: /p4/depots
Server date: 2010/03/17 14:53:28 -0700 PDT
Server version: P4D/LINUX26X86_64/2007.3/143793 (2008/01/09)


I've checked all of the paths that the debug outputs, and all files
exist in their respective locations.  Any ideas?  Thanks!

-Ryan

-- 
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: WindowsError: [Error 2] The system cannot find the file specified

2010-03-17 Thread RShelley
Thanks Christian, that helped, and thanks for the extremely prompt
response!

-Ryan

On Mar 17, 3:01 pm, Christian Hammond chip...@chipx86.com wrote:
 Hi,

 You need to have GNU diff in your system path somewhere. You can get this
 at:

 http://gnuwin32.sourceforge.net/packages/diffutils.htm

 We're going to make this error more clear in an upcoming version.

 Christian

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



 On Wed, Mar 17, 2010 at 2:56 PM, RShelley 12gaugeme...@gmail.com wrote:
  Hey folks, I'm evaluating ReviewBoard and trying to get it to work
  with our Perforce SCM but we're getting an error when I attempt to run
  the post-review command:

  (I've abridged the paths with ellipses for brevity)

  Error:
  ---

  C:\p4-tp-1.02post-review 657749 -d --p4-client=rshelley-tp-1.02
   svn info
   p4 info
   repository info: Path: perforce:1666, Base path: None, Supports
  changesets: True
   Generating diff for changenum 657749
   p4 describe -s 657749
   Processing edit of //p4-dol/.../PartitionedCacheManager.java
   Writing //p4-dol/.../PartitionedCacheManager.java#3 to
  c:\docume~1\rshelley\locals~1\temp\tmptvzskh
   p4 print -o c:\docume~1\rshelley\locals~1\temp\tmptvzskh -q
  //p4-dol/.../PartitionedCacheManager.java#3
   diff -urNp c:\docume~1\rshelley\locals~1\temp\tmptvzskh
  c:\p4-tp-1.02\...\PartitionedCacheManager.java
  Traceback (most recent call last):
   File C:\Python26\Scripts\post-review-script.py, line 8, in
  module
     load_entry_point('RBTools==0.2rc1', 'console_scripts', 'post-
  review')()
   File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
  2760, in main
   File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
  1436, in diff
   File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
  1733, in _changenum_diff
   File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
  1763, in _do_diff
   File build/bdist.linux-x86_64/egg/rbtools/postreview.py, line
  2348, in execute
   File C:\Python26\lib\subprocess.py, line 621, in __init__
     errread, errwrite)
   File C:\Python26\lib\subprocess.py, line 830, in _execute_child
     startupinfo)
  WindowsError: [Error 2] The system cannot find the file specified

  Perforce Info:
  ---
  User name: rshelley
  Client name: NH-RSHELLEY-D1
  Client host: NH-RSHELLEY-D1
  Client root: c:\p4-tp-1.02
  Current directory: c:\p4-tp-1.02
  Client address: 10.196.132.150:2286
  Server address: perforce:1666
  Server root: /p4/depots
  Server date: 2010/03/17 14:53:28 -0700 PDT
  Server version: P4D/LINUX26X86_64/2007.3/143793 (2008/01/09)

  I've checked all of the paths that the debug outputs, and all files
  exist in their respective locations.  Any ideas?  Thanks!

  -Ryan

  --
  Want to help the Review Board project? Donate today at
 http://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.comreviewboard%2bunsubscr...@googlegr 
  oups.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