Problem using rbt 0.7.4 with Cygwin (Windows 8): rbt is trying to use Windows paths

301 views
Skip to first unread message

hbCyber

unread,
Oct 23, 2015, 3:52:42 AM10/23/15
to reviewboard
Using Cygwin under Windows 8, I've been unable to setup my repository and post reviews using the command-line rbt tool.

Here are my details:
  • Windows 8 x64
  • Cygwin
  • Server is running ReviewBoard v2.0.20
  • Using RBTools 0.7.4
  • Repository is Git (using BitBucket as a service)
Whenever I attempt to run setup-repo or post under my Cygwin prompt, the command fails because the path is misconstrued.

Example:
$ rbt setup-repo
Enter the Review Board server URL: [My server's URL]
CRITICAL: [Error 3] The system cannot find the path specified: u'C:\\home\\[My username]\\[My Git repository folder]'

I don't know how I can tell rbt to look in /home/[My username]/[My Git repository folder] instead of C:\\ which doesn't work under Cygwin.

Any suggestions?


Christian Hammond

unread,
Oct 23, 2015, 4:23:41 AM10/23/15
to revie...@googlegroups.com
Hi,

Python on Windows is, in general, a mess. When used with Cygwin, it's even more so. Paths and process execution work differently, and so things like this may come up.

Can you show me the command output with the --debug argument passed to 'rbt setup-repo"?

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - https://www.reviewboard.org

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hbCyber

unread,
Oct 23, 2015, 4:32:38 AM10/23/15
to reviewboard, chri...@beanbaginc.com
Hi Christian,

Sorry to be causing trouble with my particular setup!

Here's the output you were asking for. For privacy reasons I have anonymized the paths with markers like {username}

$ rbt setup-repo --debug
>>> RBTools 0.7.4
>>> Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
>>> Running on Windows-7-6.1.7601-SP1
>>> Home = C:\Users\{username}\AppData\Roaming
>>> Current directory = C:\cygwin\home\{username}\{repository}
Enter the Review Board server URL: {server URL}
>>> Running: git version
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
Traceback (most recent call last):
  File "C:\Python27\Scripts\rbt-script.py", line 8, in <module>
    load_entry_point('RBTools==0.7.4', 'console_scripts', 'rbt')()
  File "C:\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "C:\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\__init__.py", line 612, in run_from_argv
    exit_code = self.main(*args) or 0
  File "C:\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\setup_repo.py", line 109, in main
    repository_info, tool = self.initialize_scm_tool()
  File "C:\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\__init__.py", line 641, in initialize_scm_tool
    client_name=client_name)
  File "C:\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\clients\__init__.py", line 408, in scan_usable_client
    repository_info = tool.get_repository_info()
  File "C:\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\clients\git.py", line 219, in get_repository_info
    os.chdir(os.path.abspath(git_top))
WindowsError: [Error 3] The system cannot find the path specified: u'C:\\home\\{username}\\{repository}'


Best regards,
Jean

Christian Hammond

unread,
Oct 23, 2015, 6:01:21 AM10/23/15
to revie...@googlegroups.com
Hi,

How was Python and Git installed? Were both from Cygwin?

We're trying to change to the directory reported by `git rev-parse --show-toplevel`, and it seems that path is in a different format from what that build of Python requires for paths.

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - https://www.reviewboard.org

hbCyber

unread,
Oct 23, 2015, 6:13:55 AM10/23/15
to reviewboard, chri...@beanbaginc.com
Hi,

Git was installed from Cygwin, but Python was installed from a Windows installer. The Python folder was then added to the PATH environment variable and Cygwin was restarted afterwards.

Perhaps that's the issue -- should I try to install Python from Cygwin?

Christian Hammond

unread,
Oct 23, 2015, 6:34:27 AM10/23/15
to revie...@googlegroups.com
Hi,

Yep, that's likely it. Git and Python should both either come from Cygwin, or should both come from dedicated installers.

You can also try installing the Windows installer for RBTools and see if that works any better. It comes with its own Python bundled in.


Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - https://www.reviewboard.org

hbCyber

unread,
Oct 23, 2015, 6:58:49 AM10/23/15
to reviewboard, chri...@beanbaginc.com
I installed Python, SetupTools and RBTools from Cygwin. Everything working fine! Thanks so much for your help! It's really appreciated!

Best regards,
Jean
Reply all
Reply to author
Forward
0 new messages