1623: Add p4ticket support in perforce backend

seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Feb. 8, 2013
2118
http://reviews.reviewboard.org/


What version are you running?
Reviewboard 1.0.6

What's the URL of the page this enhancement relates to, if any?
When accessing Perforce.

Describe the enhancement and the motivation for it.
If setting some security options on Perforce server, diff-view pages cannot
be shown correctly. You will get "P4 Login failed" errors. All looks good
if using this patch.

What operating system are you using? What browser?
Windows Vista SP2/7
Firefox 3.6/IE 8

Please provide any additional information below.
--- D:\Python\reviewboard\scmtools\perforce - default.py	2010-03-29 12:25:52.000000000 +-0800
+++ D:\share\tmp\perforce.py	2010-04-12 14:55:02.000000000 +-0800
@@ -22,12 +22,15 @@
         self.p4 = P4.P4()
         self.p4.port = str(repository.mirror_path or repository.path)
         self.p4.user = str(repository.username)
         self.p4.password = str(repository.password)
         self.p4.exception_level = 1
 
+        self.user = str(repository.username)
+        self.password = str(repository.password)
+
         # We defer actually connecting until just before we do some operation
         # that requires an active connection to the perforce depot.  This
         # connection is then left open as long as possible.
 
         self.uses_atomic_revisions = True
 
@@ -37,15 +40,21 @@
         except P4Error:
             # Exceptions in __del__ get ignored but spew warnings.  If there's
             # no internet connection, we'll get a P4Error from disconnect(
chipx86
#1 chipx86
Can you file this on http://reviews.reviewboard.org/ ? Also, please mention what the
security settings are that require this so that they could be documented.
  • +PendingReview
  • +Component-SCMTools
#2 seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Okay, but I cannot upload patch on http://reviews.reviewboard.org/ . Could you please
tell me how to do that? I shall check the P4 security settings and let you know ASAP.
Thanks!
chipx86
#3 chipx86
You can just use post-review while in the checkout.
#4 seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
if change P4 security levels, this issue will appear. please refer to
http://www.perforce.com/perforce/doc.current/manuals/p4sag/03_superuser.html
#5 seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I've post a new request. Please refer to http://reviews.reviewboard.org/r/1537/.
#6 seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Traceback (most recent call last):
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\views.py",
line 153, in view_diff
    interdiffset, highlighting, True)
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 623, in get_diff_files
    large_data=True)
  File "c:\python25\lib\site-packages\Djblets-0.6.1-py2.5.egg\djblets\util\misc.py",
line 166, in cache_memoize
    data = lookup_callable()
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 622, in <lambda>
    enable_syntax_highlighting),
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 344, in get_chunks
    old = get_original_file(filediff)
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 251, in get_original_file
    large_data=True)[0]
  File "c:\python25\lib\site-packages\Djblets-0.6.1-py2.5.egg\djblets\util\misc.py",
line 166, in cache_memoize
    data = lookup_callable()
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 250, in <lambda>
    data = cache_memoize(key, lambda: [fetch_file(file, revision)],
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.8-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 229, in fetch_file
    data = tool.get_file(file, revision)
  File
"C:\Python25\lib\site-packages\reviewboard-1.0.8-py2.5.egg\reviewboard\scmtools\perforce.py",
line 101, in get_file
    raise SCMError('\n'.join(line.lstrip("\t") for line in error))
SCMError: Password not allowed at this server security level, use 'p4 login'.
david
#7 david
  • +Add p4ticket support in perforce backend
david
#9 david
I'm working on doing this in a way which applies to our modern code.
  • +david
david
#10 david
Fixed in release-1.7.x (178a754). This will (finally!) ship in 1.7.6.
  • -PendingReview
    +Fixed