#11 Bug in clearcase-finish-checkout

3.0
closed-fixed
5
2009-03-16
2009-01-08
snogge
No

There seems to be a bug in clearcase-finish-checkout in version 3.0
If clearcase-checkout-comment-type is set to Normal the file argument sent to clearcase-finish-checkout is a list, but it is not handled as a list. This results in parens being included in the pname argument for the cleartool command as below

ct checkout -unreserved -ptime -nwarn -nquery -cfile c:/DOCUME~1/23053527/LOCALS~1/Temp/vc-clearcase-4344c8B "(x:/file)"

I don't know enough elisp to know how to fix this, just enough to investigate.

Discussion

  • snogge

    snogge - 2009-01-08

    Forgot to add: I'm using emacs
    GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2009-01-01 on LENNART-69DE564 (patched)
    downloaded from the emacsW32 site and vc-clearcase 3.0

     
  • Alex Harsanyi

    Alex Harsanyi - 2009-01-08
    • assigned_to: nobody --> haral
    • status: open --> open-accepted
     
  • Alex Harsanyi

    Alex Harsanyi - 2009-01-08

    Patch to fix this bug

     
  • Alex Harsanyi

    Alex Harsanyi - 2009-01-08

    I attached the patch to this bug. You can also add the following lines to the start of `clearcase-finish-checkout':

    (when (listp file)
    (assert (= 1 (length file)))
    (setq file (car file)))

     
  • snogge

    snogge - 2009-01-09

    Wouldn't it be better to actually support lists in clearcase-finish-checkout?
    Cleartool doesn't mind, and then maybe the function can be used in other places. There must be some reason for it to take lists as an argument in the first place.

     
  • Alex Harsanyi

    Alex Harsanyi - 2009-01-10

    Emacs 23 introduces better support for version control systems like SVN, Mercurial or git, where a revision corresponds to the checkin of multiple file. To support that, some commands accept filesets which are list of files.

    However, the checkout operation does not accept filesets, just a single file. This bug showed up because vc-clearcase uses the checkin functionality `vc-start-logentry' to obtain the checkout comment. `vc-start-logentry' requires a fileset and `vc-clearcase-checkout' constructs one for it. The problem was that `vc-start-logentry' will than pass the fileset to `clearcase-finish-checkout' and it didn't account for it.

    All this only happens when `clearcase-checkout-comment-type' is set to 'normal, because only than `vc-clearcase-checkout' will use `vc-start-logentry' to obtain the checkout comment.

     
  • Alex Harsanyi

    Alex Harsanyi - 2009-03-16
    • status: open-accepted --> closed-fixed
     
  • Alex Harsanyi

    Alex Harsanyi - 2009-03-16

    This bug is fixed in vc-clearcase 3.1.

     

Log in to post a comment.