diff --git a/lisp/vc.el b/lisp/vc.el index cd9f11b..5519ff6 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -884,7 +884,7 @@ Within directories, only files already under version control are noticed." state-model-only-files) "Deduce a set of files and a backend to which to apply an operation. -Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). +Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL. If we're in VC-dir mode, the fileset is the list of marked files. Otherwise, if we're looking at a buffer visiting a version-controlled file, the fileset is a singleton containing this file. @@ -1185,6 +1185,26 @@ merge in the changes into your working copy." (declare-function vc-dir-move-to-goal-column "vc-dir" ()) ;;;###autoload +(defun vc-pull () + "Merges changes between branches." + (interactive) + (vc-ensure-vc-buffer) + (let ((backend (vc-backend buffer-file-name))) + (if (not (vc-find-backend-function backend 'pull)) + (error "Sorry, pull is not implemented for %s" backend) + (vc-call-backend backend 'pull)))) + +;;;###autoload +(defun vc-push () + "Pushes commits to some branch." + (interactive) + (vc-ensure-vc-buffer) + (let ((backend (vc-backend buffer-file-name))) + (if (not (vc-find-backend-function backend 'push)) + (error "Sorry, push is not implemented for %s" backend) + (vc-call-backend backend 'push)))) + +;;;###autoload (defun vc-register (&optional set-revision vc-fileset comment) "Register into a version control system. If VC-FILESET is given, register the files in that fileset.