Re: Git style mercurial diffs with file renames don't work

2014-09-23 Thread Colin Caughie
I submitted the patch that enabled Mercurial rename support a few years 
ago. For the most part it works well but there are definitely cases 
where it doesn't and I haven't been able to pin them all down. I think 
it may be something to do with whether the original file was added or 
changed in the parent diff, in which case the master repo may not know 
about it.


I also know there's a bug where if a file has been renamed but there is 
no change to its content, the diff doesn't display correctly.


Colin

On 9/16/2014 6:39 AM, Sara Rayburn wrote:

Hi,

We have a problem where the diff viewer for diffs with rename 
operations. We use mercurial, and output the diff in git style.


Here's a trivial example diff file:

diff --git a/include/CCvideo/configUI.H b/include/CCvideo/configUITest.H
rename from include/CCvideo/configUI.H
rename to include/CCvideo/configUITest.H

In the Diff summary section is:

include/CCvideo/configUITest.H 
http://reviewboard.cctechnol.com/r/4112/diff/#0

Was include/CCvideo/configUI.H

So I guess the rename works up to a point, but this is the error in 
the view diff page:


The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in 
the repository


This may be a bug in the software, a temporary outage, or an issue 
with the format of your diff.


Please try again, and if you still have trouble, contact support 
http://reviewboard.cctechnol.com/support/.


With traceback as follows:


Traceback (most recent call last):
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py,
 line 236, in get
 renderer = self.create_renderer(context, *args, **kwargs)
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/reviews/views.py,
 line 1088, in create_renderer
 *args, **kwargs)
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py,
 line 328, in create_renderer
 self.diff_file = self._get_requested_diff_file()
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py,
 line 369, in _get_requested_diff_file
 request=self.request)
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py,
 line 383, in populate_diff_chunks
 chunks = generator.get_chunks()
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py,
 line 153, in get_chunks
 large_data=True)
   File 
/usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py,
 line 111, in cache_memoize
 data = lookup_callable()
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py,
 line 152, in lambda
 lambda: list(self._get_chunks_uncached()),
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py,
 line 159, in _get_chunks_uncached
 old = get_original_file(self.filediff, self.request, encoding_list)
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py,
 line 169, in get_original_file
 request=request)
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py,
 line 291, in get_file
 large_data=True)[0]
   File 
/usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py,
 line 111, in cache_memoize
 data = lookup_callable()
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py,
 line 290, in lambda
 request)],
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py,
 line 456, in _get_file_uncached
 data = self.get_scmtool().get_file(path, revision)
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py,
 line 43, in get_file
 return self.client.cat_file(path, six.text_type(revision))
   File 
/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py,
 line 264, in cat_file
 raise FileNotFoundError(path, rev)
FileNotFoundError: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not 
be found in the repository

--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google 
Groups reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to reviewboard+unsubscr...@googlegroups.com 
mailto:reviewboard+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: 

Re: Review Board 2.x and hg postreview

2014-06-04 Thread Colin Caughie

  
  
Following those instructions exactly I
  get an error message of "The specified diff file is empty", which
  is not surprising since file2.txt was never added to the
  repository.
  
  If I do "hg add file2.txt" before the first qnew on the other
  hand, "hg postreview" works fine and correctly shows Line2 being
  added to file2.txt.
  
  If it is still breaking for you even with the hg add, can you let
  me know what versions of mercurial, ReviewBoard and the
  reviewboard extension you're using?
  
  If you're using the latest versions and it still doesn't work,
  please send me the output of
  
  hg postreview --debug --apitrace
  
  Thanks,
  Colin
  
  On 6/4/2014 7:15 AM, Bruce Cran wrote:


  

  

  

  

  
On Tue, Jun 3, 2014 at 8:33 AM, Colin
      Caughie c.caug...@gmail.com
  wrote:
   It is something I'd like to get to the
  bottom of though so if you have any further
  information, 
   e.g. what's going on in the particular
  diffs and parent diffs that cause this issue,
  I'd be  glad to take a look at it.

  
  I've managed to recreate the problem such that
  'rbt post' works and 'hg postreview' fails:
  first, on the remote server create a new
  repository with "hg init". Then, in Windows
  (with Python 2.7), run:
  

