emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: incorrect working revision for the mercurial VC backend


From: Nick Roberts
Subject: Re: incorrect working revision for the mercurial VC backend
Date: 2009年12月30日 16:42:46 +1300

[please cc the mailing list]
 > I haven't switched yet to bzr, so I cannot pull the change, however
 > the patch corresponds to my local fix, except that the last line
 > reads:
But you could apply the patch to your working copy.
 > (if (eq 0 status) out "0")
 >
 > This corresponds to the previous behavior of returning a string as the
 > revision and returning "0" if there is a problem with running the hg
 > command.
Does that really correspond to the previous behavior?
 ...
 (when (eq 0 status)
 (if (string-match "changeset: *\\([0-9]*\\)" out)
 (match-string 1 out)
 "0"))))
It returns "0" when there is no match but nil if status doesn't equal 0:
 when is a Lisp macro in `subr.el'.
 (when COND BODY...)
 If COND yields non-nil, do BODY, else return nil.
Also, iget a quoted string, e.g. "\"290\"", which is why I used read.
-- 
Nick http://users.snap.net.nz/~nickrob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]

AltStyle によって変換されたページ (->オリジナル) /