4442: rbt not working with mercurial

rdo

What version are you running?

RBTools 0.7.6

What steps will reproduce the problem?

  1. go to a mercurial repository
  2. type rbt post

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

a successfull review post

What operating system are you using?

Windows 7

Attach the debug out from the command.

>>> RBTools 0.7.6
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-7-6.1.7601-SP1
>>> Home = C:\Users\rpaskalev\AppData\Roaming
>>> Current directory = c:\rdo\work\v9\v9_be
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any of the parent directories): .git
---
>>> Checking for a Mercurial repository...
>>> Running: hg root
>>> Running: hg showconfig
>>> Running: hg svn info
>>> Command exited with rc 255: [u'hg', u'svn', u'info']
Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 204, in _runcatch
  File "mercurial\dispatch.pyo", line 779, in _dispatch
  File "mercurial\dispatch.pyo", line 528, in _parse
  File "mercurial\cmdutil.pyo", line 342, in findcmd
UnknownCommand: ('svn', ['qheader', 'debugsuccessorssets', 'help', 'tip', 'qgoto', 'config', 'showconfig', 'debugconfig', 'debugdate', 'debuglocks', 'debugdata', 'addremove', 'parents', 'qtop', 'qdiff', 'rollback', 'debugmergestate', 'qseries', 'debugrevspec', 'debugwalk', 'debuginstall', 'qdelete', 'qremove', 'qrm', 'forget', 'resolve', 'commit', 'ci', 'incoming', 'in', 'debugdag', 'bisect', 'rebase', 'revert', 'manifest', 'outgoing', 'out', 'qinit', 'debugnamecomplete', 'qapplied', 'qfinish', 'debugfileset', 'debuggetbundle', 'remove', 'rm', 'debugpushkey', 'qprev', 'version', 'debugrebuilddirstate', 'debugrebuildstate', 'debugancestor', 'status', 'st', 'locate', 'tags', 'qunapplied', 'qnew', 'debugpathcomplete', 'pull', 'debugcheckstate', 'bundle', 'qselect', 'update', 'up', 'checkout', 'co', 'diff', 'export', 'qqueue', 'qpop', 'debugdeltachain', 'backout', 'qimport', 'rename', 'move', 'mv', 'init', 'qguard', 'strip', 'debugapplystreamclonebundle', 'identify', 'id', 'qclone', 'heads', 'debugsetparents', 'debugignore', 'debugobsolete', 'debugrename', 'files', 'import', 'patch', 'debugrebuildfncache', 'debugdiscovery', 'debugwireargs', 'qfold', 'unbundle', 'qnext', 'log', 'history', 'debugcomplete', 'clone', 'grep', 'cat', 'debugrevlog', 'qrename', 'qmv', 'debugcommands', 'root', 'debugsub', 'debuglabelcomplete', 'summary', 'sum', 'annotate', 'blame', 'qrestore', 'postreview', 'tag', 'debugtemplate', 'recover', 'archive', 'graft', 'paths', 'push', 'verify', 'debugextensions', 'debugfsinfo', 'branch', 'copy', 'cp', 'qrefresh', 'qcommit', 'qci', 'serve', 'debugpvec', 'debugcreatestreamclonebundle', 'bookmarks', 'bookmark', 'debugbuilddag', 'debugindex', 'phase', 'add', 'branches', 'qpush', 'merge', 'debugindexdot', 'debugdirstate', 'debugstate', 'debugknown', 'qsave', 'debugbundle'])
hg: unknown command 'svn'
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge another revision into working directory
 pull          pull changes from the specified source
 push          push changes to the specified destination
 qdiff         diff of the current patch and subsequent modifications
 qnew          create a new patch
 qpop          pop the current patch off the stack
 qpush         push the next patch onto the stack
 qrefresh      update the current patch
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

(use "hg help" for the full list of commands or "hg -v" for details)
---
>>> Checking for a CVS repository...
>>> Checking for a Perforce repository...
>>> Unable to execute "p4 help": skipping Perforce
>>> Checking for a Plastic repository...
>>> Unable to execute "cm version": skipping Plastic
>>> Checking for a ClearCase repository...
>>> Unable to execute "cleartool help": skipping ClearCase
>>> Checking for a Bazaar repository...
>>> Unable to execute "bzr help": skipping Bazaar
>>> Checking for a Team Foundation Server repository...
>>> Unable to execute "tf help": skipping TFS
ERROR: The current directory does not contain a checkout from a supported source code repository.

Please provide any additional information below.

It looks to me the rbt is not correctly invoking the mercurial client.

#1 rdo

Here is the same problem reported by another user:
https://groups.google.com/forum/#!topic/reviewboard/lFaBi7PngHk

brennie
#2 brennie

That thread is specifically about older versions of Mercurial lacking the -T option. Can you verify that the Mercurial repository actually exists in the directory you are running rbt post from? If it found a Mercurial repository, it shouldn't end up looking for CVS, Perforce, Plastic, Clearcase, Bazaar, or TFS repositories.

hg root should report whether or not the directory is in a Mercurial repository.

brennie
#3 brennie
  • -New
    +NeedInfo
#4 rdo

Yes, the directory is the repository root.

For info the mercurial is comming from a TortoiseHG version 3.8.4, with Mercurial-3.8.4, Python-2.7.9, PyQt-4.11.3, Qt-4.8.6

I'm also attaching the output of hg showconfig

  • +
    annotate.ignorews=True
    annotate.ignorewsamount=True
    annotate.ignoreblanklines=True
    bundle.mainreporoot=c:\rdo\work\v9\v9_be
    convert.cvsps=cvsps -A -Z 9
    diff.showfunc=True
    diff.ignorews=False
    diff.ignorewsamount=False
    diff.ignoreblanklines=False
    diff.git=True
    diff-patterns.**.doc=docdiff
    diff-patterns.**.rtf=docdiff
    diff-patterns.**.docx=docdiff
    diff-patterns.**.docm=docdiff
    diff-patterns.**.ppt=docdiff
    diff-patterns.**.pptx=docdiff
    diff-patterns.**.pptm=docdiff
    diff-patterns.**.xls=docdiff
    diff-patterns.**.xlsx=docdiff
    diff-patterns.**.xlsm=docdiff
    diff-patterns.**.xlsb=docdiff
    diff-patterns.**.xlam=docdiff
    diff-patterns.**.ods=docdiff
    diff-patterns.**.odt=docdiff
    diff-patterns.**.sxw=docdiff
    diff-patterns.**.nb=docdiff
    editor-patterns.**.py=pyscripter
    editor-patterns.**.v=sigasi
    editor-patterns.**.vhd=sigasi
    editor-tools.notepad++.priority=-1
    editor-tools.notepad++.regkey=Software\Classes\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\Settings
    editor-tools.notepad++.regkeyalt=Software\C
#5 rdo

Could you tell me if you need more info, or something else, as we are blocked with integrating the ReviewBoard into the company, bacause of this issue.

david
#6 david
  • -NeedInfo
    +Fixed