unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Dan Nicolaescu <dann@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: vc-pull/vc-push support
Date: Tue, 25 May 2010 09:45:17 +0000	[thread overview]
Message-ID: <AANLkTikZ3HhCg8SPlYFy_dCyYFeESRHTG55mcdlSLb8z@mail.gmail.com> (raw)
In-Reply-To: <yxqfx1gwjdd.fsf@fencepost.gnu.org>

On Tue, May 25, 2010 at 07:06, Dan Nicolaescu <dann@gnu.org> wrote:
> This has been sitting on my disk for quite a while, and did not see much progress :-(
> vc-pull/vc-push without any options work for bzr, but that's about it.
> Maybe someone would find this useful and want to help finish the implementation...

These are some hacky enhancements I used to pull/push with Git +
vc. I've now removed them from my ~/.emacs since I use magit. But
perhaps they'll be nice for reference.

They allow you to push with C-u C-x v p, and pull with C-x v p.

    ;; This could be made portable but I'm not interested in that at the
    ;; moment so it's git-only.

    (defun vc-push-or-pull ()
      "`vc-push' if given an argument, otherwise `vc-pull'"
      (interactive)
      (if current-prefix-arg
          (vc-push)
          (vc-pull)))

    (defun vc-push ()
      "Run git-push on the current repository, does a dry-run unless
    given a prefix arg."
      (interactive)
      (shell-command "git push"))

    (defun vc-pull ()
      "Run git-pull on the current repository."
      (interactive)
      (shell-command "git pull"))

    ;; vc.el - add commands to push and pull with git
    (progn
      (define-key vc-prefix-map "p" 'vc-push-or-pull))



      parent reply	other threads:[~2010-05-25  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  7:06 vc-pull/vc-push support Dan Nicolaescu
2010-05-25  7:43 ` Miles Bader
2010-05-25  7:48   ` Dan Nicolaescu
2010-05-25  9:37 ` Uday S Reddy
2010-05-25  9:45 ` Ævar Arnfjörð Bjarmason [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikZ3HhCg8SPlYFy_dCyYFeESRHTG55mcdlSLb8z@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=dann@gnu.org \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).