Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-15 Thread reviewboard

Updates:
Status: UserError

Comment #8 on issue 3913 by trowb...@gmail.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

(No comment was entered for this change.)

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-15 Thread reviewboard


Comment #7 on issue 3913 by jstob...@gmail.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

This point is also valid for the command-line interface. Once I used single  
quotes around the --password argument it worked as expected.



--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-15 Thread reviewboard


Comment #6 on issue 3913 by jstob...@gmail.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

Hi Barret,

I have determined what the issue is. The password which is passed to rbt in  
the --password argument looks something like this mypswd$!123. If I echo  
that string in bash then result is mypswd123 because we are using double  
quotes. If I change the echo command to use single quotes, I get to correct  
output of mypswd$!123. The fix for me is in the perl snippet that I have  
pasted here.


I changed: $rbt_options   .= qq( --password "$password");
to $rbt_options   .= qq( --password '$password');

And everything started to work.

Sorry for inconveniencing you with this issue, user error again!

Regards,
Jens.


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-13 Thread reviewboard


Comment #5 on issue 3913 by bar...@beanbaginc.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

There should be no restrictions. If you're quoting the password, it should  
be sent correctly, even with special characters.


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-10 Thread reviewboard


Comment #4 on issue 3913 by jstob...@gmail.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913


Hi Barret,

Do you know if the characters that make up the password passed in on the  
command-line have restrictions? My password consists of letter, numbers and  
special characters like ! and $. This wasn't an issue when using RBTools  
0.7.2 but maybe something has changed.


Regards,
Jens.


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-09 Thread reviewboard


Comment #3 on issue 3913 by bar...@beanbaginc.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

Thanks for replying.

I'll try again to reproduce this.

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-08 Thread reviewboard


Comment #2 on issue 3913 by jstob...@gmail.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913


Hi Barret,

Thank you for looking into the issue.

I validated the username:password by logging out of the WebGUI and then  
logged back in with the username:password which I used in the "rbt" command  
line. The log
in was successful and I could see my dashboard. I'm going to assume that  
this is a valid test of the username and password.


I performed the same steps as you and here are the results. Based on the  
results, if I manually enter the password, the action is performed  
successfully, but if I specify the password on the command line is fails.


Has something changed in how the --password option parses the argument  
passed in on the command line?


1. Remove ~/.rbtools-cookies and run `rbt status --username username  
--password password`.  *** FAILED


~/ws/myproject/code > rbt status --debug  
--server "https://review.my.server.com/"; --repository "myRepo"  
--username "jstobern" --password "mypassword"

RBTools 0.7.4
Python 2.7.5 (default, Jun 24 2015, 00:41:19)

