ECB + mercurial

Francesc Rocher <[email protected]> Tue, 23 Feb 2010 13:32:14 +0100
Newsgroups gmane.emacs.code-browser
Message-ID <[email protected]>
Hello all,

[ I'm sorry if this question has been asked before ]

Does anyone has integrated mercurial into ECB using 'ecb-vc-* functions?
I tried, but with poorly or cpu-consuming results. I use Emacs 23.1.92 (23.2
in the
near future) with its CEDET implementation and the latest ECB CVS-version
(2.40).


First try, quite similar to other  `ecb-vc-dir-managed-by-*'  functions:
---8<---
(defun ecb-vc-dir-managed-by-HG (directory)
  "Return 'HG if DIRECTORY is managed by mercurial, nil if not."
  (and (locate-library "vc-hg")
       (ecb-file-exists-p (concat directory "/" ".hg"))
       (require 'vc)
       (require 'vc-hg)
       'HG))
---8<---

Problem: it does not work in subdirectories, just in the root one.
".hg" directory exists only in the root dir, the same as ".bzr", so I don't
understand why it doesn't works.
I don't use bazaar very often, so the question is: vc-bzr backend works fine
under ECB?


Second try
---8<---
(defun ecb-vc-dir-managed-by-HG (directory)
  "Return 'HG if DIRECTORY is managed by mercurial, nil if not."
  (when (= (shell-command
            (concat "cd '" directory "' && hg root") nil nil) 0)
    'HG))
---8<---

Ok, that works in all subdirectories.

Both solutions consume a lot of cpu when emacs is idle and there are several
files opened. Is this because EBC or CEDET is working in background?

Are there better solutions?
Will mercurial be supported in future ECB releases?


Thanks,
-- 
Francesc Rocher

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Ecb-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecb-list