hg clone repo rbtest01
  cd rbtest01

echo Line1  file1.txt
  
  hg add file1.txt

hg commit -m "initial commit"
  
  hg push
  
  echo Line1  file2.txt

hg qnew first
  
  echo Line2  file2.txt

hg qnew second
  
  hg postreview
  
  

If you don't create file1.txt and try and create a review with
an empty repo then 'rbt post' fails too, with:

 1 outgoing changesets between remote and base.
 Running: hg parents --hidden -r 00d28ac9c6c6
--template {node|short} --config
extensions.rbtoolsnormalize=C:\Python27\lib\site-packages\
rbtools-0.6-py2.7.egg\rbtools\helpers\hgext.py
Traceback (most recent call last):
  File "C:\Python27\Scripts\rbt-script.py", line 9, in
module
    load_entry_point('RBTools==0.6', 'console_scripts', 'rbt')()
  File
"C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\commands\main.py",
line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File
"C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\commands\__init__.py",
line 422, in run_from_argv
    exit_code = self.main(*args) or 0
  File
"C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\commands\post.py",
line 717, in main
    revisions = self.get_revisions()
  File
"C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\commands\post.py",
line 619, in get_revisions
    self._revisions =
self.tool.parse_revision_spec(self.cmd_args)
  File
"C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\clients\mercurial.py",
line 267, in parse_revision_spec
    '--template', '{node|short}']).split()[0]
IndexError: list index out of range

  -- 
  
  Bruce
  

  


  




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


Re: Review Board 2.x and hg postreview

2014-06-04 Thread Colin Caughie
Ah - yes, you have to use the -o option to tell ReviewBoard to figure 
out the parent diff base by doing the equivalent of hg outgoing. For 
this to work you need to make sure that your default push repository is 
the same as the one that ReviewBoard sees; if it isn't you can use -O 
instead. (hg help postreview has all of this information.)


--master also works but means you have to figure it out yourself.

Apologies for not thinking of that earlier. I have it configured in my 
default args for the postreview command so I never actually have to type it.


Colin

On 06/04/2014 4:36 PM, Bruce Cran wrote:
I'm using Mercurial 3.0, ReviewBoard 2.0.1 and as of today, the latest 
code from https://bitbucket.org/ccaughie/hgreviewboard . I did forget 
to add hg add file2.txt to the list of steps, but I ran it during 
testing.   Should the code figure out which revision to use for the 
parent diff base? It works if I specify --master qparent.


--
Bruce


On Wed, Jun 4, 2014 at 4:36 PM, Colin Caughie c.caug...@gmail.com 
mailto:c.caug...@gmail.com wrote:


Following those instructions exactly I get an error message of
The specified diff file is empty, which is not surprising since
file2.txt was never added to the repository.

If I do hg add file2.txt before the first qnew on the other
hand, hg postreview works fine and correctly shows Line2 being
added to file2.txt.

If it is still breaking for you even with the hg add, can you let
me know what versions of mercurial, ReviewBoard and the
reviewboard extension you're using?

If you're using the latest versions and it still doesn't work,
please send me the output of

hg postreview --debug --apitrace

--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google 
Groups reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to reviewboard+unsubscr...@googlegroups.com 
mailto:reviewboard+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups reviewboard group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board 2.x and hg postreview

2014-06-03 Thread Colin Caughie
I and my team are still using hg postreview daily, including after 
upgrading to RB 2.0.1, and I'm still maintaining it as and when I have 
time (although I admit I've fallen behind on some of the requests in the 
issues list).


I haven't worked much with RBTools; I'm sure it works fine but what we 
like about postreview is that it follows the same syntax and logic as 
other Mercurial commands, which means you don't have to learn a new 
tool. It also integrates with TortoiseHg, which is handy for those who 
prefer a GUI.


As I mentioned in the bug report, and as Sara noted, the problem you're 
experiencing does not seem to be specific to hg postreview and does not 
seem to have changed since the upgrade to 2.x. It is something I'd like 
to get to the bottom of though so if you have any further information, 
e.g. what's going on in the particular diffs and parent diffs that cause 
this issue, I'd be glad to take a look at it.


