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

New issue 2739 by rshra...@gmail.com: Mercurial repositories are not shown in drop-down list
http://code.google.com/p/reviewboard/issues/detail?id=2739

* NOTE: Do not post confidential information in this bug report. *
*       If you need immediate support, please contact            *
*       reviewbo...@googlegroups.com                             *

What version are you running?

ReviewBoard - 1.6.11
Python - 2.7

What's the URL of the page containing the problem?

http://myserver.my.domain/r/new/

What steps will reproduce the problem?
1. Create a local mercurial repository
2. Try to create a new review request for the repository


What is the expected output? What do you see instead?

The new repository should be shown in the ┬źrepository┬╗ drop-down box.

What operating system are you using? What browser?

Server OS is Ubuntu 12.04. I guess the client OS and browser do not really matter.

*********************

I enabled logging and got this error:

2012-09-19 09:21:47,931 - ERROR - Error loading SCMTool for repository MyMercurialRepository (ID 5): invalid literal for int() with base 10: '119-23b247234454'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.11-py2.7.egg/reviewboard/reviews/forms.py", line 132, in __init__
    self.field_mapping[repo.id] = repo.get_scmtool().get_fields()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.11-py2.7.egg/reviewboard/scmtools/models.py", line 134, in get_scmtool
    return cls(self)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.11-py2.7.egg/reviewboard/scmtools/hg.py", line 28, in __init__
    self.client = HgClient(repository.path, repository.local_site)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.11-py2.7.egg/reviewboard/scmtools/hg.py", line 215, in __init__
    version = version.replace("+", ".")
ValueError: invalid literal for int() with base 10: '119-23b247234454'



The error occurs in this part of code:

class HgClient(object):
    def __init__(self, repoPath, local_site):
        from mercurial import hg, ui
        from mercurial.__version__ import version

        version = version.replace("+", ".")
        version_parts = [int(x) for x in version.split(".")]

the mercurial.__version__ is equals to 2.2.3+119-23b247234454, so the last part of the version causes exception.



--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to