Function: vc-hg-incoming-revision
vc-hg-incoming-revision is a byte-compiled function defined in
vc-hg.el.gz.
Signature
(vc-hg-incoming-revision &optional UPSTREAM-LOCATION REFRESH)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-hg.el.gz
(defun vc-hg-incoming-revision (&optional upstream-location _refresh)
(let* ((upstream-location (or upstream-location "default"))
;; Use 'hg identify' like this, and not 'hg incoming', because
;; this will give a sensible answer regardless of whether the
;; incoming revision has been pulled yet.
(rev (with-output-to-string
(vc-hg-command standard-output 0 nil "identify" "--id"
upstream-location "--template={node}"))))
(condition-case _ (vc-hg-command nil 0 nil "log" "-r" rev)
;; We don't have the revision locally. Pull it.
(error (vc-hg-command nil 0 nil "pull" upstream-location)))
rev))