unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* wrong behaviour of vc-workfile-unchanged-p
@ 2007-12-15 23:57 Alexandru Harsanyi
  2007-12-18 23:37 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Harsanyi @ 2007-12-15 23:57 UTC (permalink / raw)
  To: emacs-pretest-bug

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

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

* Re: wrong behaviour of vc-workfile-unchanged-p
  2007-12-15 23:57 wrong behaviour of vc-workfile-unchanged-p Alexandru Harsanyi
@ 2007-12-18 23:37 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2007-12-18 23:37 UTC (permalink / raw)
  To: Alexandru Harsanyi; +Cc: emacs-pretest-bug

Would someone please DTRT and ack?

Mime-Version: 1.0 (Apple Message framework v752.2)
Message-Id: <76E35EAA-CFE4-4400-9456-1ECDBC167D3A@mac.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: emacs-pretest-bug@gnu.org
From: Alexandru Harsanyi <harsanyi@mac.com>
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
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2007-12-18 23:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-15 23:57 wrong behaviour of vc-workfile-unchanged-p Alexandru Harsanyi
2007-12-18 23:37 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).