Hi,

       After checking with python-list i found that i was
misinterpreting the output error message. The actual problem is post-
review script is not able to access file "c:\docume~1\shambhu
\locals~1\temp\4e0c6ccee4b4ee199cc18529c0bbf8c4" if this file is
already present if there is failure in previous run.
Now i am stuck again in function "do_diff" in post-review script. Here
is piece of code:

for filenam in (onam, mnam) :
                if cpath.exists(filenam) and self.viewtype ==
"dynamic":
                    debug("Dynamic view Type")
                    do_rem = False
                    fn = filenam
                elif len(filenam) > 254 or self.viewtype ==
"snapshot":
                    debug("Snapshot View Type")
                    fn = self.get_filename_hash(filenam)
                    debug("FileName_Hash: %s" % fn)
                    fn = cpath.join(tempfile.gettempdir(), fn)
                    debug("TempFileTempdir: %s" % fn)
                    do_rem = True
                fd = open(cpath.normpath(fn))
                fdata = fd.readlines()
                fd.close()
                file_data.append(fdata)
                # If the file was temp, it should be removed.
                if do_rem:
                    os.remove(filenam)

Here i am getting error at last line "os.remove(filenam)", because
filenam contains version extended path name and hence it is not able
to access/remove windows command.

WindowsError: [Error 206] The filename or extension is too long: 'K:\
\SHAMBHU_XXXXXXX\\YYYYYYYYYY\\@@\\main\\2\\abcabcabc\\@@\\main\
\abcabcabc\\abcabcabc_r1\\xyzxyz\\1\\hello\\@@\\main\\abcabcabc\
\abcabcabc_r1\\xyzxyz\\1\\hello.c@@\\@@\\main\\abcabcabc\\abcabcabc_r1\
\xyzxyz\\xyzxyzxyz_1\\0'


Regards,
Shambhu.

On Aug 7, 3:43 pm, Shambhu <shambhu.1...@gmail.com> wrote:
> Hi,
>
>       This time I tried post-review with checkedout file. I ran
> command $post-review -d <checkedout_Filename>
> But even with checkedout file it is failing. Here is trace log:
>
> Traceback (most recent call last):
>   File "C:\Python25\Scripts\post-review-script.py", line 8, in
> <module>
>     load_entry_point('rbtools==0.2.1alpha0.dev', 'console_scripts',
> 'post-review')()
>   File "build\bdist.win32\egg\rbtools\postreview.py", line 2993, in
> main
>   File "build\bdist.win32\egg\rbtools\postreview.py", line 1041, in
> diff
>   File "build\bdist.win32\egg\rbtools\postreview.py", line 999, in
> get_extended_namespace
> WindowsError: [Error 5] Access is denied: 'c:\\docume~1\\shambhu\
> \locals~1\\temp\\4e0c6ccee4b4ee199cc18529c0bbf8c4'
>
> After looking into postreview.py, i found that it is failing at
> "os.unlink(tf)" line. While executing os.unlink(tf), it is adding
> additional backslash "\" with the pathname and which is causing the
> problem. I am able to access file 'c:\docume~1\shambhu\locals~1\temp
> \4e0c6ccee4b4ee199cc18529c0bbf8c4' but not 'c:\\docume~1\\shambhu\
> \locals~1\\temp\\4e0c6ccee4b4ee199cc18529c0bbf8c4'
>
> Please suggest how can i fix above issue. I tried a sample script
> having "os.unlink" with Python3.1 and even with that i am getting same
> issue of additional backslash "\".
>
> Regards,
> Shambhu.
>
> On Aug 6, 2:00 pm, Shambhu <shambhu.1...@gmail.com> wrote:
>
> > Hi,
>
> >         I am new to ReviewBoard. I installed reviewboard verion 1.5rc1
> > rbtools "0.2.1alpha0.dev" in windows machine. I am using clearcase as
> > version control. When i use command "$post-review -d file.name", i am
> > getting file not found error, but the file is actually there. I am
> > using dynamic view and the file mentioned below is checked-in. Here is
> > log which i am getting:
>
> > K:\reviewboard_view\test_vob1\test_dir>post-review -d hello.c>>> cleartool 
> > pwv -short
> > >>> repository info: Path: K, Base path: K, Supports changesets: False
> > >>> cleartool desc -pre K:\reviewboard_view\test_vob1\test_dir\hello.c
> > >>> cleartool desc -fmt %Vn K:\
> > >>> cleartool desc -fmt %Vn K:\reviewboard_view
> > >>> cleartool desc -fmt %Vn K:\reviewboard_view\test_vob1
> > >>> cleartool desc -fmt %Vn K:\reviewboard_view\test_vob1\test_dir
> > >>> cleartool desc -fmt %Vn K:\
> > >>> cleartool desc -fmt %Vn K:\reviewboard_view
> > >>> cleartool desc -fmt %Vn K:\reviewboard_view\test_vob1
> > >>> cleartool desc -fmt %Vn K:\reviewboard_view\test_vob1\test_dir
>
> > ERROR: FILE NOT FOUND : K:\reviewboard_view\test_vob1\@@\main
> > \2\test_dir\@@\main\3\hello.c@@\@@\main\4
>
> > If i just run $post-review -d then i am getting following error:>>> 
> > cleartool pwv -short
> > >>> repository info: Path: K, Base path: K, Supports changesets: False
>
> > Traceback (most recent call last):
> >   File "C:\Python25\Scripts\post-review-script.py", line 8, in
> > <module>
> >     load_entry_point('rbtools==0.2.1alpha0.dev', 'console_scripts',
> > 'post-review')()
> >   File "build\bdist.win32\egg\rbtools\postreview.py", line 2982, in
> > main
> >   File "build\bdist.win32\egg\rbtools\postreview.py", line 1035, in
> > diff
> >   File "build\bdist.win32\egg\rbtools\postreview.py", line 899, in
> > get_extended_namespace
> >   File "build\bdist.win32\egg\rbtools\postreview.py", line 890, in
> > get_previous_version
> > IndexError: list index out of range
>
> > Please let me know how to fix this issue or i have done some mistake
> > in configuration.
>
> > Regards,
> > Shambhu.

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to