From: Joey Hess Date: Tue, 22 Jul 2008 19:21:48 +0000 (-0400) Subject: Add a push subcommand, which pushes committed changes for DCVS, and does nothing... X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/466a94bc78c2ee68a2aef9f2448606126c141e99 Add a push subcommand, which pushes committed changes for DCVS, and does nothing for svn/cvs. Closes: #491865 --- diff --git a/debian/changelog b/debian/changelog index e84cbc8..512521a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mr (0.33) UNRELEASED; urgency=low + + * Add a push subcommand, which pushes committed changes for DCVS, and + does nothing for svn/cvs. Closes: #491865 + + -- Joey Hess Tue, 22 Jul 2008 15:19:54 -0400 + mr (0.32) unstable; urgency=low * Include the right (v2) version of GPL in the source. diff --git a/lib/git-fake-bare b/lib/git-fake-bare index 899c77b..b5af791 100644 --- a/lib/git-fake-bare +++ b/lib/git-fake-bare @@ -59,6 +59,9 @@ git_fake_bare_commit = GIT_DIR="$MR_REPO" git commit -a "$@" GIT_DIR="$MR_REPO" git push --all +git_fake_bare_push = + GIT_DIR="$MR_REPO" git push --all + git_fake_bare_record = cd "$(git_get_worktree)" GIT_DIR="$MR_REPO" git commit -a "$@" diff --git a/lib/git-svn b/lib/git-svn index 3fe18a2..7e42b88 100644 --- a/lib/git-svn +++ b/lib/git-svn @@ -11,6 +11,7 @@ git_svn_update = git svn fetch git_svn_status = git status "$@" || true git_svn_commit = git svn dcommit +git_svn_push = git svn dcommit git_svn_record = git commit -a "$@" git_svn_diff = git diff "$@" git_svn_log = git svn log "$@" diff --git a/mr b/mr index 7eaaddd..e76887e 100755 --- a/mr +++ b/mr @@ -81,6 +81,11 @@ remote repository. Only supported for distributed revision control systems. The optional -m parameter allows specifying a commit message. +=item push + +Pushes committed local changes to the remote repository. A no-op for +centralized revision control systems. + =item diff Show a diff of uncommitted changes. @@ -1288,6 +1293,13 @@ bzr_record = bzr commit "$@" hg_record = hg commit -m "$@" darcs_record = darcs record -a -m "$@" +svn_push = : +git_push = git push "$@" +bzr_push = bzr push "$@" +cvs_push = : +hg_push = hg push "$@" +darcs_push = darcs push -a + svn_diff = svn diff "$@" git_diff = git diff "$@" bzr_diff = bzr diff "$@" diff --git a/mrconfig.complex b/mrconfig.complex index 8eef5eb..47cf979 100644 --- a/mrconfig.complex +++ b/mrconfig.complex @@ -9,10 +9,10 @@ include = cat /usr/share/mr/* 2>/dev/null || true # Teach mr to run a few git and svn specific commands. svn_cleanup = svn cleanup "$@" git_gc = git gc "$@" -git_push = git push "$@" -svn_push = : git_tag = git tag -l svn_tag = svn ls "$(LC_ALL=C svn info . | grep -i ^URL: | cut -d ' ' -f 2 | sed -e 's/trunk/tags/')" +# I prefer to git-svn rebase to fetch +git_svn_update = git svn rebase # This hack is here because git pull stupidly outputs tag info to stderr. # Shut it up but let real errors through, for use in cron. quietupdate = mr -s -n update 3>&1 1>/dev/null 2>&3 | egrep -v '(storing tag|tag: )' || true