all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5298: file VC state not updated after a directory check in
@ 2010-01-03 18:12 ` Dan Nicolaescu
  2010-01-05  2:55   ` Dan Nicolaescu
  2010-01-17 22:24   ` bug#5298: marked as done (file VC state not updated after a directory check in) Emacs bug Tracking System
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Nicolaescu @ 2010-01-03 18:12 UTC (permalink / raw)
  To: bug-gnu-emacs


mkdir /tmp/test
cd /tmp/test
bzr init
echo blah > foo
bzr add foo

emacs -Q 
C-x C-f /tmp/test/foo RET
C-x v d /tmp/test RET

Move point to "./" 

C-x v v
write something in the log-edit buffer.  
C-c C-c

now see that in the *vc-dir* the state for "foo" has changed to `up-to-date'

but the mode-line for the "foo" buffer does not show that the buffer is
up to date.
(vc-state "/tmp/test/foo") returns `added'.

The buffer content has been reverted as expected (this can be verified
by using a VCS that does keyword expansion and adding a "$Id$" in
"foo").

If the point is on the "foo" line instead of "./" everything works as
expected, the VC state is updated.  The problem only happens when
checking in directories.

"bzr" is just used as an example above, the problem happens with all VC backends.










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

* bug#5298: file VC state not updated after a directory check in
  2010-01-03 18:12 ` bug#5298: file VC state not updated after a directory check in Dan Nicolaescu
@ 2010-01-05  2:55   ` Dan Nicolaescu
  2010-01-17 22:24   ` bug#5298: marked as done (file VC state not updated after a directory check in) Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Nicolaescu @ 2010-01-05  2:55 UTC (permalink / raw)
  To: 5298

Dan Nicolaescu <dann@ics.uci.edu> writes:

  > mkdir /tmp/test
  > cd /tmp/test
  > bzr init
  > echo blah > foo
  > bzr add foo
  > 
  > emacs -Q 
  > C-x C-f /tmp/test/foo RET
  > C-x v d /tmp/test RET
  > 
  > Move point to "./" 
  > 
  > C-x v v
  > write something in the log-edit buffer.  
  > C-c C-c
  > 
  > now see that in the *vc-dir* the state for "foo" has changed to `up-to-date'
  > 
  > but the mode-line for the "foo" buffer does not show that the buffer is
  > up to date.
  > (vc-state "/tmp/test/foo") returns `added'.
  > 
  > The buffer content has been reverted as expected (this can be verified
  > by using a VCS that does keyword expansion and adding a "$Id$" in
  > "foo").
  > 
  > If the point is on the "foo" line instead of "./" everything works as
  > expected, the VC state is updated.  The problem only happens when
  > checking in directories.
  > 
  > "bzr" is just used as an example above, the problem happens with all VC backends.

This can be solved by extending `with-vc-properties' to actually do
something when passed a directory argument: apply the properties to all
buffers in that directory.

Stefan, WDYT?

--- vc.el.~1.746.~	2009-12-07 03:49:17.000000000 -0800
+++ vc.el	2010-01-04 18:51:46.000000000 -0800
@@ -791,13 +791,23 @@ in their implementation of vc-BACKEND-di
 
 (defmacro with-vc-properties (files form settings)
   "Execute FORM, then maybe set per-file properties for FILES.
+If any of FILES is actually a directory, then do the same for all
+buffers for files in that directory.
 SETTINGS is an association list of property/value pairs.  After
 executing FORM, set those properties from SETTINGS that have not yet
 been updated to their corresponding values."
   (declare (debug t))
-  `(let ((vc-touched-properties (list t)))
-     ,form
+  `(let ((vc-touched-properties (list t))
+	 (flist nil))
      (dolist (file ,files)
+       (if (file-directory-p file)
+	   (dolist (buffer (buffer-list))
+	     (let ((fname (buffer-file-name buffer)))
+	       (when (and fname (vc-string-prefix-p file fname))
+		 (push fname flist))))
+	 (push file flist)))
+     ,form
+     (dolist (file flist)
        (dolist (setting ,settings)
          (let ((property (car setting)))
            (unless (memq property vc-touched-properties)






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

* bug#5298: marked as done (file VC state not updated after a directory check in)
  2010-01-03 18:12 ` bug#5298: file VC state not updated after a directory check in Dan Nicolaescu
  2010-01-05  2:55   ` Dan Nicolaescu
@ 2010-01-17 22:24   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2010-01-17 22:24 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-bug-tracker

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

Your message dated Sun, 17 Jan 2010 14:23:38 -0800 (PST)
with message-id <201001172223.o0HMNcAF010395@godzilla.ics.uci.edu>
and subject line Re: bug#5298: file VC state not updated after a directory check in
has caused the Emacs bug report #5298,
regarding file VC state not updated after a directory check in
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)


-- 
5298: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5298
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems

[-- Attachment #2: Type: message/rfc822, Size: 5062 bytes --]

From: Dan Nicolaescu <dann@ics.uci.edu>
To: bug-gnu-emacs <bug-gnu-emacs@gnu.org>
Subject: file VC state not updated after a directory check in
Date: Sun, 3 Jan 2010 10:12:19 -0800 (PST)
Message-ID: <201001031812.o03ICJ8d025607@godzilla.ics.uci.edu>


mkdir /tmp/test
cd /tmp/test
bzr init
echo blah > foo
bzr add foo

emacs -Q 
C-x C-f /tmp/test/foo RET
C-x v d /tmp/test RET

Move point to "./" 

C-x v v
write something in the log-edit buffer.  
C-c C-c

now see that in the *vc-dir* the state for "foo" has changed to `up-to-date'

but the mode-line for the "foo" buffer does not show that the buffer is
up to date.
(vc-state "/tmp/test/foo") returns `added'.

The buffer content has been reverted as expected (this can be verified
by using a VCS that does keyword expansion and adding a "$Id$" in
"foo").

If the point is on the "foo" line instead of "./" everything works as
expected, the VC state is updated.  The problem only happens when
checking in directories.

"bzr" is just used as an example above, the problem happens with all VC backends.







[-- Attachment #3: Type: message/rfc822, Size: 2689 bytes --]

From: Dan Nicolaescu <dann@ics.uci.edu>
To: 5298-done@debbugs.gnu.org
Subject: Re: bug#5298: file VC state not updated after a directory check in
Date: Sun, 17 Jan 2010 14:23:38 -0800 (PST)
Message-ID: <201001172223.o0HMNcAF010395@godzilla.ics.uci.edu>


Fixed.


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

end of thread, other threads:[~2010-01-17 22:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201001172223.o0HMNcAF010395@godzilla.ics.uci.edu>
2010-01-03 18:12 ` bug#5298: file VC state not updated after a directory check in Dan Nicolaescu
2010-01-05  2:55   ` Dan Nicolaescu
2010-01-17 22:24   ` bug#5298: marked as done (file VC state not updated after a directory check in) Emacs bug Tracking System

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.