[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Running on  
Linux-3.10.0-229.7.2.el7.x86_64-x86_64-with-centos-7.1.1503-Core

Home = /home/jstobern
Current directory = /home/jstobern/ws/myproject/code
Running: git version
Checking for a Subversion repository...
Running: svn --non-interactive info
Command exited with rc 1: ['svn', '--non-interactive', u'info']

svn: E155007: '/home/jstobern/ws/myproject/code' is not a working copy
---

Checking for a Git repository...
Running: git rev-parse --git-dir
Command exited with rc 128: ['git', 'rev-parse', '--git-dir']

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
---

Checking for a Mercurial repository...
Unable to execute "hg --help": skipping Mercurial
Checking for a CVS repository...
repository info: Path: cvspc.my.server.com:/swdev/cvsrep, Base path:  
None, Supports changesets: False

Making HTTP GET request to https://review.my.server.com/api/
Got API Error 103 (HTTP code 401): You are not logged in
Error data: {u'stat': u'fail', u'err': {u'msg': u'You are not logged  
in', u'code': 103}}

Traceback (most recent call last):
  File "/usr/bin/rbt", line 9, in 
load_entry_point('RBTools==0.7.4', 'console_scripts', 'rbt')()
  File "/usr/lib/python2.7/site-packages/rbtools/commands/main.py", line  
133, in main

command.run_from_argv([RB_MAIN, command_name] + args)
  File "/usr/lib/python2.7/site-packages/rbtools/commands/__init__.py",  
line 612, in run_from_argv

exit_code = self.main(*args) or 0
  File "/usr/lib/python2.7/site-packages/rbtools/commands/status.py", line  
39, in main

api_client, api_root = self.get_api(server_url)
  File "/usr/lib/python2.7/site-packages/rbtools/commands/__init__.py",  
line 768, in get_api

raise CommandError('Unexpected API Error: %s' % e)
rbtools.commands.CommandError: Unexpected API Error: You are not logged in  
(HTTP 401, API Error 103)


2. Remove ~/.rbtools-cookies and run `rbt status --username username`  ***  
PASSED


~/ws/myproject/code > rm -f /home/jstobern/.rbtools-cookies
~/ws/myproject/code > rbt status --debug  
--server "https://review.my.server.com/"; --repository "myRepo"  
--username "jstobern"

RBTools 0.7.4
Python 2.7.5 (default, Jun 24 2015, 00:41:19)

[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Running on  
Linux-3.10.0-229.7.2.el7.x86_64-x86_64-with-centos-7.1.1503-Core

Home = /home/jstobern
Current directory = /home/jstobern/ws/myproject/code
Running: git version
Checking for a Subversion repository...
Running: svn --non-interactive info
Command exited with rc 1: ['svn', '--non-interactive', u'info']

svn: E155007: '/home/jstobern/ws/myproject/code' is not a working copy
---

Checking for a Git repository...
Running: git rev-parse --git-dir
Command exited with rc 128: ['git', 'rev-parse', '--git-dir']

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
---

Checking for a Mercurial repository...
Unable to execute "hg --help": skipping Mercurial
Checking for a CVS repository...
repository info: Path: cvspc.my.server.com:/swdev/cvsrep, Base path:  
None, Supports changesets: False

Making HTTP GET request to https://review.my.server.com/api/


Please log in to the Review Board server at review.my.server.com.
Password:

Making HTTP GET request to https://review.my.server.com/api/info/
Making HTTP GET request to  
https://review.my.server.com/api/session/?expand=user
Making HTTP GET request to  
https://review.my.server.com/api/repositories/?only-links=&only-fields=id%2Cname%2Cmirror_path%2Cpath
Making HTTP GET request to  
https://review.my.server.com/api/review-requests/?status=pending&expand=draft&repository=14&from-user=jstobern




Making HTT

Re: Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-07 Thread reviewboard


Comment #1 on issue 3913 by bar...@beanbaginc.com: Update to RBTools 0.7.4,  
scripts to interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

Hi, I'm having trouble reproducing your error with Review Board 1.7.16 /  
master and RBTools 0.7.4.


I've tried the following to reproduce:

1. Remove ~/.rbtools-cookies and run `rbt status --username username  
--password password`.

2. Remove ~/.rbtools-cookies and run `rbt status --username username`
3. Change the session ID in ~/.rbtools-cookies and run `rbt status  
--username username --password password`.
4. Change the session ID in ~/.rbtools-cookies and run `rbt status  
--username username`.


All of these were successful (provided the username and password  
combination is correct). I've tried `rbt post` and it seems to work as  
well. Can you verify that the username:password being used is correct or  
provide more reproduction steps?


Regards,
Barret

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Issue 3913 in reviewboard: Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

2015-07-07 Thread reviewboard

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

New issue 3913 by jstob...@gmail.com: Update to RBTools 0.7.4, scripts to  
interface with reviewboard now error.

https://code.google.com/p/reviewboard/issues/detail?id=3913

*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.


What version are you running?
RBTools 0.7.4 (CentOS package RBTools-0.7.4-1.el7.noarch)

What's the URL of the page containing the problem?
N/A.

What steps will reproduce the problem?
1. post a review to reviewboard explicitly indicating --username and  
--password.

2.
3.

What is the expected output? What do you see instead?
I expected the post to execute error free so no output. Instead I see:
ERROR: Unexpected API Error: You are not logged in (HTTP 401, API Error 103)



What operating system are you using? What browser?
CentOS for RBTools, Windows/Centos with Mozilla or IE for dashboard access.

Please provide any additional information below.

I posted this information on the reviewboard support fourm:

https://groups.google.com/forum/#!topic/reviewboard/B5SJadJr7WM

Here are the details again:

Hello,

I have been using Review Board version 1.7.16 with great success. I had  
been using Centos 7 with RBTools 0.7.2 (package RBTools-0.7.2-1.el7.noarch).


I recently updated the Centos 7 install and RBTool was updated to version  
0.7.4 (package RBTools-0.7.4-1.el7.noarch).


I use a canned script which posts reviews to a remote server running  
reviewboard 1.7.16.


The error that I am getting is:

ERROR: Unexpected API Error: You are not logged in (HTTP 401, API Error 103)

The problem with this message is that I know that I am logged in.

This is the script that I run on 0.7.2 which has worked flawlessly.  
Unfortunately I can't share it all but this is the snippet that runs the  
rbt stuff.


#
# Use RBTools if available
if (system(qq(rbt --version 2>/dev/null)) == 0)
{
# Posting Options:
my $rbt_options = qq( --publish) unless ( $draft );

# Review Board Server Options:
$rbt_options   .= qq( --server "https://{URL Removed, sorry}");
$rbt_options   .= qq( --username "$username");
$rbt_options   .= qq( --password "$password");

# Repository Options:
$rbt_options   .= qq( --repository "$repository");

# Review Request Field Options:
$rbt_options   .= qq( --summary "$title");
$rbt_options   .= qq( --description "$description") unless  
(-f "$description");
$rbt_options   .= qq( --description-file "$description") if  
(-f "$description");

$rbt_options   .= qq( --testing-done "$testing") unless (-f "$testing");
$rbt_options   .= qq( --testing-done-file "$testing") if  
(-f "$testing");

$rbt_options   .= qq( --branch "$branch");
$rbt_options   .= qq( --target-groups "$reviewer_groups");
$rbt_options   .= qq( --target-people "$reviewers");

# Diff Generation Options:
$rbt_options   .= qq( --diff-filename "$diffFile");

# Create a new review request
my $output = qx(rbt post $rbt_options);
my $result = ($? >> 8);
if ($result == 0)
{
(my $url) = $output =~ /(.*\/diff\/)/;
print "\nYou can watch your review at ".$url."\n\n";

system("rm -f $diffFile $stdErr");
}

exit $result;
}

If I run the rbt command manually with debug on I see the same issue so I  
know that the script isn't the problem.


~/ws/myproject/code > /usr/bin/rbt post --debug  
--server "https://review.my.server.com"; --username "jstobern"  
--password "" --repository "" --summary "Test cmdline"  
--branch HEAD --diff-filename review.diff

RBTools 0.7.4
Python 2.7.5 (default, Jun 24 2015, 00:41:19)

[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Running on  
Linux-3.10.0-229.7.2.el7.x86_64-x86_64-with-centos-7.1.1503-Core

Home = /home/jstobern
Current directory = /home/jstobern/ws/myproject/code
Running: git version
Checking for a Subversion repository...
Running: svn --non-interactive info
Command exited with rc 1: ['svn', '--non-interactive', u'info']

svn: E155007: '/home/jstobern/ws/myproject/code' is not a working copy
---

Checking for a Git repository...
Running: git rev-parse --git-dir
Command exited with rc 128: ['git', 'rev-parse', '--git-dir']

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
---