unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences
@ 2015-01-09 10:24 Ed Avis
  2015-05-16 14:41 ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Avis @ 2015-01-09 10:24 UTC (permalink / raw)
  To: 19543

Open a file under version control (I used an svn working copy).
Do not make any changes to the file in Emacs, so that the modification
flag remains unset.  But change the file contents outside Emacs,
for example

    M-! echo hello >>foo

Now do C-x v = to show differences.  There are some changes to check in.
Yet when using C-x v v, Emacs reports 'Fileset is up-to-date',
despite the fact that a moment ago vc-diff showed it wasn't.

I understand that Emacs cannot constantly keep track of times when an
edited file might have been changed by some other program.  And that on
trying to edit the buffer, it will warn 'foo changed on disk...'.
However, for me at least, it is quite a common operation to change a
file somehow and then use an existing Emacs buffer to view the
differences and check it in.  Hence it is frustrating that
vc-next-action does nothing.

If the last vc-diff operation on a file showed changes, then
vc-next-action should revert the buffer contents to what is currently on
disk.  This could even be done without a warning if the modification
flag on the buffer is currently unset and the buffer was under version
control when loaded.  Then a further vc-next-action should commit.



In GNU Emacs 24.4.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9)
 of 2014-11-03 on wcl-linux04.wcl.local
Configured using:
 `configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
 -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_GB.UTF-8
  value of $LC_MESSAGES: en_GB.UTF-8
  value of $LC_MONETARY: en_GB.UTF-8
  value of $LC_NUMERIC: en_GB.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Diff

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-w C-x C-s ESC < C-x k RET C-x 
C-g q C-x v u y e s RET ESC ! p a t c h SPC b u TAB 
SPC < d RET ESC ! v p SPC b u DEL DEL DEL DEL DEL DEL 
DEL c p SPC b u TAB SPC ~ / w i TAB s c TAB RET C-x 
v = C-x o C-s i n t e r e s t r a t e 1 m o f f C-s 
C-s C-s C-s C-s C-a ESC > C-r C-r C-r C-r C-r C-r C-r 
C-a C-x v = ESC [ 6 ~ ESC [ 5 ~ C-x v v C-g C-x v = 
C-x v v C-x o ESC x r e p o r t SPC e m a C-g C-g C-x 
C-f DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
DEL DEL j o b RET ESC ! e c h o SPC h e l l o SPC > 
> j o b RET C-x v = C-x v v ESC x r e p o r t - e m 
a c s - b u g SPC RET

Recent messages:
Mark saved where search started
Finding changes in /home/eda/svn_working/repos/wwwroot/WaniSystems/Configuration/MarketSampler/jobs/build.trend.signals.xml...done
Fileset is up-to-date
Quit
Finding changes in /home/eda/svn_working/repos/wwwroot/WaniSystems/Configuration/MarketSampler/jobs/build.trend.signals.xml...done
Fileset is up-to-date
Quit [2 times]
(Shell command succeeded with no output)
Finding changes in /home/eda/svn_working/repos/job...done
Fileset is up-to-date

Load-path shadows:
None found.

Features:
(shadow sort emacsbug sendmail sh-script smie executable python json
macros rect ispell network-stream starttls tls mail-extr etags
smerge-mode tabify imenu man ediff-ptch ediff-merg ediff-wind ediff-diff
ediff-mult ediff-help ediff-init ediff-util ediff conf-mode log-view
two-column iso-transl edmacro dabbrev mule-util vc-cvs vc-rcs sql view
kmacro cus-edit wid-edit cus-start cus-load perl-mode ffap thingatpt
url-parse auth-source eieio eieio-core gnus-util password-cache url-vars
help-mode diff-mode vc misearch multi-isearch vc-dispatcher vc-svn
nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
pcmpl-unix dired xterm time-date log-edit easy-mmode message format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log server csharp-mode advice
help-fns byte-opt bytecomp byte-compile cconv cc-langs cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs zoom-frm frame-cmds frame-fns cl-macs avoid cl gv cl-loaddefs
cl-lib compile shell pcomplete comint ring ansi-color tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 1423060 129450)
 (symbols 48 31755 0)
 (miscs 40 814 5691)
 (strings 32 73621 14450)
 (string-bytes 1 3790116)
 (vectors 16 35632)
 (vector-slots 8 1579991 202665)
 (floats 8 689 851)
 (intervals 56 175106 1106)
 (buffers 960 165)
 (heap 1024 100883 14170))

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________





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

* bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences
  2015-01-09 10:24 bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences Ed Avis
@ 2015-05-16 14:41 ` Dmitry Gutov
  2015-05-16 14:44   ` Dmitry Gutov
  2015-05-16 16:19   ` Ed Avis
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Gutov @ 2015-05-16 14:41 UTC (permalink / raw)
  To: Ed Avis, 19543

