I had this problem as well few months ago. Following patch to
post-review should resolve it (attached).
I had to fix some permissions in order to get rid of temp files + the
'\n' (or \r?) was not stripped from the argument and also split_lines
option was needed in a execute call. I don't remember if I reached the
point of actually posting a review though as I had not much time to
play with clearcase+reviewboard :)
Regards,
Bartek Celary
2009/5/25 mahesh <[email protected]>:
>
> post-review under clearcase / HOW TO ?
>
> Hi, I have set up a django based review-board (i.e. without apache /
> mod_python) and it came up well. I would like to post-review from
> another client where I've installed RBTools (latest version_
>
>
> I am in clearcase dynamic view and in vob path .. example
> /vobs/src/tmp_vob/tools and checked out build.ksh
>
> and I am issuing following command to make it diff from predecessor
> version and CHECKEDOUT version to RB as if posted by an admin user.
>
> Command -
> post-review --server=http://mvaidya-inl:8000 --username=admin --
> password=admin build.ksh
>
> Please advise me if command usage is correct and I am getting this
> errors for now
>
> File "/home/mvaidya/EGG-INFO/scripts/post-review", line 938, in diff
> return self.do_diff(self.get_extended_namespace(files))
> File "/home/mvaidya/EGG-INFO/scripts/post-review", line 802, in
> get_extended_namespace
> versions = self.get_previous_version(files)
> File "/home/mvaidya/EGG-INFO/scripts/post-review", line 781, in
> get_previous_version
> ["cleartool", "desc", "-pre", elem_path])
> ValueError: too many values to unpack
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"reviewboard" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---
Index: post-review
===================================================================
--- post-review (revision 1980)
+++ post-review (working copy)
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+import stat
import cookielib
import difflib
import getpass
@@ -781,7 +782,7 @@
# Call cleartool to get this version and the previous version
# of the element.
curr_version, pre_version = execute(
- ["cleartool", "desc", "-pre", elem_path])
+ ["cleartool", "desc", "-pre", elem_path], split_lines=True)
curr_version = cpath.normpath(curr_version)
pre_version = pre_version.split(':')[1].strip()
@@ -899,8 +900,9 @@
tf = cpath.normpath(cpath.join(td, name))
if cpath.exists(tf):
debug("WARNING: FILE EXISTS")
- os.unlink(tf)
- execute(["cleartool", "get", "-to", tf, normkey])
+ os.chmod(tf, stat.S_IWRITE | stat.S_IREAD)
+ os.remove(tf)
+ execute(["cleartool", "get", "-to", tf, normkey.strip("\n")])
else:
die("ERROR: FILE NOT FOUND : %s" % epstr)
@@ -995,7 +997,8 @@
file_data.append(fdata)
# If the file was temp, it should be removed.
if do_rem:
- os.remove(filenam)
+ os.chmod(fn, stat.S_IWRITE | stat.S_IREAD)
+ os.remove(fn)
modi = file_data.pop()
orig = file_data.pop()