From: nickrob@snap.net.nz (Nick Roberts)
To: Alex Harsanyi <alexharsanyi@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: incorrect working revision for the mercurial VC backend
Date: Wed, 30 Dec 2009 16:42:46 +1300 [thread overview]
Message-ID: <19258.52278.890330.878259@totara.tehura.co.nz> (raw)
In-Reply-To: <cf628bc60912291930x46faaa61j488e15cc5b953689@mail.gmail.com>
[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
next prev parent reply other threads:[~2009-12-30 3:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-30 1:53 incorrect working revision for the mercurial VC backend Alex Harsanyi
2009-12-30 2:31 ` Nick Roberts
[not found] ` <cf628bc60912291930x46faaa61j488e15cc5b953689@mail.gmail.com>
2009-12-30 3:42 ` Nick Roberts [this message]
2009-12-30 6:15 ` Alex Harsanyi
2009-12-30 7:02 ` Nick Roberts
2009-12-30 8:02 ` Eli Zaretskii
2009-12-30 9:37 ` Alex Harsanyi
2009-12-30 3:29 ` Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19258.52278.890330.878259@totara.tehura.co.nz \
--to=nickrob@snap.net.nz \
--cc=alexharsanyi@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.