On 01/09/2015 12:24 PM, Ed Avis wrote:

> Now do C-x v = to show differences.  There are some changes to check in.
> Yet when using C-x v v, Emacs reports 'Fileset is up-to-date',
> despite the fact that a moment ago vc-diff showed it wasn't.

You should try M-x global-auto-revert-mode.

> If the last vc-diff operation on a file showed changes, then
> vc-next-action should revert the buffer contents to what is currently on
> disk.

I guess vc-diff could update the status of the file (or files) if the 
current value is obviously wrong, but that still makes for brittle 
workflow: there's no guarantee that the user will case vc-diff before 
vc-next-action.





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

* bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences
  2015-05-16 14:41 ` Dmitry Gutov
@ 2015-05-16 14:44   ` Dmitry Gutov
  2015-05-16 16:19   ` Ed Avis
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Gutov @ 2015-05-16 14:44 UTC (permalink / raw)
  To: Ed Avis, 19543

On 05/16/2015 05:41 PM, Dmitry Gutov wrote:

> I guess vc-diff could update the status of the file (or files) if the
> current value is obviously wrong, but that still makes for brittle
> workflow: there's no guarantee that the user will case vc-diff before
                                                     ^ call
> vc-next-action.






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

* bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences
  2015-05-16 14:41 ` Dmitry Gutov
  2015-05-16 14:44   ` Dmitry Gutov
@ 2015-05-16 16:19   ` Ed Avis
  2015-05-17  0:32     ` Dmitry Gutov
  1 sibling, 1 reply; 5+ messages in thread
From: Ed Avis @ 2015-05-16 16:19 UTC (permalink / raw)
  To: Dmitry Gutov, 19543@debbugs.gnu.org

Another way to make it consistent would be for vc-diff to work based on what is currently in the buffer, not what's on disk.

But I think a better way to solve it would be for vc-next-action to include a quick check of the file's status on disk.  So before it confidently says "Fileset is up-to-date", it can go and test if the file has changed, and if so go into the usual Emacs prompts about whether to reload the buffer from disk.

This email is intended only for the person to whom it is addressed and may contain confidential information. Any retransmission, copying, disclosure or other use of, this information by persons other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material. This email is for information only and is not intended as an offer or solicitation for the purchase or sale of any financial instrument. Wadhwani Asset Management LLP is a Limited Liability Partnership registered in England (OC303168) with registered office at 40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regulated by the Financial Conduct Authority.

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

* bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences
  2015-05-16 16:19   ` Ed Avis
@ 2015-05-17  0:32     ` Dmitry Gutov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Gutov @ 2015-05-17  0:32 UTC (permalink / raw)
  To: Ed Avis, 19543@debbugs.gnu.org

On 05/16/2015 07:19 PM, Ed Avis wrote:
> Another way to make it consistent would be for vc-diff to work based on what is currently in the buffer, not what's on disk.

We could, but being consistent with out-of-date information is not that 
valuable.

> But I think a better way to solve it would be for vc-next-action to include a quick check of the file's status on disk.  So before it confidently says "Fileset is up-to-date", it can go and test if the file has changed, and if so go into the usual Emacs prompts about whether to reload the buffer from disk.

I don't know; with TRAMP, for example, process calls are at a premium, 
and this would unconditionally increase their number, especially when 
committing many files.

Further, vc-dir already expects the state information to be up-to-date 
(it has some related checks and logic depending on it).

Aside from using auto-revert-mode, inferring the necessity of refresh 
from vc-diff output might be the best solution.

> This email is intended only for the person to whom it is addressed and may contain confidential information. Any retransmission, copying, disclosure or other use of, this information by persons other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material. This email is for information only and is not intended as an offer or solicitation for the purchase or sale of any financial instrument. Wadhwani Asset Management LLP is a Limited Liability Partnership registered in England (OC303168) with registered office at 40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regulated by the Financial Conduct Authority.

Please drop this nonsense. The above text makes it seem like I can't 
even quote your message here because a copy goes to the public bug tracker.





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

end of thread, other threads:[~2015-05-17  0:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 10:24 bug#19543: 24.4; vc-mode: 'Fileset is up-to-date' even when vc-diff showed differences Ed Avis
2015-05-16 14:41 ` Dmitry Gutov
2015-05-16 14:44   ` Dmitry Gutov
2015-05-16 16:19   ` Ed Avis
2015-05-17  0:32     ` Dmitry Gutov

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).