Re: How to enable file status icons for Git?
Houman Dunnil <[email protected]>
| Newsgroups | gmane.emacs.code-browser |
|---|---|
| Message-ID | <[email protected]> |
Hmm, I tried one more thing:
(defun ecb-vc-dir-managed-by-GIT (directory)
(let* ((cannon (file-truename directory))
(gitdir (concat cannon "/.git/")))
(if (eq cannon "/")
nil
(cond ((and (ecb-file-exists-p gitdir)
(locate-library "vc-git"))
'git)
(t
(ecb-vc-dir-managed-by-GIT (concat cannon "/../")))))))
But it says:
let: ECB 2.32: Errors during setting the default directory.
(error-type: void-variable, error-data: (and))
On Mon, Apr 6, 2009 at 3:01 PM, Houman Dunnil <[email protected]> wrote:
> Awesome! Thanks a lot! It works! Well, partially...
>
> I've added (ecb-vc-dir-managed-by-GIT . ecb-vc-state) to
> `ecb-vc-supported-backends'
>
> And defined the following method:
>
> (defun ecb-vc-dir-managed-by-GIT (directory)
> "Return 'GIT if DIRECTORY is managed by GIT. nil if not."
> (and (ecb-file-exists-p (concat directory "/.git/"))
> (locate-library "vc-git")
> 'GIT))
>
> With these additions it shows status icons for the files that are in
> the root directory of the Git working directory but not for the files
> that are in sub-directories. I think it's because that Git has only
> has one .git directory in the root, unlike SVN which has a .svn dir in
> each directory.
>
> Unfortunately, I'm not a lisp pro and don't know how to tell
> ecb-vc-dir-managed-by-GIT to process sub-directories. Any clue?
>
> On Mon, Apr 6, 2009 at 2:13 PM, <[email protected]> wrote:
>> Ok, now i know it better ;-)
>>
>> It should be not hard to get Git working with ECB:
>>
>> 1. Check the option `ecb-vc-supported-backends' - read the docstring and
>> check for example the SVN-stuff: ecb-vc-dir-managed-by-SVN and
>> ecb-vc-state...
>> 2. maybe you have to ajust the option `ecb-vc-state-mapping' too but i
>> suppose this is not necessary.
>>
>> So IMHO you have to do the following things:
>> 1. Write a new function ecb-vc-dir-managed-by-GIT (and use
>> ecb-vc-dir-managed-by-SVN as a starting example)
>> 2. Add the combination of ecb-vc-dir-managed-by-GIT and ecb-vc-state to the
>> option `ecb-vc-supported-backends'
>>
>> and Bob will be your uncle ;-)
>>
>> It it works then please send me your code then it will add this new backend
>> to the next ECB-release...
>>
>> Does this help?
>> Klaus
>> ________________________________
>> Von: [email protected] [mailto:[email protected]]
>> Gesendet: Sonntag, 5. April 2009 19:45
>> An: [email protected]; [email protected]
>> Betreff: Re: [ECB-list] How to enable file status icons for Git?
>>
>> Hi,
>>
>> first of all: what the hell is Git? sorry for a probably dump question...
>> ;-)
>>
>> Then: I supose the git is another versioning system...but: are you sure it
>> is supported out-of-the-box by vc of Emacs... If no, then it is also no
>> supported by ECB ... of course you can customize ECB so it supports git even
>> when not supported by vc (e.g. clearcase is also supported by ECB) but for
>> this i must take a look into the related options of ECB.....
>>
>> So, please first tell me something about Git - s.a.
>>
>> Klaus
>>
>> _________________________________________________________Klaus Berndl /
>> Capgemini sd&m / München Business Development Manager / Bereich BankenTel:
>> +49 89 63812 392 / Fax: +49 89 63812 220 / www.de.capgemini-sdm.comMobil:
>> +49 162 2842 051 / [email protected] sd&m AG,
>> Carl-Wery-Str. 42, 81739 München Zusammen. Für nachhaltigen
>> Erfolg._________________________________________________________Vorstand:
>> Edmund Küpper (Vorsitzender), Burkhard Kehrbusch, Rüdiger Azone,Dr. Uwe
>> Dumslaff, Kai Grambow, Dr. Michael Rading, Josef RannerAufsichtsrat: Pierre
>> Hessler (Vorsitzender)Sitz und Amtsgericht: München HRB 126057
>>
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Houman Dunnil [mailto:[email protected]]
>> Gesendet: So 05.04.2009 14:53
>> An: [email protected]
>> Betreff: [ECB-list] How to enable file status icons for Git?
>>
>> Hi folks,
>>
>> I have installed the ECB and it works like a charm. The only thing
>> that I cannot figure out is to enable status icons for Git files, it
>> works fine for Subversion but I don't see any icon for Git files. What
>> should I do in order to get them enabled?
>>
>> Thanks in advance,
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Ecb-list mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/ecb-list
>>
>>
>
------------------------------------------------------------------------------
_______________________________________________
Ecb-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecb-list