You shouldn't need to set REVIEWBOARD_URL in postreview.py. It's pretty much
intended for when there's no alternate way to configure the URL and a
company wants to set a single URL company-wide. However, a much better
option is either the per-repository configuration (such as using git config)
or the .reviewboardrc file. If you set REVIEWBOARD_URL, it will override the
other configuration types.

I will point out that in the future, postreview.py will require other code
in RBTools, so copying out postreview.py won't work. Probably after the 0.2
release.

At this point, I'd say we should add some debugging information to
postreview.py. Search for the _make_url function, and change it to:

    print "_make_url: path = %s" % path
    app = urlparse(self.url)[2]

    print "_make_url: app = %s" % app
    if path[0] == '/':
        url = urljoin(self.url, app[:-1] + path)
    else:
        url = urljoin(self.url, app + path)
    print "_make_url: joined URL = %s" % url

    if not url.startswith('http'):
        url = 'http://%s' % url

    print "_make_url: Resulting URL = %s" % url
    return url

That'll hopefully help us see where it's going wrong.

Christian

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


On Thu, Jan 28, 2010 at 9:49 AM, Kunjal <kunjal.par...@gmail.com> wrote:

> Here is what I did.
>
> 1. I did download RB Tools nightly ( RBTools-0.2beta3.dev-20100125 )
> in to my windows machine.
> 2. I modify REVIEWBOARD_URL in post-review.py. That is the all change
> I did.
> 3. I copy post.review.py to linux box. ( I am not sure whether
> complete RB Tools needs install or only copy of post-review.py from RB
> Tools is necessary)
> 4. I clone the git repository.
> 5. I configure new repo. in RB Web Admin. (Repository Path =
> git://mobcom-git.sj.broadcom.com/git_repos/repo_mydroid/vendor.git/)
> 6. I perform command git config reviewboard.url
> http://mob-rb-test.sj.broadcom.com
> in the git repository.
> 7. post-review.py --parent=donut (vendor.git does have donut branch) --
> > This does not work. It gives host path may be invalid error. Also
> the post-review script is looking at by default to master branch only
> and complains that it can not perform git diff.
> 8  I also try post-review.py --server=http://mob-rb-
> test.sj.broadcom.com and the same thing.
>
> What wrong I am doing here?
>
> Kunjal
>
>
> On Jan 27, 2:19 pm, Christian Hammond <chip...@chipx86.com> wrote:
> > I've tried to reproduce this in my version of post-review and I can't.
> Are
> > you running a fully upstream version of RBTools now, or is it at all
> custom?
> >
> > Also, what version of Python are you running?
> >
> > Christian
> >
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
> >
> >
> >
> > On Wed, Jan 27, 2010 at 2:12 PM, Kunjal <kunjal.par...@gmail.com> wrote:
> > > Any pointers?
> >
> > > On Jan 26, 9:55 am, Kunjal <kunjal.par...@gmail.com> wrote:
> > > > Here is my config looks like:
> >
> > > > [core]
> > > >         repositoryformatversion = 0
> > > >         filemode = true
> > > >         bare = false
> > > >         logallrefupdates = true
> > > > [remote "origin"]
> > > >         url = git://
> > > mobcom-git.sj.broadcom.com/git_repos/repo_mydroid/vendor.git
> > > >         fetch = +refs/heads/*:refs/remotes/origin/*
> > > > [branch "donut"]
> > > >         remote = origin
> > > >         merge = refs/heads/donut
> > > > [reviewboard]
> > > >         url =http://mob-rb-test.sj.broadcom.com
> >
> > > > I also try alternative config as:
> >
> > > > [core]
> > > >         repositoryformatversion = 0
> > > >         filemode = true
> > > >         bare = false
> > > >         logallrefupdates = true
> > > > [remote "origin"]
> > > >         url = git://
> > > mobcom-git.sj.broadcom.com/git_repos/repo_mydroid/vendor.git
> > > >         fetch = +refs/heads/*:refs/remotes/origin/*
> > > > [branch "donut"]
> > > >         remote = origin
> > > >         merge = refs/heads/donut
> >
> > > > But same result.
> >
> > > > On Jan 25, 5:27 pm, Christian Hammond <chip...@chipx86.com> wrote:
> >
> > > > > Hmm, that doesn't look good. What does the Git config look like?
> >
> > > > > Christian
> >
> > > > > --
> > > > > Christian Hammond - chip...@chipx86.com
> > > > > Review Board -http://www.reviewboard.org
> > > > > VMware, Inc. -http://www.vmware.com
> >
> > > > > On Mon, Jan 25, 2010 at 11:07 AM, Kunjal <kunjal.par...@gmail.com>
> > > wrote:
> > > > > > Hello,
> >
> > > > > > When I post-review for GIT, I am getting below error.
> >
> > > > > > somehow the host path is listing ReviewBoard URL two times as you
> can
> > > > > > see below.
> > > > > > How to fix this?
> >
> > > > > > Unable to access
> >
> > >http://mob-rb-test.sj.broadcom.com/mob-rb-test.sj.broadcom.com/api/js.
> ..
> > > > > > .
> > > > > > The host path may be invalid
> > > > > > HTTP Error 404: Not Found
> >
> > > > > > --
> > > > > > 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.com<reviewboard%2bunsubscr...@googlegroups.com>
> <reviewboard%2bunsubscr...@googlegr­oups.com>
> > > <reviewboard%2bunsubscr...@googlegr­­oups.com>
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/reviewboard?hl=en-Hidequoted 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 athttp://www.reviewboard.org/users/
> > > -~----------~----~----~----~------~----~------~--~---
> > > To unsubscribe from this group, send email to
> > > reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> <reviewboard%2bunsubscr...@googlegr­oups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/reviewboard?hl=en- 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<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

Reply via email to