It's failing here in git.py in scmtools folder.


class GitClient:
    def __init__(self, path):
        if not is_exe_in_path('git'):
            # This is technically not the right kind of error, but
it's the
            # pattern we use with all the other tools.
            raise ImportError

        self.path = path
        p = subprocess.Popen(
            ['git', '--git-dir=%s' % self.path, 'config',
                 'core.repositoryformatversion'],
            stderr=subprocess.PIPE,
            stdout=subprocess.PIPE,
            close_fds=(os.name != 'nt')
        )
        contents = p.stdout.read()
        errmsg = p.stderr.read()
        failure = p.wait()

        if failure:
            raise ImportError


On Feb 4, 1:31 pm, Kunjal <kunjal.par...@gmail.com> wrote:
> When I look at the error.log for Apache server, It give me this:
> Am I not Importing some modules?
>
> Traceback (most recent call last):
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/Django-1.1.1-py2.5.egg/django/core/handlers/base.py", line
> 92, in get_response
>     response = callback(request, *callback_args, **callback_kwargs)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/Django-1.1.1-py2.5.egg/django/views/decorators/cache.py",
> line 44, in _wrapped_view_func
>     response = view_func(request, *args, **kwargs)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/Djblets-0.5.5-py2.5.egg/djblets/webapi/decorators.py", line
> 59, in _checklogin
>     response = view_func(request, *args, **kwargs)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/Django-1.1.1-py2.5.egg/django/views/decorators/http.py", line
> 37, in inner
>     return func(request, *args, **kwargs)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/webapi/json.py",
> line 1178, in new_diff
>     form = UploadDiffForm(review_request.repository, form_data,
> request.FILES)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/
> forms.py", line 44, in __init__
>     if self.repository.get_scmtool().get_diffs_use_absolute_paths():
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/scmtools/
> models.py", line 43, in get_scmtool
>     return cls(self)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/scmtools/git.py",
> line 23, in __init__
>     self.client = GitClient(repository.path)
>   File "/projects/mob_tools/xampp/1.6.4-brcm-v2/lib/python2.5/site-
> packages/ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/scmtools/git.py",
> line 180, in __init__
>     raise ImportError
> ImportError
> ERROR:root:Exception thrown for user kaparikh 
> athttp://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/34/diff/new/
>
> On Feb 3, 1:28 pm, Kunjal <kunjal.par...@gmail.com> wrote:
>
>
>
> > One more thing..
> > How to fix the issue of post-review can not find the branches
> > correctly?
> > As I mentioned you earlier, i have find/replace master branch to donut
> > in postreview.py  to get to this point.
> > If I don't do that I get different set of errors.
>
> > Thanks for your help.
> > Kunjal
>
> > On Feb 2, 3:56 pm, Christian Hammond <chip...@chipx86.com> wrote:
>
> > > Hmm okay, well at least it's talking to the server now. If you check your
> > > server log file, you should be able to see some exception information that
> > > says what's generated that 500 error. If not, then temporarily setting 
> > > DEBUG
> > > = True in your site's conf/settings_local.py will display that exception
> > > information in place of the 500 error. Either way, that should help to
> > > figure out where it's failing and hopefully what's going wrong.
>
> > > One thing that could be causing it, though, is your Review Board 
> > > repository
> > > entry for your Git repository. Do you have it just referencing your remote
> > > git:// URL, or is Path actually pointing to a local Git checkout? There's 
> > > no
> > > concept of grabbing individual files from a remote Git repository, so you
> > > need either a local clone accessible by Review Board, or if you're using 
> > > the
> > > 1.1/1.5 alphas/nightlies you can specify a special URL for checking out a
> > > raw file from a Git web front-end such as cgit or gitweb.
>
> > > Unless the Git guys someday extend the protocol to fetch an individual 
> > > file
> > > by revision from an upstream repository without a local checkout, this is
> > > the best we can do.
>
> > > Christian
>
> > > --
> > > Christian Hammond - chip...@chipx86.com
> > > Review Board -http://www.reviewboard.org
> > > VMware, Inc. -http://www.vmware.com
>
> > > On Tue, Feb 2, 2010 at 3:20 PM, Kunjal <kunjal.par...@gmail.com> wrote:
> > > >  If i try with REVIEWBOARD_URL = 'None' (Below is the debug output)
> > > > It looks like the URL is correct now. But I am still getting error.
> > > > mob-rb-test{kaparikh}22: postreview.py -d
> > > > >>> svn info
> > > > >>> git rev-parse --git-dir
> > > > >>> git svn info
> > > > >>> git svn --version
> > > > >>> git config --get svn-remote.svn.url
> > > > >>> git remote show origin
> > > > >>> repository info: Path: git://
> > > > mobcom-git.sj.broadcom.com/git_repos/repo_mydroid/vendor.git, Base 
> > > > path: ,
> > > > Supports changesets: False
> > > > >>> git config --get reviewboard.url
> > > > >>> git diff --no-color --full-index donut
> > > > >>> Looking for 'mob-rb-test.sj.broadcom.com /' cookie in
> > > > /home/kaparikh/.post-review-cookies.txt
> > > > >>> Loaded valid cookie -- no login required
> > > > >>> Attempting to create review request for None
> > > > _make_url: path = api/json/reviewrequests/new/
> > > > _make_url:app = /
> > > > _make_url: joined URL =
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/new/
> > > > _make_url: Resulting URL =
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/new/
> > > > >>> HTTP POSTing to
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/new/:
> > > > {'repository_path': 'git://
> > > > mobcom-git.sj.broadcom.com/git_repos/repo_mydroid/vendor.git'}
> > > > >>> Review request created
> > > > >>> Uploading diff, size: 867
> > > > _make_url: path = api/json/reviewrequests/30/diff/new/
> > > > _make_url:app = /
> > > > _make_url: joined URL =
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/30/diff/new/
> > > > _make_url: Resulting URL =
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/30/diff/new/
> > > > >>> HTTP POSTing to
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/30/diff/new/:
> > > > {}
> > > > >>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > > >  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> > > > <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> > > >  <head>
> > > >  <title>500 - Internal Server Error | Review Board</title>
> > > >  </head>
> > > >  <body>
> > > >  <h1>Something broke! (Error 500)</h1>
> > > >  <p>
> > > >   It appears something broke when you tried to go to here. This is
> > > > either
> > > >   a bug in Review Board or a server configuration error. Please
> > > > report
> > > >   this to your administrator.
> > > >  </p>
> > > >  </body>
> > > > </title>
>
> > > > Unable to access
> > > >http://mob-rb-test.sj.broadcom.com/api/json/reviewrequests/30/diff/new/.
> > > > The host path may be invalid
> > > > HTTP Error 500: Internal Server Error
>
> > > > ###########################################################################­­­#############
>
> > > > Also, I get up to above error by replacing master branch to donut in
> > > > the post-review.py script.
> > > > If I do not change this, I get different error which is like:
>
> > > > [[
>
> > > > mob-rb-test{kaparikh}30: postreview.py -d
> > > > >>> svn info
> > > > >>> git rev-parse --git-dir
> > > > >>> git svn info
> > > > >>> git svn --version
> > > > >>> git config --get svn-remote.svn.url
> > > > >>> git remote show origin
> > > > >>> repository info: Path: git://
> > > > mobcom-git.sj.broadcom.com/git_repos/repo_mydroid/vendor.git, Base 
> > > > path: ,
> > > > Supports changesets: False
> > > > >>> git config --get reviewboard.url
> > > > >>> git diff --no-color --full-index master
> > > > Failed to execute command: ['git', 'diff', '--no-color', '--full-
> > > > index', 'master']
> > > > fatal: ambiguous argument 'master': unknown revision or path not in
> > > > the working tree.
> > > > Use '--' to separate paths from revisions
>
> > > >  ]]
>
> > > > On Jan 28, 3:05 pm, Christian Hammond <chip...@chipx86.com> wrote:
> > > > > 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 =
>
> ...
>
> read more »- 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

Reply via email to