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

New issue 3365 by shankark...@gmail.com: rbt patch fails when used against Perforce repository
http://code.google.com/p/reviewboard/issues/detail?id=3365

*** READ THIS BEFORE POSTING!
***
What version are you running?
rbt patch fails when used agaist perforce

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

What steps will reproduce the problem?
1. creater a code review request against perforce using rbt post <perforce changelist no here> and publish it.
Now on some other machine try to download the changes using rbt patch.

What is the expected output? What do you see instead?
Code sent for review gets downloaded and applied to perforce workspace.
Actual :-
I see this in review board webUI:-

Review Request #11 - Created May 7, 2014 and updated 1 week ago

So i assumed that review-request-id = 11

rbt patch -d 11

RBTools 0.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\shankarkc\AppData\Roaming
Current directory = d:\ariba\s2837\ariba
Checking for a Subversion repository...
Unable to execute "svn help": skipping SVN
Checking for a Git repository...
Unable to execute "git --help" or "git.cmd --help": skipping Git
Checking for a Mercurial repository...
Unable to execute "hg --help": skipping Mercurial
Checking for a CVS repository...
Unable to execute "cvs": skipping CVS
Checking for a Perforce repository...
Running: p4 info
Running: diff --version
repository info: Path: ['perforce3:1666', 'PERFORCE3:1666'], Base path: None
, Supports changesets: True
Making HTTP GET request to http://10.138.168.44/api/
Making HTTP GET request to http://10.138.168.44/api/review-requests/11/diffs

/1/
Patch is being applied from request 11 with diff revision  1.
Traceback (most recent call last):
  File "C:\Python27\Scripts\rbt-script.py", line 9, in <module>
    load_entry_point('RBTools==0.6.dev', 'console_scripts', 'rbt')()
File "C:\Python27\lib\site-packages\rbtools-0.6.dev-py2.7.egg\rbtools\commands
\main.py", line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
File "C:\Python27\lib\site-packages\rbtools-0.6.dev-py2.7.egg\rbtools\commands
\__init__.py", line 422, in run_from_argv
    exit_code = self.main(*args) or 0
File "C:\Python27\lib\site-packages\rbtools-0.6.dev-py2.7.egg\rbtools\commands
\patch.py", line 141, in main

    tmp_patch_file, base_dir)
File "C:\Python27\lib\site-packages\rbtools-0.6.dev-py2.7.egg\rbtools\commands
\patch.py", line 82, in apply_patch
    base_dir, self.options.px)
File "C:\Python27\lib\site-packages\rbtools-0.6.dev-py2.7.egg\rbtools\clients\
__init__.py", line 163, in apply_patch
    p_num = p or self._get_p_number(patch_file, base_path, base_dir)
File "C:\Python27\lib\site-packages\rbtools-0.6.dev-py2.7.egg\rbtools\clients\
__init__.py", line 136, in _get_p_number
    if (base_dir.startswith(base_path)):
TypeError: startswith first arg must be str, unicode, or tuple, not NoneType


What operating system are you using? What browser?
Windows 7 and chrome browser.

Please provide any additional information below.
These are the args that are passed to the method. I got them using print statement. diff_file_path:- c:\users\shanka~1\appdata\local\temp\tmpzusqly, repository_info.base_path :- None,
base_dir :- ,
self.options.px :- None.

It looked like its failing bcz base_dir empty and repository_info.base_path :- None

David Trowbridge asked me to open a bug as he suspected there is a issue with rbt patch.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to