git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: git@vger.kernel.org
Cc: seth@hand.yhbt.net, Eric Wong <normalperson@yhbt.net>
Subject: [RFC/PATCH 2/2] git-svn: rename 'commit' command to 'set-tree'
Date: Fri, 15 Dec 2006 23:58:08 -0800	[thread overview]
Message-ID: <11662558902535-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <m28xh8amxa.fsf@ziti.local>

'set-tree' probably accurately describes what the command
formerly known as 'commit' does.

I'm not entirely sure that 'dcommit' should be renamed to 'commit'
just yet...  Perhaps 'push' or 'push-changes'?

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 Documentation/git-svn.txt     |   20 ++++++++++----------
 git-svn.perl                  |   12 ++++++------
 t/t9100-git-svn-basic.sh      |   22 +++++++++++-----------
 t/t9101-git-svn-props.sh      |    2 +-
 t/t9102-git-svn-deep-rmdir.sh |    2 +-
 5 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index c589a98..f5f57e8 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -64,7 +64,7 @@ manually joining branches on commit.
 	against the latest changes in the SVN repository.
 	An optional command-line argument may be specified as an
 	alternative to HEAD.
-	This is advantageous over 'commit' (below) because it produces
+	This is advantageous over 'set-tree' (below) because it produces
 	cleaner, more linear history.
 
 'log'::
