emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong behaviour of vc-workfile-unchanged-p


From: Richard Stallman
Subject: Re: wrong behaviour of vc-workfile-unchanged-p
Date: Tue, 18 Dec 2007 18:37:46 -0500

Would someone please DTRT and ack?

Mime-Version: 1.0 (Apple Message framework v752.2)
Message-Id: <address@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: address@hidden
From: Alexandru Harsanyi <address@hidden>
Date: Sun, 16 Dec 2007 08:57:36 +0900
Cc: 
Subject: wrong behaviour of vc-workfile-unchanged-p

When calling `vc-next-action' (C-x v v) on a file which has no  
changes, vc.el
will prompt with a message to revert to the master version for RCS or  
say that
the file is up to date for CVS.  Unfortunately, this does not work  
corectly
when the file is unchanged but its timestamp is more recent than the  
checkout
time.  Consider this scenario:

  1/ Create a new file and register it with RCS

  2/ Checkout the file (C-x v v).

  3/ Type C-x v v again.  Emacs will ask whether to revert to the master
  version, since the file is unchanged.

  4/ Modify the file, save it, undo the changes and save it again.   
This will
  have the effect that the file will have the same contents as when  
checked
  out but a more recent modification time.

  5/ Type C-x v v again.  Emacs will pop-up the VC-Log buffer than  
checkin the
  file.

The problem seems to be in `vc-workfile-unchanged-p': if the checkout  
time is
available for a file, it is compared against the modification time  
and the
"unchanged " decision is made on that alone, without consulting the  
backed
specific function (vc-rcs-workfile-unchanged-p or
vc-default-workfile-unchanged-p)

I believe vc-workfile-unchanged-p and if the two timestamsps are the  
same, it
can conclude that the file is unchanged, but if the timestamps are  
different,
it should call the backend specific workfile-unchanged-p function.

Best Regards,
Alex.



In GNU Emacs 22.1.50.2 (powerpc-apple-darwin8.9.0, Carbon Version 1.6.0)
  of 2007-06-09 on karinji.local
Windowing system distributor `Apple Inc.', version 10.4.11
configured using `configure  '--enable-carbon-app''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   locale-coding-system: iso-8859-1
   default-enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
   encoded-kbd-mode: t
   show-paren-mode: t
   global-cwarn-mode: t
   display-time-mode: t
   whitespace-global-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   unify-8859-on-encoding-mode: t
   utf-translate-cjk-mode: t
   auto-compression-mode: t
   line-number-mode: t

Recent input:
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> C-v <up> <down> <down> <down>
<down> <down> <down> <down> <down> <down> C-v C-v C-v
<up> <up> C-v C-v C-v C-v C-v C-v C-v <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-up> <wheel-up> <double-wheel-up>
<wheel-down> <double-wheel-down> <wheel-down> <wheel-down>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <wheel-up>
<double-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <wheel-down> <wheel-down>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-down> <down-mouse-1>
<mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1>
<mouse-1> C-x C-f <C-backspace> <C-backspace> <C-backspace>
<C-backspace> <C-backspace> p k <tab> e m <tab> / l
i s <tab> / v c / <tab> <backspace> . <tab> <return>
C-s w o r k f i e <backspace> l e - u n c C-s C-w C-s
C-s C-s C-s C-s <up> <down> C-h f <return> <down-mouse-1>
<mouse-1> C-x C-f v c - h <tab> o <tab> <return> C-x
1 C-s C-s <down> <down> <down> <down> C-x C-f <C-backspace>
<C-backspace> <C-backspace> O t h <tab> <return> <down>
<down> <down> <down> M-> <up> <return> + R C S <return>
<down> <down> <down> <down> C-x C-f t e s t . t x t
<return> <down> <down> <up> <up> C-SPC M-> C-w a b
c d e f C-x C-s C-x v i C-x v v C-x v v C-g <return>
d e f C-x C-s C-a C-k <backspace> C-x C-s C-x v = C-x
v v C-x 0 <down-mouse-1> <mouse-1> M-x r e p o r t
<tab> <return>

Recent messages:
Press C-c C-c when you are done editing.
Registering /Users/haral/Other/testing/test.txt... done
Checking out /Users/haral/Other/testing/test.txt...done
Quit
Wrote /Users/haral/Other/testing/test.txt [2 times]
No changes to /Users/haral/Other/testing/test.txt since latest version
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done
Loading emacsbug...done


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]