Re: Issue 3429 in reviewboard: rbt post does not work with CVS when commiting from remote server (locally it works)

2014-06-20 Thread reviewboard


Comment #1 on issue 3429 by determin...@gmail.com: rbt post does not work  
with CVS when commiting from remote server (locally it works)

http://code.google.com/p/reviewboard/issues/detail?id=3429

More info:
the function tries to read CVS/Root and it's de facto the value of $CVSROOT  
stored there:

/my_cvs/cvs/repo/
Is there any way to specify to rbt post this path in the hook and not to  
count it will detects it itself as it seems in the temp  
directory '/var/tmp/cvs-serv9906' there is nothing like CVS/Root (but as  
it's temp I cannot check it) ?


--
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.


Issue 3429 in reviewboard: rbt post does not work with CVS when commiting from remote server (locally it works)

2014-06-20 Thread reviewboard

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

New issue 3429 by determin...@gmail.com: rbt post does not work with CVS  
when commiting from remote server (locally it works)

http://code.google.com/p/reviewboard/issues/detail?id=3429

*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.


What version are you running?
Review Board 2.0.2
RBTools 0.6

What's the URL of the page containing the problem?
n/a

What steps will reproduce the problem?
1. Install Review Board 2.0.2 on dedicated server A
2. Install CVS 1.12.13 on dedicated server B
3. Install RBTools 0.6 on server B
4. Add CVS hook on post commit (in script loginfo on server B)
5. Checkout a project on server B, make a change in a file, commit it -->  
rbt post works as expected and request is created
6. Checkout a project on remote server C, make a change in a file, commit  
it --> file is commited but rbt post reports an error and no review request  
is created


What is the expected output? What do you see instead?
the error displayed is:
-

RBTools 0.6
Python 2.7.6 (default, Mar 22 2014, 22:59:38)

[GCC 4.8.2]

Running on Linux-3.13.0-24-generic-i686-with-Ubuntu-14.04-trusty
Home = /root
Current directory = /var/tmp/cvs-serv9906
Checking for a CVS repository...
ERROR: The provided repository type was not detected in the current  
directory.

-

What operating system are you using? What browser?
CVS server and RBtools are on Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic  
i686) (server A above)
ReviewBoard server is on Ubuntu 12.04.4 LTS (GNU/Linux 3.11.0-15-generic  
x86_64) (server B above)
Remote CVS is on AIX Version 7.1 (server C above) and CVS version on C is  
1.11.23


Please provide any additional information below.

I've noticed the following function cannot return info and is the root of  
the problem:

-
def get_repository_info(self):
if not check_install(['cvs']):
logging.debug('Unable to execute "cvs": skipping CVS')
return None

cvsroot_path = os.path.join("CVS", "Root")

if not os.path.exists(cvsroot_path):
return None

fp = open(cvsroot_path, "r")
repository_path = fp.read().strip()
fp.close()

i = repository_path.find("@")
if i != -1:
repository_path = repository_path[i + 1:]

i = repository_path.rfind(":")
if i != -1:
host = repository_path[:i]
try:
canon = socket.getfqdn(host)
repository_path = repository_path.replace('%s:' % host,
  '%s:' % canon)
except socket.error, msg:
logging.error("failed to get fqdn for %s, msg=%s"
  % (host, msg))

return RepositoryInfo(path=repository_path)
-
because when a remote commit is done from server C, the CVS on server B  
(where RBtools are installed) uses a temporary directory (something  
like '/var/tmp/cvs-serv9906') instead of a normal directory with  
checked-out project like in step 5.


In the CVS hook I have the following call (some variables are precalculated  
as $USER but they are not relevant here):


rbt post --debug --submit-as $USER --target-groups Reviewers_G1  
--disable-proxy --server $REVIEWBOARD_URL --re
pository $REPOSITORY --username service_user --password some_password  
--markdown --summary "$SUMMARY" --description "$DESC

" $FILE_VER

--
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.