git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] svn: Add && to t9107-git-svn-migrarte.sh

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 10, 2009, 08:32 UTC
Message-ID
<20090810083234.GA8698@dcvr.yhbt.net>
In-Reply-To
<20090806212841.GA13437@dcvr.yhbt.net>
Eric Wong <normalperson@yhbt.net> wrote:
Show 10 quoted lines
> Adam Brewster <adambrewster@gmail.com> wrote:
> > It was probably intended for the test to fail unless all of the
> > commands succeed.
> 
> I think you've uncovered some major breakage in this test that never got
> noticed until now.  I'll try to take a harder look tonight or this
> weekend.
> 
> Fortunately, this functionality is rarely needed these days :)
> Thanks for the heads up!

Actually, the test should look like this, I'll push it out along with the other one in a few.

>From 4ebe6e92c3b62d5192b6cc8158fde701bf2c0dcb Mon Sep 17 00:00:00 2001
From: Adam Brewster <adambrewster@gmail.com>
Date: Mon, 3 Aug 2009 21:40:37 -0400
Subject: [PATCH] svn: Add && to t9107-git-svn-migrate.sh

It was probably intended for the test to fail unless all of the commands succeed.

[ew: fixed tests to actually work]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 t/t9107-git-svn-migrate.sh |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh
index 3a9e077..c0098d9 100755
--- a/t/t9107-git-svn-migrate.sh
+++ b/t/t9107-git-svn-migrate.sh
@@ -56,7 +56,15 @@ test_expect_success 'initialize a multi-repository repo' '
 	git config --add svn-remote.svn.fetch "branches/b:refs/remotes/b" &&
 	for i in tags/0.1 tags/0.2 tags/0.3; do
 		git config --add svn-remote.svn.fetch \
-		                 $i:refs/remotes/$i || exit 1; done
+		                 $i:refs/remotes/$i || exit 1; done &&
+	git config --get-all svn-remote.svn.fetch > fetch.out &&
+	grep "^trunk:refs/remotes/trunk$" fetch.out &&
+	grep "^branches/a:refs/remotes/a$" fetch.out &&
+	grep "^branches/b:refs/remotes/b$" fetch.out &&
+	grep "^tags/0\.1:refs/remotes/tags/0\.1$" fetch.out &&
+	grep "^tags/0\.2:refs/remotes/tags/0\.2$" fetch.out &&
+	grep "^tags/0\.3:refs/remotes/tags/0\.3$" fetch.out &&
+	grep "^:refs/${remotes_git_svn}" fetch.out
 	'
 
 # refs should all be different, but the trees should all be the same:
@@ -86,14 +94,14 @@ test_expect_success 'migrate --minimize on old inited layout' '
 		echo "$svnrepo"$path > "$GIT_DIR"/svn/$ref/info/url ) || exit 1;
 	done &&
 	git svn migrate --minimize &&
-	test -z "`git config -l |grep -v "^svn-remote\.git-svn\."`" &&
+	test -z "`git config -l | grep "^svn-remote\.git-svn\."`" &&
 	git config --get-all svn-remote.svn.fetch > fetch.out &&
 	grep "^trunk:refs/remotes/trunk$" fetch.out &&
 	grep "^branches/a:refs/remotes/a$" fetch.out &&
 	grep "^branches/b:refs/remotes/b$" fetch.out &&
 	grep "^tags/0\.1:refs/remotes/tags/0\.1$" fetch.out &&
 	grep "^tags/0\.2:refs/remotes/tags/0\.2$" fetch.out &&
-	grep "^tags/0\.3:refs/remotes/tags/0\.3$" fetch.out
+	grep "^tags/0\.3:refs/remotes/tags/0\.3$" fetch.out &&
 	grep "^:refs/${remotes_git_svn}" fetch.out
 	'
 
-- 
Eric Wong
Previous: Eric WongNext: Adam Brewster
Message 7 of 12 in “svn manipulate refs ourside refs/remotes”
  1. svn manipulate refs ourside refs/remotesAdam Brewster, Aug 4, 2009
  2. svn: Add && to t9107-git-svn-migrarte.shAdam Brewster, Aug 4, 2009
  3. svn: Honor --prefix option in init without --stdlayoutAdam Brewster, Aug 4, 2009
  4. svn: allow git-svn to update remotes outside of refs/remotesAdam Brewster, Aug 4, 2009
  5. Eric WongAug 10, 2009
  6. Eric WongAug 6, 2009
  7. Eric WongAug 10, 2009
  8. Adam BrewsterAug 12, 2009
  9. svn: allow branches outside of refs/remotesAdam Brewster, Aug 12, 2009
  10. Eric WongAug 12, 2009
  11. Adam BrewsterAug 13, 2009
  12. Eric WongAug 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.