all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Alexandru Harsanyi <harsanyi@mac.com>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: wrong behaviour of vc-workfile-unchanged-p
Date: Tue, 18 Dec 2007 18:37:46 -0500	[thread overview]
Message-ID: <E1J4m0Q-0003hC-Vp@fencepost.gnu.org> (raw)
In-Reply-To: <76E35EAA-CFE4-4400-9456-1ECDBC167D3A@mac.com> (message from Alexandru Harsanyi on Sun, 16 Dec 2007 08:57:36 +0900)

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

      reply	other threads:[~2007-12-18 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-15 23:57 wrong behaviour of vc-workfile-unchanged-p Alexandru Harsanyi
2007-12-18 23:37 ` Richard Stallman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1J4m0Q-0003hC-Vp@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=harsanyi@mac.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.