Colin

On 06/02/2014 11:21 AM, Bruce Cran wrote:
I'm investigating upgrading our installation to Review Board 2.x and 
one issue I've come across is that with the existing code, hg 
postreview doesn't work correctly. I've submitted a ticket to 
https://bitbucket.org/ccaughie/hgreviewboard, but I was wondering - 
are people still planning to use the hg postreview extension, or are 
you all switching to the rbt client?


--
Bruce
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google 
Groups reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to reviewboard+unsubscr...@googlegroups.com 
mailto:reviewboard+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups reviewboard group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 1.7.9 regression with hg parent diffs

2013-06-10 Thread Colin Caughie
This is issue 2791 - 
https://code.google.com/p/reviewboard/issues/detail?id=2971. I have a 
fix pending (http://reviews.reviewboard.org/r/4121/) but I haven't yet 
had time to address Christian's feedback on the patch. It's unlikely 
I'll be able to spend any time on this this until about 2 weeks from 
now, but you could try downloading the existing patch and manually 
applying it to your local install as a temporary measure (be sure to 
back up your install before doing so!).


Colin

On 6/10/2013 3:36 AM, Bruce Cran wrote:

I've tried restarting memcached, but it didn't help.  reviewboard.log
just shows that it's getting a 404 from Hg web server when trying to
fetch the parent revision - which makes sense since it hasn't been
committed - e.g. the patches are:

parent:
diff -r 1 -r 2 file1.txt
--- a/file1.txtFri Jun 07 12:15:29 2013 -0600
+++ b/file1.txtFri Jun 07 21:02:26 2013 +0100
[diff contents]

review_diff:
diff -r 2 -r 3 file2.txt
--- a/file2.txtFri Jun 07 12:15:29 2013 -0600
+++ b/file2.txtFri Jun 07 21:02:26 2013 +0100
[diff contents]

Only r1 exists in the repository.

I've just replicated the problem on the demo server - see
http://demo.reviewboard.org/r/12105/diff/#index_header .
Since people only started complaining about this a few hours after I
upgraded to 1.7.9 I'm /assuming/ it's new.

--
Bruce

On 10 June 2013 10:56, Christian Hammond chip...@chipx86.com wrote:

Hi Bruce,

There's only two change to Mercurial since 1.7.6.

One has to do with fixes to the Mercurial version checking. That fix,
though, has to do with handling the different ways of checking the Mercurial
version and working around a breakage we had in some setups, and I wouldn't
expect it to have an impact on file existence checking in any way.

The other validates the repository during repo creation, and catches errors
accessing the repository during file fetching. It would show you a different
error than what you're getting, though.

Can you repeat the problem and look in reviewboard.log to see if there's any
interesting error messages?

One other thing, just to try it. Can you clear your memcached and try again?

Christian

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


On Mon, Jun 10, 2013 at 2:03 AM, Bruce Cran bruce.c...@gmail.com wrote:

Hi Christian,

I upgraded from 1.7.6, and this breaks both when using RBTools and
when uploading patches via the Web interface. I've not upgraded
RBTools, but someone else tried using the newer version and found it
was still broken.

--
Bruce Cran



On 10 June 2013 09:19, Christian Hammond chip...@chipx86.com wrote:

Hi Bruce,

Can you tell me what version of Review Board you were using before?
Also,
did you upgrade RBTools before this broke?

I don't see any changes to our Mercurial support in the past two
releases of
Review Board, aside from one to do verification when adding a new
repository.

It's possible some code changed in RBTool 0.5.1 that broke this, though,
if
you're running that. A quick way to check would be to downgrade RBTools
to
0.5.0 and try again.

Christian

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


On Fri, Jun 7, 2013 at 1:11 PM, Bruce Cran bruce.c...@gmail.com wrote:

There seems to be a regression in 1.7.9 with mercurial parent diffs: if
a
file is modified in the review diff that wasn't changed in the parent
diff,
then Review Board generates the error Error: The file 'file2.txt'
(r12345678) could not be found in the repository.

--
Bruce Cran

--
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
---
You received this message because you are subscribed to the Google
Groups
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
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
---
You received this message because you are subscribed to the Google
Groups
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
--
Bruce 

AD authentication not available after upgrade to 1.7.2

2013-01-20 Thread Colin Caughie
I just upgraded a site from RB 1.6.3 to 1.7.2. The site was using Active 
Directory authentication, but after the upgrade this no longer works. 
Moreover, in the Authentication Settings admin page, the Authentication 
Method dropdown has only two options: Standard Registration and 
Legacy Authentication Module. According to the docs there should be 
other options including Active Directory, but these seem to be missing.


Anyone have any ideas how I can re-enable this?

--
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: AD authentication not available after upgrade to 1.7.2

2013-01-20 Thread Colin Caughie
Thanks for your quick response. I figured it out (kind of) - the log 
files were reporting an incorrect version of Pygments:


raise VersionConflict(dist,req) # XXX put more info here
VersionConflict: (Pygments 1.4 
(/usr/local/lib/python2.6/dist-packages/Pygments-1.4-py2.6.egg), 
Requirement.parse('Pygments=1.5'))


I upgraded Pygments using easy_install to the latest version and all is 
well now. What's strange though is that I already had the correct 
version of Pygments in the virtualenv in which RB was running, so I'm 
not sure why I had to upgrade it in the global Python install as well.


On 01/20/2013 11:09 AM, Christian Hammond wrote:

Hi Colin,

Sounds like an installation issue. Can you tell me how you performed the 
upgrade? RPMs, easy_install, pip?

Christian


On Jan 20, 2013, at 10:46, Colin Caughie c.caug...@gmail.com wrote:


I just upgraded a site from RB 1.6.3 to 1.7.2. The site was using Active Directory authentication, 
but after the upgrade this no longer works. Moreover, in the Authentication Settings admin page, 
the Authentication Method dropdown has only two options: Standard Registration and 
Legacy Authentication Module. According to the docs there should be other options 
including Active Directory, but these seem to be missing.

Anyone have any ideas how I can re-enable this?

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




Re: Question about using ReviewBoard with Mercurial

2011-11-17 Thread Colin Caughie

On 15/11/2011 16:50, mike wrote:

The repository path /home/mwillis/work/dev is not in the
list of known repositories on the server.

After looking around in the post-review docs, I found the --parent
parameter, which seems to be what I'm looking for.  It warns This
only works with Git right now, but I was hoping that maybe the docs
were just outdated.  Alas, it gives me the same error:
That doesn't sound like an issue with the --parent option, it sounds 
like a configuration issue that is preventing either post-review or 
ReviewBoard itself from finding the repository.



mwillis@mwillis:~/work/dev-15600$ post-review --parent
$NAME_OF_OUR_CENTRAL_REPO
...
The repository path /home/mwillis/work/dev is not in the
list of known repositories on the server.

Now I'm assuming that the problem is just that --parent doesn't
support mercurial.  Is that correct?  If so, I'm possibly willing to
submit a patch to get it working.


To use ReviewBoard with your Mercurial workflow you will probably need 
to use parent diffs (assuming you want to have changes reviewed before 
pushing to your central repository). I can't comment on post-review's 
support for this as I've never used it, but you may want to try the 
ReviewBoard extension for Mercurial, which does support parent diffs and 
largely automates the process of submitting them.


See http://mercurial.selenic.com/wiki/ReviewboardExtension

--
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: Still having 1.5 api authentication issues.

2010-11-17 Thread Colin Caughie

On 16/11/2010 18:56, Jeff wrote:

(This is a follow up to this thread:
http://groups.google.com/group/reviewboard/browse_thread/thread/83744baa3a99da0e/cc641214ed414a85?lnk=gstq=authentication#cc641214ed414a85,
but I've made a lot of changes).

I have a fresh reviewboard 1.5 install.   I cannot get authentication
to the web api working at all.   I have a superuser account setup.
(I get the same results with the admin account).  I've tried a perl
script, but I've fallen back to the web browser and wget. I'm trying:


This sounds like exactly the same issue I was seeing (see
http://groups.google.com/group/reviewboard/browse_thread/thread/1f8ce0c87588c428).
Unfortunately I never got to the bottom of it; it happened on my test
install but not on our production install so I stopped looking at it.

Colin

Latest News at: http://www.indigovision.com/news2010.php

--
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: Can't authenticate using API 2.0

2010-11-06 Thread Colin Caughie
Hi Jan,

1) I couldn't tell you, it wasn't me who set up the server. I'll try to find 
out from my colleague who did.

2) When I log in using the login page using my AD password I see the following 
line repeated many times:

2010-11-06 09:50:10,143 - DEBUG - Search root dc=indigovision,dc=com

When I login using my SHA1 password, or type the wrong password, I see the 
following once:

2010-11-06 09:42:23,967 - WARNING - Active Directory: Failed login for user cfc

When I try to access the API URLs I don't see anything at all. Do I maybe need 
to increase the logging level?

Thanks,
Colin

 -Original Message-
 From: reviewboard@googlegroups.com
 [mailto:reviewbo...@googlegroups.com] On Behalf Of Jan Koprowski
 Sent: 06 November 2010 06:29
 To: reviewboard@googlegroups.com
 Subject: Re: Can't authenticate using API 2.0
 
 Hi,
 
   Few questions.
   1) While rb-site install there is user created. Is authentication
 login works fine for this user?
   2) When You login as AD user: what do You see in logs when You
 login
 using login page, and what if You use API?
 
 On Sat, Nov 6, 2010 at 3:38 AM, Christian Hammond
 chip...@chipx86.com wrote:
  Hi Colin,
 
  Sorry for my subsequent less-than-speedy reply. Long day.
 
  I don't know that AD would be the cause, but it's worth
 considering.
 
  I would like to see the Wireshark trace, just to see if I can
 simulate the
  same problem. Feel free to just e-mail me that directly.
 
  Thanks!
 
  Christian
 
  --
  Christian Hammond - chip...@chipx86.com
  Review Board - http://www.reviewboard.org
  VMware, Inc. - http://www.vmware.com
 
 
  On Fri, Nov 5, 2010 at 2:37 AM, Colin Caughie
 c.caug...@indigovision.com
  wrote:
 
  Hi Christian,
 
 
 
  Thanks for the speedy reply. I've tried with the FQDN and IP
 address as
  well as the plain hostname and I get the same result. The
 wireshark trace
  shows that it's using Basic Authentication as described in the
 API docs. (I
  can send you the wireshark trace if you think it would help).
 
 
 
  The server is running Apache 2.2.16 on Fedora 14. We imported all
 of the
  configuration and data from our 1.0.9 installation in order to
 test the new
  version.
 
 
 
  It uses Active Directory as the authentication back-end. Could
 that be
  part of the problem? I changing my account to use a sha1 password
 instead
  but it made no difference.
 
 
 
  Colin
 
 
 
  From: reviewboard@googlegroups.com
 [mailto:reviewbo...@googlegroups.com]
  On Behalf Of Christian Hammond
  Sent: 05 November 2010 08:09
  To: reviewboard@googlegroups.com
  Subject: Re: Can't authenticate using API 2.0
 
 
 
  Hi Colin,
 
  I just tried to repro it here, and it works fine. We'll have to
 do some
  investigation...
 
  When you try this, is it with a fully-qualified domain, or just
 something
  more like ourserver? If the latter, see what happens when you
 try a FQDN
  or an IP address.
 
  What type of authentication is being used on there? And what web
 server?
 
  If the above doesn't work, it would help to set up a development
 install
  and to try it there in order to rule out the possibility of it
 being the web
  server.
 
  Christian
 
  --
  Christian Hammond - chip...@chipx86.com
  Review Board - http://www.reviewboard.org
  VMware, Inc. - http://www.vmware.com
 
  On Fri, Nov 5, 2010 at 12:29 AM, Colin Caughie
  c.caug...@indigovision.com wrote:
 
  Hi,
 
  I'm playing with the new ReviewBoard API with a test installation
 of RB
  1.5, and can't seem to get basic authentication to work. I'm
 testing it just
  by typing http://ourserver/api/info/; into Firefox, entering my
 username
  and password when it asks, but I keep getting 401 UNAUTHORIZED
 responses.
 
  I've taken a Wireshark trace and it looks like the client is
 doing the
  right thing. Moreover I can log in fine using the normal login
 page, which
  seems to use a different mechanism. (After logging in from the
 login page I
  can access the API resources because it uses the cookie
 thereafter.)
 
  Is there anything I need to do to get this to work?
 
  Thanks,
  Colin
 
 
  Latest News at: http://www.indigovision.com/news2010.php
 
  --
  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

