Function: vc--outgoing-base

vc--outgoing-base is a byte-compiled function defined in vc.el.gz.

Signature

(vc--outgoing-base BACKEND FORCE-TOPIC)

Documentation

Return an outgoing base for the current branch under VC backend BACKEND.

The outgoing base is the upstream location for which unintegrated changes on this branch are destined once they are integrated.

There are two stages to determining the outgoing base. First we decide whether we think this is a shorter-lived or a longer-lived ("trunk") branch. If FORCE-TOPIC is non-nil, assume this is a shorter-lived branch. Otherwise call vc-trunk-or-topic-p. If that function returns nil, also assume this is a shorter-lived branch. This is based on how it's commands primarily intended for working with shorter-lived branches that call this function. Second, if we have determined that this is a trunk, return nil, meaning that the outgoing base is the place to which vc-push would push. Otherwise, we have determined that this is a shorter-lived branch, and we return the value of calling BACKEND's topic-outgoing-base VC API function.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc--outgoing-base (backend force-topic)
  "Return an outgoing base for the current branch under VC backend BACKEND.
The outgoing base is the upstream location for which unintegrated
changes on this branch are destined once they are integrated.

There are two stages to determining the outgoing base.
First we decide whether we think this is a shorter-lived or a
longer-lived (\"trunk\") branch.  If FORCE-TOPIC is non-nil, assume this
is a shorter-lived branch.  Otherwise call `vc-trunk-or-topic-p'.
If that function returns nil, also assume this is a shorter-lived
branch.  This is based on how it's commands primarily intended for
working with shorter-lived branches that call this function.
Second, if we have determined that this is a trunk, return nil, meaning
that the outgoing base is the place to which `vc-push' would push.
Otherwise, we have determined that this is a shorter-lived branch, and
we return the value of calling BACKEND's `topic-outgoing-base' VC API
function."
  ;; For further discussion see bug#80006.
  (and (or force-topic
           (memq (vc-trunk-or-topic-p nil backend) '(topic nil)))
       (vc-call-backend backend 'topic-outgoing-base)))