all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3122: Error saving commit messages for bazaar (bzr).
@ 2009-04-26 22:56 Novimir Pablant
  2009-04-27  3:02 ` Stefan Monnier
  2020-08-20 18:54 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 11+ messages in thread
From: Novimir Pablant @ 2009-04-26 22:56 UTC (permalink / raw)
  To: bug-gnu-emacs



Unable to use emacs to edit commit message for bazaar.  I cannot save 
the buffer for the commit message.

On my system I have the EDITOR environmental variable set to:
C:\Programs\text\emacs-22.3\bin\emacs.exe

I then type:
bzr commit

Emacs opens and I type a commit message. When I try to save I get the 
following error message:

vc-bzr-registered: IO error reading 
c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate: 
Permission denied

Bazaar version 1.13
Emacs version 22.3


In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
  of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

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: ENU
   locale-coding-system: cp1252
   default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
   show-paren-mode: t
   encoded-kbd-mode: t
   tooltip-mode: t
   tool-bar-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   unify-8859-on-encoding-mode: t
   utf-translate-cjk-mode: t
   auto-compression-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
<help-echo> s t u f f <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <tool-bar> <save-buffer> <help-echo>
<help-echo> <down-mouse-1> <help-echo> <help-echo>
<drag-mouse-1> <help-echo> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-movement> <mouse-movement> <mouse-movement>
<mouse-movement> <mouse-movement> <mouse-movement>
<drag-mouse-1> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <menu-bar> <edit> <copy> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <help-echo> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <help-echo> <menu-bar> <buffer> "*Messages*"
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-movement> <mouse-movement> <mouse-movement>
<mouse-movement> <mouse-movement> <drag-mouse-1> <help-echo>
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> M-x <help-echo>
r e p o r t - e m a c s - b u g <return>

Recent messages:
Loading encoded-kb...done
Loading font-lock...done
Loading paren...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading vc-bzr...done
vc-bzr-registered: IO error reading 
c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate: 
Permission denied
Auto-saving...done
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done







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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-26 22:56 bug#3122: Error saving commit messages for bazaar (bzr) Novimir Pablant
@ 2009-04-27  3:02 ` Stefan Monnier
  2009-04-27  5:52   ` Novimir Pablant
  2020-08-20 18:54 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2009-04-27  3:02 UTC (permalink / raw)
  To: Novimir Pablant; +Cc: 3122

> vc-bzr-registered: IO error reading
> c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate:
> Permission denied

> Bazaar version 1.13
> Emacs version 22.3

Can you try and reproduce this bug with the Emacs-23 pretest?

Also, as far as I can tell, the code in vc-bzr.el (in Emacs-22.3 as
well as in the upcoming Emacs-23) checks (file-readable-p dirstate)
before reading the file, so could you check:

  M-: (file-readable-p "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET

to see if it indeed returns t rather than nil.  And then try

  M-: (insert-file-contents "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET

to check that it indeed signals the error you're seeing.

If indeed, file-readable-p claims the file is readable, but
insert-file-contents signals a "permission denied", then the problem
seems to be in the C code (or even deeper such that there's no way for
Emacs to predict that insert-file-contents will signal an error).


        Stefan






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-27  3:02 ` Stefan Monnier
@ 2009-04-27  5:52   ` Novimir Pablant
  2009-04-27 18:25     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Novimir Pablant @ 2009-04-27  5:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3122

I installed Emacs-23.0.92.1 and tried reproducing the error.

I still get the error, but now the file is saved anyway.  This is 
certainly an improvement.

Still using emacs23 I tried the two commands:

M-: (file-readable-p 
"c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET

Responds t

M-: (insert-file-contents 
"c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET

Gives the error (from the Backtrace):
Debugger entered--Lisp error: (error "IO error reading 
c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate: 
Permission denied")
 
insert-file-contents("c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate")
   eval((insert-file-contents 
"c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate"))
   eval-expression((insert-file-contents 
"c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") 
nil)
   call-interactively(eval-expression nil nil)


Novimir


On 4/26/2009 8:02 PM, Stefan Monnier wrote:
>> vc-bzr-registered: IO error reading
>> c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate:
>> Permission denied
>
>> Bazaar version 1.13
>> Emacs version 22.3
>
> Can you try and reproduce this bug with the Emacs-23 pretest?
>
> Also, as far as I can tell, the code in vc-bzr.el (in Emacs-22.3 as
> well as in the upcoming Emacs-23) checks (file-readable-p dirstate)
> before reading the file, so could you check:
>
>    M-: (file-readable-p "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
>
> to see if it indeed returns t rather than nil.  And then try
>
>    M-: (insert-file-contents "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
>
> to check that it indeed signals the error you're seeing.
>
> If indeed, file-readable-p claims the file is readable, but
> insert-file-contents signals a "permission denied", then the problem
> seems to be in the C code (or even deeper such that there's no way for
> Emacs to predict that insert-file-contents will signal an error).
>
>
>          Stefan
>






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-27  5:52   ` Novimir Pablant
@ 2009-04-27 18:25     ` Eli Zaretskii
  2009-04-29  5:58       ` Novimir Pablant
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2009-04-27 18:25 UTC (permalink / raw)
  To: Novimir Pablant, 3122