RE: Can't authenticate using API 2.0

2010-11-06 Thread Colin Caughie
1) While rb-site install there is user created. Is authentication
  login works fine for this user?

 1) I couldn't tell you, it wasn't me who set up the server. I'll try
 to find out from my colleague who did.

I got this information and tried again with the username and password that were 
set up during installation. Authentication failed in the same way as before.

Colin


Latest News at: http://www.indigovision.com/news2010.php

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


Can't authenticate using API 2.0

2010-11-05 Thread Colin Caughie
Hi,

I'm playing with the new ReviewBoard API with a test installation of RB 1.5, 
and can't seem to get basic authentication to work. I'm testing it just by 
typing http://ourserver/api/info/; into Firefox, entering my username and 
password when it asks, but I keep getting 401 UNAUTHORIZED responses.

I've taken a Wireshark trace and it looks like the client is doing the right 
thing. Moreover I can log in fine using the normal login page, which seems to 
use a different mechanism. (After logging in from the login page I can access 
the API resources because it uses the cookie thereafter.)

Is there anything I need to do to get this to work?

Thanks,
Colin


Latest News at: http://www.indigovision.com/news2010.php

-- 
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: Can't authenticate using API 2.0

2010-11-05 Thread Colin Caughie
Hi Christian,

Thanks for the speedy reply. I've tried with the FQDN and IP address as well as 
the plain hostname and I get the same result. The wireshark trace shows that 
it's using Basic Authentication as described in the API docs. (I can send you 
the wireshark trace if you think it would help).

