all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* vc backend precedence question
@ 2007-07-24 10:45 dhruva
  2007-07-24 11:19 ` Masatake YAMATO
  2007-07-24 13:16 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: dhruva @ 2007-07-24 10:45 UTC (permalink / raw)
  To: Emacs Devel

Hi,
  I have a folder which is under both CVS and mercurial (HG). I would
want HG to take precedence in vc-mode so that I get to execute all vc
commands using mercurial as back end.

I tried reordering the list "vc-handled-backends" as:
(setq vc-handled-backends (nconc '(HG) (delq 'HG vc-handled-backends)))

It did not work. Any help would be really appreciated. I have this
rather strange setup as I checkout from CVS and use Mercurial to track
all my changes (as a mercurial queue).

-dky

-- 
Dhruva Krishnamurthy
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vc backend precedence question
  2007-07-24 10:45 vc backend precedence question dhruva
@ 2007-07-24 11:19 ` Masatake YAMATO
  2007-07-24 11:35   ` dhruva
  2007-07-24 13:16 ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Masatake YAMATO @ 2007-07-24 11:19 UTC (permalink / raw)
  To: dhruvakm; +Cc: emacs-devel

> I tried reordering the list "vc-handled-backends" as:
> (setq vc-handled-backends (nconc '(HG) (delq 'HG vc-handled-backends)))

When and where did you this? 
In .emacs or *scratch*?

When you open a file, vc makes an association between the file
and one backend. So if the association is already established,
evaluating (setq vc-handled-backends (nconc '(HG) (delq 'HG vc-handled-backends)))
is too late.

To check the association on a file, see `vc-registered' in vc-hooks.el.

Masatake YAMATO

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vc backend precedence question
  2007-07-24 11:19 ` Masatake YAMATO
@ 2007-07-24 11:35   ` dhruva
  0 siblings, 0 replies; 4+ messages in thread
From: dhruva @ 2007-07-24 11:35 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

Hi,

On 7/24/07, Masatake YAMATO <jet@gyve.org> wrote:
> > I tried reordering the list "vc-handled-backends" as:
> > (setq vc-handled-backends (nconc '(HG) (delq 'HG vc-handled-backends)))
>
> When and where did you this?
> In .emacs or *scratch*?

I did it in my .emacs file. The contents of the list are as follows:
(HG RCS CVS SVN SCCS BZR Arch MCVS)

-dky

-- 
Dhruva Krishnamurthy
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vc backend precedence question
  2007-07-24 10:45 vc backend precedence question dhruva
  2007-07-24 11:19 ` Masatake YAMATO
@ 2007-07-24 13:16 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2007-07-24 13:16 UTC (permalink / raw)
  To: dhruva; +Cc: Emacs Devel

> I tried reordering the list "vc-handled-backends" as:
> (setq vc-handled-backends (nconc '(HG) (delq 'HG vc-handled-backends)))

I'd use `append' to avoid odd corner cases (e.g. if you load your .emacs
several times).  But other than that, it should work.

> It did not work. Any help would be really appreciated. I have this
> rather strange setup as I checkout from CVS and use Mercurial to track
> all my changes (as a mercurial queue).

It's a bit unusual, but nowhere near strange.  It's one of the most common
ways to track an external CVS branch in a local branch (using either
Mercurial, Arch, Monotone, Git, ...).


        Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-24 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 10:45 vc backend precedence question dhruva
2007-07-24 11:19 ` Masatake YAMATO
2007-07-24 11:35   ` dhruva
2007-07-24 13:16 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.