[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Issue 964] Changed - Temporary file created for $EDITOR is added to repository on import.

From: B. W. Fitzpatrick <fitz_at_red-bean.com>
Date: 2002-11-13 22:25:15 CET

Karl Fogel <kfogel@newton.ch.collab.net> writes:
> Peter Davis <peter@pdavis.cx> writes:
> > As I suggested before, maybe he's just talking about the backup files that
> > most editors leave behind, such as "msg.61388.00001.tmp~". (My $EDITOR is
> > set to "emacsclient".) These don't get deleted, and I do have the problem
> > that they end up cluttering $PWD.
> >
> > Do you have this problem, or is your environment different than mine?
>
> Yeah (switching topics slightly), this is a general problem. For
> Emacs users, we can eventually solve it when svn<->emacs interaction
> code gets into the emacs dist, the way CVS code has. (Ever notice how
> CVS working dirs don't have ~ backups for versioned files, for
> example?)
>
> In the meantime, we could put some stuff in svn-dev.el to prevent it,
> shouldn't be too hard. Just need to set `backup-inhibited' or
> something; check out the "backup-*" vars and functions in Emacs.

This works in emacs 20 & 21:

    (setq bwf-backup-dir "~/.emacs-backups")
    
    (defun make-backup-file-name (file)
      "This overrides the default defun make-backup-file-name and puts all
    annoying twiddle files under bwf-backup-dir. By using the
    file-name-directory AND the file-name-nondirectory, we don't have to
    worry about files with the same name in different directories stomping
    on each other.
    
    Do not change the name of this function! :-)
    "
      (let ((backup-dir (concat bwf-backup-dir (file-name-directory file))))
        (make-directory backup-dir t)
        (concat backup-dir (file-name-nondirectory file) "~")))

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 13 22:26:08 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.