The server is running Apache 2.2.16 on Fedora 14. We imported all of the 
configuration and data from our 1.0.9 installation in order to test the new 
version.

It uses Active Directory as the authentication back-end. Could that be part of 
the problem? I changing my account to use a sha1 password instead but it made 
no difference.

Colin

From: reviewboard@googlegroups.com [mailto:reviewbo...@googlegroups.com] On 
Behalf Of Christian Hammond
Sent: 05 November 2010 08:09
To: reviewboard@googlegroups.com
Subject: Re: Can't authenticate using API 2.0

Hi Colin,

I just tried to repro it here, and it works fine. We'll have to do some 
investigation...

When you try this, is it with a fully-qualified domain, or just something more 
like ourserver? If the latter, see what happens when you try a FQDN or an IP 
address.

What type of authentication is being used on there? And what web server?

If the above doesn't work, it would help to set up a development install and to 
try it there in order to rule out the possibility of it being the web server.

Christian

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

On Fri, Nov 5, 2010 at 12:29 AM, Colin Caughie 
c.caug...@indigovision.commailto:c.caug...@indigovision.com wrote:
Hi,

I'm playing with the new ReviewBoard API with a test installation of RB 1.5, 
and can't seem to get basic authentication to work. I'm testing it just by 
typing http://ourserver/api/info/; into Firefox, entering my username and 
password when it asks, but I keep getting 401 UNAUTHORIZED responses.

I've taken a Wireshark trace and it looks like the client is doing the right 
thing. Moreover I can log in fine using the normal login page, which seems to 
use a different mechanism. (After logging in from the login page I can access 
the API resources because it uses the cookie thereafter.)

Is there anything I need to do to get this to work?

Thanks,
Colin


Latest News at: http://www.indigovision.com/news2010.php

--
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.commailto:reviewboard%2bunsubscr...@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


scanned for viruses and spam by indigovision
If you consider this email spam, please forward to s...@emailfiltering.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