Bazaar dirstate locking (was: lock_* API change)

Stephen J. Turnbull stephen at xemacs.org
Mon May 17 14:52:15 BST 2010


Eli Zaretskii writes:

 > > Excuse me?  Surely it is nearly trivial to ask Emacs to run a process
 > > in the background while capturing stdout/stderr in a buffer, even in a
 > > Windows environment?
 > 
 > I don't know about "nearly trivial".  I'm not an expert on Emacs's VC
 > design and implementation.

Who's talking about VC?  I'm talking about Just Plain Scripting:

(defun bzr-commit-in-background ()
  (interactive)
  (find-file ".msg")
  ;; Insert output in current buffer.
  (shell-command "bzr ls -V -R --unknown" t)
  (recursive-edit)
  ;; If Emacs' `shell-command' doesn't support the trailing `&' itself
  ;; and your shell doesn't either, use `start-process' or similar.
  (shell-command "/usr/bin/bzr commit -F .msg &"))

Refining that to be reasonably smooth shouldn't take too long.

As for the other claims you make, I'm not an expert on bzr internals,
I just know enough about databases that it seemed plausible to me that
a lock might be needed in the current design.  The expert is Robert
Collins who says he's pretty sure he has the dirstate locking breakage
fixed, it was an unfortunate design mistake and not terribly invasive
to fix.  Even though (until Emacs adopted Bazaar) users preferred to
switch their workflows rather than wait or even test a fix, a fix is
already in progress.  Seems to me like things are working here.




More information about the bazaar mailing list