> Date: Sun, 26 Apr 2009 22:52:45 -0700
> From: Novimir Pablant <mir@amicitas.com>
> Cc: 3122@emacsbugs.donarmstrong.com
> 
> I installed Emacs-23.0.92.1 and tried reproducing the error.
> 
> I still get the error, but now the file is saved anyway.  This is 
> certainly an improvement.
> 
> Still using emacs23 I tried the two commands:
> 
> M-: (file-readable-p 
> "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
> 
> Responds t
> 
> M-: (insert-file-contents 
> "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
> 
> Gives the error (from the Backtrace):
> Debugger entered--Lisp error: (error "IO error reading 
> c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate: 
> Permission denied")

What does the following command produce?

  M-: (file-attributes
   "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET

Also, what does the following display?

  M-: (user-real-login-name) RET

(I suspect that somehow this file was made unreadable for you,
i.e. private to another user.  Assuming you are on Windows XP, the
test in file-readable-p does not take into account Windows native
security settings enforced through ACLs.  So it could think the file
is readable by you, when it really isn't.)






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-27 18:25     ` Eli Zaretskii
@ 2009-04-29  5:58       ` Novimir Pablant
  2009-04-29  7:06         ` Eli Zaretskii
  2009-04-29 20:29         ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Novimir Pablant @ 2009-04-29  5:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 3122


file-attributes gives:
(nil 1 1006 513 (18935 56919) (18935 56919) (18935 55764) 15788 
"-rw-rw-rw-" nil (768 1 . 15292) 1830808)


user-real-login-name gives:
"amicitas"


file-attributes gives the same result outside of a bzr commit.  When not 
in the middle of the commit insert-file-contents works fine.

I have tried accessing the file during a commit (after 'bzr commit' has 
been entered and while the emacs window is still open) with several 
other programs:

notepad: Opens file.
type (in cmd.exe): Error: The process cannot access the file because 
another process has locked a portion of the file.

cygwin: Cannot copy (cp) or view (cat).
explorer: Can copy.

So this is a file lock issue and not a permissions issue.  The file is 
indeed readable.  While I don't know exactly what bazaar has set for 
that file it seams reasonable that it would lock it.


Novi


On 4/27/2009 11:25 AM, Eli Zaretskii wrote:
>> Date: Sun, 26 Apr 2009 22:52:45 -0700
>> From: Novimir Pablant<mir@amicitas.com>
>> Cc: 3122@emacsbugs.donarmstrong.com
>>
>> I installed Emacs-23.0.92.1 and tried reproducing the error.
>>
>> I still get the error, but now the file is saved anyway.  This is
>> certainly an improvement.
>>
>> Still using emacs23 I tried the two commands:
>>
>> M-: (file-readable-p
>> "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
>>
>> Responds t
>>
>> M-: (insert-file-contents
>> "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
>>
>> Gives the error (from the Backtrace):
>> Debugger entered--Lisp error: (error "IO error reading
>> c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate:
>> Permission denied")
>
> What does the following command produce?
>
>    M-: (file-attributes
>     "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate") RET
>
> Also, what does the following display?
>
>    M-: (user-real-login-name) RET
>
> (I suspect that somehow this file was made unreadable for you,
> i.e. private to another user.  Assuming you are on Windows XP, the
> test in file-readable-p does not take into account Windows native
> security settings enforced through ACLs.  So it could think the file
> is readable by you, when it really isn't.)
>






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-29  5:58       ` Novimir Pablant
@ 2009-04-29  7:06         ` Eli Zaretskii
  2009-04-29 19:02           ` Novimir Pablant
  2009-04-29 20:29         ` Stefan Monnier
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2009-04-29  7:06 UTC (permalink / raw)
  To: Novimir Pablant; +Cc: 3122

> Date: Tue, 28 Apr 2009 22:58:42 -0700
> From: Novimir Pablant <mir@amicitas.com>
> CC: 3122@emacsbugs.donarmstrong.com, monnier@iro.umontreal.ca
> 
> file-attributes gives:
> (nil 1 1006 513 (18935 56919) (18935 56919) (18935 55764) 15788 
> "-rw-rw-rw-" nil (768 1 . 15292) 1830808)

Sorry, I should have said

  M-: (file-attributes
   "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate"
   'string) RET

(note the `string' optional argument).  It now seems that indeed the
permissions are not the issue, but just to be sure, make sure what the
above displays says that the user "amicitas" is displayed instead of
the numerical ID 1006 as the owner of the file.






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-29  7:06         ` Eli Zaretskii
@ 2009-04-29 19:02           ` Novimir Pablant
  0 siblings, 0 replies; 11+ messages in thread
From: Novimir Pablant @ 2009-04-29 19:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 3122

Here is the result:

(nil 1 "amicitas" "None" (18935 57961) (18935 57961) (18935 55764) 15789 
"-rw-rw-rw-" nil (768 1 . 15292) 1830808)


I dug a little into the bazaar code to see what was actually being done 
to that file.  I didn't really have the time to actually get my head 
around the bzr code but I think what is being called is:


LOCK_SH = 0 # the default
LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK
LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY

lockmode = LOCK_SH + LOCK_NB
win32file.LockFileEx(self.hfile, lockmode, 0, 0x7fff0000, overlapped)

This is what bzr considers a read_lock for win32.  For a writelock 
lockmode = LOCK_EX + LOCK_NB


Novi


On 4/29/2009 12:06 AM, Eli Zaretskii wrote:
>> Date: Tue, 28 Apr 2009 22:58:42 -0700
>> From: Novimir Pablant<mir@amicitas.com>
>> CC: 3122@emacsbugs.donarmstrong.com, monnier@iro.umontreal.ca
>>
>> file-attributes gives:
>> (nil 1 1006 513 (18935 56919) (18935 56919) (18935 55764) 15788
>> "-rw-rw-rw-" nil (768 1 . 15292) 1830808)
>
> Sorry, I should have said
>
>    M-: (file-attributes
>     "c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate"
>     'string) RET
>
> (note the `string' optional argument).  It now seems that indeed the
> permissions are not the issue, but just to be sure, make sure what the
> above displays says that the user "amicitas" is displayed instead of
> the numerical ID 1006 as the owner of the file.
>






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-29  5:58       ` Novimir Pablant
  2009-04-29  7:06         ` Eli Zaretskii
@ 2009-04-29 20:29         ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2009-04-29 20:29 UTC (permalink / raw)
  To: Novimir Pablant; +Cc: 3122

> I have tried accessing the file during a commit (after 'bzr commit' has been
> entered and while the emacs window is still open) with several other
> programs:

> notepad: Opens file.
> type (in cmd.exe): Error: The process cannot access the file because another
> process has locked a portion of the file.

> cygwin: Cannot copy (cp) or view (cat).
> explorer: Can copy.

> So this is a file lock issue and not a permissions issue.  The file is
> indeed readable.  While I don't know exactly what bazaar has set for that
> file it seams reasonable that it would lock it.

I see, yes, this is a problem linked to using a aprogram written with
a POSIXy mindset on an OS that does not intend to comply with POSIX.
A fix should come up soonish,


        Stefan






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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2009-04-26 22:56 bug#3122: Error saving commit messages for bazaar (bzr) Novimir Pablant
  2009-04-27  3:02 ` Stefan Monnier
@ 2020-08-20 18:54 ` Lars Ingebrigtsen
  2020-08-20 19:30   ` Eli Zaretskii
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-20 18:54 UTC (permalink / raw)
  To: Novimir Pablant; +Cc: 3122

Novimir Pablant <mir@amicitas.com> writes:

> Unable to use emacs to edit commit message for bazaar.  I cannot save
> the buffer for the commit message.
>
> On my system I have the EDITOR environmental variable set to:
> C:\Programs\text\emacs-22.3\bin\emacs.exe
>
> I then type:
> bzr commit
>
> Emacs opens and I type a commit message. When I try to save I get the
> following error message:
>
> vc-bzr-registered: IO error reading
> c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate:
> Permission denied

This was 11 years ago.  Does the bug still exist in more recent versions
of Emacs?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2020-08-20 18:54 ` Lars Ingebrigtsen
@ 2020-08-20 19:30   ` Eli Zaretskii
  2020-08-20 19:43     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-08-20 19:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: mir, 3122

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 20 Aug 2020 20:54:18 +0200
> Cc: 3122@debbugs.gnu.org
> 
> Novimir Pablant <mir@amicitas.com> writes:
> 
> > Unable to use emacs to edit commit message for bazaar.  I cannot save
> > the buffer for the commit message.
> >
> > On my system I have the EDITOR environmental variable set to:
> > C:\Programs\text\emacs-22.3\bin\emacs.exe
> >
> > I then type:
> > bzr commit
> >
> > Emacs opens and I type a commit message. When I try to save I get the
> > following error message:
> >
> > vc-bzr-registered: IO error reading
> > c:/library/code/python/annotatex/releases/test/.bzr/checkout/dirstate:
> > Permission denied
> 
> This was 11 years ago.  Does the bug still exist in more recent versions
> of Emacs?

It works for me, FWIW.  I'm guessing this happened due to some old bug
in bzr, not in Emacs.





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

* bug#3122: Error saving commit messages for bazaar (bzr).
  2020-08-20 19:30   ` Eli Zaretskii
@ 2020-08-20 19:43     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-20 19:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mir, 3122

Eli Zaretskii <eliz@gnu.org> writes:

> It works for me, FWIW.  I'm guessing this happened due to some old bug
> in bzr, not in Emacs.

OK, closing this bug report, then.  If somebody else is still seeing
this, please respond to the debbugs mail address, and we'll reopen the
bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-08-20 19:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-26 22:56 bug#3122: Error saving commit messages for bazaar (bzr) Novimir Pablant
2009-04-27  3:02 ` Stefan Monnier
2009-04-27  5:52   ` Novimir Pablant
2009-04-27 18:25     ` Eli Zaretskii
2009-04-29  5:58       ` Novimir Pablant
2009-04-29  7:06         ` Eli Zaretskii
2009-04-29 19:02           ` Novimir Pablant
2009-04-29 20:29         ` Stefan Monnier
2020-08-20 18:54 ` Lars Ingebrigtsen
2020-08-20 19:30   ` Eli Zaretskii
2020-08-20 19:43     ` Lars Ingebrigtsen

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.