@@ -89,7 +89,7 @@ manually joining branches on commit.
 
 	Any other arguments are passed directly to `git log'
 
-'commit'::
+'set-tree'::
 	You should consider using 'dcommit' instead of this command.
 	Commit specified commit or tree objects to SVN.  This relies on
 	your imported fetch data being up-to-date.  This makes
@@ -172,7 +172,7 @@ This can allow you to make partial mirrors when running fetch.
 -::
 --stdin::
 
-Only used with the 'commit' command.
+Only used with the 'set-tree' command.
 
 Read a list of commits from stdin and commit them in reverse
 order.  Only the leading sha1 is read from each line, so
@@ -180,7 +180,7 @@ git-rev-list --pretty=oneline output can be used.
 
 --rmdir::
 
-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
 
 Remove directories from the SVN tree if there are no files left
 behind.  SVN can version empty directories, and they are not
@@ -193,7 +193,7 @@ repo-config key: svn.rmdir
 -e::
 --edit::
 
-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
 
 Edit the commit message before committing to SVN.  This is off by
 default for objects that are commits, and forced on when committing
@@ -204,7 +204,7 @@ repo-config key: svn.edit
 -l<num>::
 --find-copies-harder::
 
-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
 
 They are both passed directly to git-diff-tree see
 gitlink:git-diff-tree[1] for more information.
@@ -276,7 +276,7 @@ ADVANCED OPTIONS
 
 -b<refname>::
 --branch <refname>::
-Used with 'fetch', 'dcommit' or 'commit'.
+Used with 'fetch', 'dcommit' or 'set-tree'.
 
 This can be used to join arbitrary git branches to remotes/git-svn
 on new commits where the tree object is equivalent.
@@ -392,11 +392,11 @@ REBASE VS. PULL
 ---------------
 
 Originally, git-svn recommended that the remotes/git-svn branch be
-pulled from.  This is because the author favored 'git-svn commit B'
-to commit a single head rather than the 'git-svn commit A..B' notation
+pulled from.  This is because the author favored 'git-svn set-tree B'
+to commit a single head rather than the 'git-svn set-tree A..B' notation
 to commit multiple commits.
 
-If you use 'git-svn commit A..B' to commit several diffs and you do not
+If you use 'git-svn set-tree A..B' to commit several diffs and you do not
 have the latest remotes/git-svn merged into my-branch, you should use
 'git rebase' to update your work branch instead of 'git pull'.  'pull'
 can cause non-linear history to be flattened when committing into SVN,
diff --git a/git-svn.perl b/git-svn.perl
index 077e920..07748bc 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -107,7 +107,12 @@ my %cmd = (
 	init => [ \&init, "Initialize a repo for tracking" .
 			  " (requires URL argument)",
 			  \%init_opts ],
-	commit => [ \&commit, "Commit git revisions to SVN",
+	dcommit => [ \&dcommit, 'Commit several diffs to merge with upstream',
+			{ 'merge|m|M' => \$_merge,
+			  'strategy|s=s' => \$_strategy,
+			  'dry-run|n' => \$_dry_run,
+			%cmt_opts } ],
+	'set-tree' => [ \&commit, "Set an SVN repository to a git tree-ish",
 			{	'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
 	'show-ignore' => [ \&show_ignore, "Show svn:ignore listings",
 			{ 'revision|r=i' => \$_revision } ],
@@ -150,11 +155,6 @@ my %cmd = (
 			  'file|F=s' => \$_file,
 			  'revision|r=s' => \$_revision,
 			%cmt_opts } ],
-	dcommit => [ \&dcommit, 'Commit several diffs to merge with upstream',
-			{ 'merge|m|M' => \$_merge,
-			  'strategy|s=s' => \$_strategy,
-			  'dry-run|n' => \$_dry_run,
-			%cmt_opts } ],
 );
 
 my $cmd;
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 0fc462e..0edf19e 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -56,7 +56,7 @@ git update-index --add --remove dir/a/b/c/d/e/file dir/file file
 git commit -m "$name"
 
 test_expect_success "$name" \
-    "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch &&
+    "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch &&
      svn up $SVN_TREE &&
      test -d $SVN_TREE/dir && test ! -d $SVN_TREE/dir/a"
 
@@ -70,7 +70,7 @@ git update-index --add dir/file/file
 git commit -m "$name"
 
 test_expect_failure "$name" \
-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch' \
+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch' \
     || true
 
 
@@ -85,7 +85,7 @@ git update-index --add -- bar
 git commit -m "$name"
 
 test_expect_failure "$name" \
-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch2' \
+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch2' \
     || true
 
 
@@ -100,7 +100,7 @@ git-update-index --add bar/zzz/yyy
 git commit -m "$name"
 
 test_expect_failure "$name" \
-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch3' \
+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch3' \
     || true
 
 
@@ -115,7 +115,7 @@ git update-index --add -- dir
 git commit -m "$name"
 
 test_expect_failure "$name" \
-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch4' \
+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch4' \
     || true
 
 
@@ -127,7 +127,7 @@ git update-index exec.sh
 git commit -m "$name"
 
 test_expect_success "$name" \
-    "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+    "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
      svn up $SVN_TREE &&
      test ! -x $SVN_TREE/exec.sh"
 
@@ -138,7 +138,7 @@ git update-index exec.sh
 git commit -m "$name"
 
 test_expect_success "$name" \
-    "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+    "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
      svn up $SVN_TREE &&
      test -x $SVN_TREE/exec.sh"
 
@@ -153,7 +153,7 @@ then
 	git commit -m "$name"
 
 	test_expect_success "$name" \
-	    "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+	    "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
 	     svn up $SVN_TREE &&
 	     test -L $SVN_TREE/exec.sh"
 
@@ -164,7 +164,7 @@ then
 	git commit -m "$name"
 
 	test_expect_success "$name" \
-	    "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+	    "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
 	     svn up $SVN_TREE &&
 	     test -x $SVN_TREE/bar/zzz &&
 	     test -L $SVN_TREE/exec-2.sh"
@@ -177,7 +177,7 @@ then
 	git commit -m "$name"
 
 	test_expect_success "$name" \
-	    "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+	    "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
 	     svn up $SVN_TREE &&
 	     test -f $SVN_TREE/exec-2.sh &&
 	     test ! -L $SVN_TREE/exec-2.sh &&
@@ -192,7 +192,7 @@ then
 	git update-index exec-2.sh
 	git commit -m 'éï∏'
 	export LC_ALL="$GIT_SVN_LC_ALL"
-	test_expect_success "$name" "git-svn commit HEAD"
+	test_expect_success "$name" "git-svn set-tree HEAD"
 	unset LC_ALL
 else
 	echo "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index a5a235f..5543b07 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -74,7 +74,7 @@ test_expect_success "$name" \
 	'git checkout -b mybranch remotes/git-svn &&
 	echo Hi again >> kw.c &&
 	git commit -a -m "test keywoards ignoring" &&
-	git-svn commit remotes/git-svn..mybranch &&
+	git-svn set-tree remotes/git-svn..mybranch &&
 	git pull . remotes/git-svn'
 
 expect='/* $Id$ */'
diff --git a/t/t9102-git-svn-deep-rmdir.sh b/t/t9102-git-svn-deep-rmdir.sh
index d693d18..572aaed 100755
--- a/t/t9102-git-svn-deep-rmdir.sh
+++ b/t/t9102-git-svn-deep-rmdir.sh
@@ -21,7 +21,7 @@ test_expect_success 'mirror via git-svn' "
 test_expect_success 'Try a commit on rmdir' "
 	git rm -f deeply/nested/directory/number/2/another &&
 	git commit -a -m 'remove another' &&
-	git-svn commit --rmdir HEAD &&
+	git-svn set-tree --rmdir HEAD &&
 	svn ls -R $svnrepo | grep ^deeply/nested/directory/number/1
 	"
 
-- 
1.4.4.2.g0817

  parent reply	other threads:[~2006-12-16  7:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 20:21 [RFC] requiring Perl SVN libraries for git-svn Eric Wong
2006-12-13 21:17 ` Randal L. Schwartz
2006-12-15 16:02 ` Seth Falcon
2006-12-15 18:44 ` Eric Wong
2006-12-15 21:06   ` Seth Falcon
2006-12-16  7:58     ` [RFC/PATCH 1/2] git-svn: remove support for the svn command-line client Eric Wong
2006-12-16  7:58     ` Eric Wong [this message]
2006-12-16 13:26       ` [RFC/PATCH 2/2] git-svn: rename 'commit' command to 'set-tree' Junio C Hamano
2006-12-16 21:44         ` Eric Wong

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=11662558902535-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=seth@hand.yhbt.net \
    /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://80x24.org/mirrors/git.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).