#8 cleartool not found error on emacs exit

v1.115
closed-fixed
5
2007-12-03
2007-10-23
No

vc-clearcase should turn off itself when cleartool command is not in the path.
Right now when I try to exit emacs on the machine with no clear case installed I get the following error and cannot exit emacs.

Debugger entered--Lisp error: (file-error "Searching for program" "no such file or directory" "cleartool")
start-process("cleartool" " *cleartool*" "cleartool" "-status")
(let ((process ...)) (when (not ...) (with-timeout ... ...)) (set-process-sentinel process (quote ah-cleartool-tq-sentinel)) (process-kill-without-query proc$
ah-cleartool-tq-start()
(if (and ah-cleartool-tq (let ... ...)) nil (setq ah-cleartool-tq nil) (ah-cleartool-tq-start))
(unless (and ah-cleartool-tq (let ... ...)) (setq ah-cleartool-tq nil) (ah-cleartool-tq-start))
ah-cleartool-tq-maybe-start()
ah-cleartool-ask("ls \"/home/dgashins/.projects.ede\"")
ah-cleartool("ls \"%s\"" "/home/dgashins/.projects.ede")
(let ((ls-result ...)) (if (string-match "Rule: \\(.*\\)$" ls-result) (progn ... ... t) nil))
(progn (unless fprop (setq fprop ...)) (let (...) (if ... ... nil)))
(condition-case nil (progn (unless fprop ...) (let ... ...)) (ah-cleartool-error nil))
(ignore-cleartool-errors (unless fprop (setq fprop ...)) (let (...) (if ... ... nil)))
(if (ah-clearcase-fprop-initialized-p fprop) t (ignore-cleartool-errors (unless fprop ...) (let ... ...)))
(let ((fprop ...)) (if (ah-clearcase-fprop-initialized-p fprop) t (ignore-cleartool-errors ... ...)))
vc-clearcase-registered("/home/dgashins/.projects.ede")
apply(vc-clearcase-registered "/home/dgashins/.projects.ede")
vc-call-backend(CLEARCASE registered "/home/dgashins/.projects.ede")
#[(b) "\302^H\303 #\205^T^@\304 \305^H#\205^T^@\306\307\310\"\207" [b file vc-call-backend registered vc-file-setprop vc-backend throw found t] 4](CLEA$
mapcar(#[(b) "\302^H\303 #\205^T^@\304 \305^H#\205^T^@\306\307\310\"\207" [b file vc-call-backend registered vc-file-setprop vc-backend throw found t]$
byte-code("\303^H\304\"^Y\305\306 \203^Q^@ \307=\203^U^@\n\202^X^@ \nB\"\210)\310^H\304\307#\210\311\207" [file backend vc-handled-backends vc-fil$
vc-registered("/home/dgashins/.projects.ede")
vc-backend("/home/dgashins/.projects.ede")
vc-before-save()
basic-save-buffer()
save-buffer()
#[(buffer) "^Hq\210\301 \207" [buffer save-buffer] 1](#<buffer .projects.ede>)
map-y-or-n-p(#[(buffer) "\305^H!\205P^@\306^H!?\205P^@\307^H!\204%^@ \205P^@^Hq\210\n\205P^@\310 \311V\205P^@\312 !\2035^@r^Hq\210 )\205P^@^K\203$
byte-code("\306\211^X^Y\306\211^Z^[\307 \306^\\211^]\203/^@^M@^Tr\fq\210^N^X\203'^@\310 \203'^@\311^Q\312 \210)^MA\211^U\204^Q^@*\313\314\315\307 \316^N^Y%^R$
save-some-buffers(nil t)
save-buffers-kill-emacs(nil)
call-interactively(save-buffers-kill-emacs)

Discussion

  • Alex Harsanyi

    Alex Harsanyi - 2007-10-23

    Logged In: YES
    user_id=158922
    Originator: NO

    Hi Dimitry,

    Thanks for the bug report. There are two problems related to ClearCase not being available: one that you reported, where ClearCase is not installed on the users computer and a second one when ClearCase is installed but the VOB or VIEW server cannot be reached. I don't have a satisfactory solution for either of them now, but for the second problem, I put up a workaround here:

    http://vc-clearcase.wiki.sourceforge.net/DisableVcClearcase

    I will try to come up with a proper solution,

    Kind Regards,
    Alex.

     
  • Alex Harsanyi

    Alex Harsanyi - 2007-10-23
    • assigned_to: nobody --> haral
    • status: open --> open-accepted
     
  • Dimitry Gashinsky

    Logged In: YES
    user_id=5449
    Originator: YES

    Thanks for quick response. I took a different approach and have put the following workaround into my .emacs

    (unless (executable-find "cleartool")
    (delete 'CLEARCASE vc-handled-backends))

    and it seems to work for my problem.

     
  • Alex Harsanyi

    Alex Harsanyi - 2007-11-01

    Logged In: YES
    user_id=158922
    Originator: NO

    Hi Dimitry,

    I think your approach is better, except I would suggest to use:

    (setq vc-handled-backends
    (delete 'CLEARCASE vc-handled-backends))

    I will modify vc-clearcase.el not to register itself with vc if the cleartool program is not found.

     
  • Alex Harsanyi

    Alex Harsanyi - 2007-11-21

    Logged In: YES
    user_id=158922
    Originator: NO

    Release 1.132 fixes this issue, but only partially, as advices on functions are still activated. In particular, if vc-clearcase.el is loaded when ClearCase is not installed on a system, vc-print-log will not work correctly. This untested function may serve as a workaround:

    (defun disable-clearcase ()
    (interactive)
    (setq vc-handled-backends (delete 'CLEARCASE vc-handled-backends))
    (ad-disable-advice
    'vc-version-backup-file-name 'after 'clearcase-cleanup-version)
    (ad-activate 'vc-version-backup-file-name)
    (ad-disable-advice
    'vc-start-entry 'before 'clearcase-prepare-checkin-comment)
    (ad-activate 'vc-start-entry)
    (ad-disable-advice
    'vc-create-snapshot 'before 'clearcase-provide-label-completion)
    (ad-activate 'vc-create-snapshot)
    (ad-disable-advice
    'vc-print-log 'around 'clearcase-print-log-advice)
    (ad-activate 'vc-print-log))

     
  • Alex Harsanyi

    Alex Harsanyi - 2007-12-03

    Logged In: YES
    user_id=158922
    Originator: NO

    Release 1.136 fixes this issue. If cleartool is not present, vc-clearcase will not activate any of its advices and will not register with vc-handled-backends.

     
  • Alex Harsanyi

    Alex Harsanyi - 2007-12-03
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks