X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 	tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <24495013.post@talk.nabble.com>
Date: Wed, 15 Jul 2009 03:03:08 -0700 (PDT)
From: Marc Girod <marc.girod@gmail.com>
To: cygwin@cygwin.com
Subject: Re: .#* lock files under X, for files I edit???
In-Reply-To: <24494476.post@talk.nabble.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
References: <23655794.post@talk.nabble.com> <4A157FF5.6030407@cornell.edu> <23656848.post@talk.nabble.com> <4A159713.50303@cornell.edu> <23671375.post@talk.nabble.com> <4A16BEA9.8020608@cornell.edu> <23672879.post@talk.nabble.com> <24494476.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com



Marc Girod wrote:
> 
> I'll report my results...
> 
Here is what I did, to make it practical:

(defun clearcase-no-lock()
  "Under ClearCase, in Cygwin, do not create lock symlinks.
Either format (old: Windows shortcuts; new: real symlinks with utf name) are
bad for different reasons.
The only way to prevent this is to set the purify_flag used by emacs while
dumping...
This function is intened as a find-file-hook."
  (let ((fname (buffer-file-name)))
    (if (file-accessible-directory-p (concat fname "@@"))
	(set (make-local-variable 'purify_flag) t))))
(add-hook 'find-file-hook 'clearcase-no-lock)


Note that this would work only for 'elements' (i.e. not for
view private files) since their version tree opens as a
directory under the '@@' filename extension.
I guess it is a faster check than invoking cleartool...

Marc
-- 
View this message in context: http://www.nabble.com/.-*-lock-files-under-X%2C-for-files-I-edit----tp23655794p24495013.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

