|
From: | Dominique de Waleffe |
Subject: | Re: pcl-cvs: merging in wrong revision file when conflicts: SOLVED |
Date: | Tue, 26 Apr 2005 14:40:05 +0200 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Dominique de Waleffe wrote:
Hi, We are using pcl-cvs on a large project and we have been observing strange behaviour when calling the function bound to "d E" (interactive merge). At first I believed this behaviour was a server bug. However, today it happened again and upon closer inspection, I think the behaviour is attributable to pcl-cvs (or some other function called by it). The symptom is that CVS reports a conflict upon update, we do d E on the file and the marge happens between an older revision (say 1.7, for teh example) (that also led to conflicts) and the locally modified file instead of the real conflicting version (1.23) and the locally modified one.Upon inspection of the directory, I noticed that I had .#f.1.20.#f.1.23 .#f.1.5 .#f.1.6 .#f.1.7
Contrary to what I wrote in my previous mail, the problem is not in the file-newer-than-file-p function but in the calls to it in pcvs-info.el, at function cvs-fileinfo->backup-file The concatenation of dir should only done on the single result at the end and not within the loop. Here's the change I did: (defun cvs-fileinfo->backup-file (fileinfo) "Construct the file name of the backup file for FILEINFO." (let* ((dir (cvs-fileinfo->dir fileinfo)) (file (cvs-fileinfo->file fileinfo)) (default-directory (file-name-as-directory (expand-file-name dir))) (files (directory-files "." nil (concat "\\`" (regexp-quote cvs-bakprefix) (regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'"))) bf) (concat dir ;; ADDED (dolist (f files bf) (when (and (file-readable-p f) (or (null bf) (file-newer-than-file-p f bf))) ;;WAS (setq bf (concat dir f)))))) (setq bf f)))))) Regards, D.
[Prev in Thread] | Current Thread | [Next in Thread] |