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

[PATCH v2 0/1] git-svn: testcase for partial rebuild

From
Deskin Miller <deskinm@umich.edu>
Date
Sep 21, 2008, 02:45 UTC
Message-ID
<20080921024538.GB2505@riemann.deskinm.fdns.net>
In-Reply-To
<20080918063754.GA13328@untitled>
>From 45c9876a04ff0aac141300dd10fca50d6db30522 Mon Sep 17 00:00:00 2001
From: Deskin Miler <deskinm@umich.edu>
Date: Thu, 18 Sep 2008 17:55:14 -0400
Signed-off-by: Deskin Miller <deskinm@umich.edu>
---
On Wed, Sep 17, 2008 at 11:38:04PM -0700, Eric Wong wrote:
Show 14 quoted lines
> This seems to break the following test case for me:
> 
> *** t9107-git-svn-migrate.sh ***
> *   ok 1: setup old-looking metadata
> *   ok 2: git-svn-HEAD is a real HEAD
> *   ok 3: initialize old-style (v0) git svn layout
> *   ok 4: initialize a multi-repository repo
> *   ok 5: multi-fetch works on partial urls + paths
> *   ok 6: migrate --minimize on old inited layout
> * FAIL 7: .rev_db auto-converted to .rev_map.UUID
> 
> I haven't had time to diagnose it.  Also, can you add a test that
> demonstrates this functionality (and ensures things keeps working when
> future work is done on git-svn?)

Thanks for the response; I had a bug in my Perl that my testing hadn't caught. Gave me an opportunity to learn how the git testsuites work!

This testcase fails for me when applied to master, and passes with patch 1/1 in the series.

 t/t9126-git-svn-partial-rebuild.sh |   53 ++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100755 t/t9126-git-svn-partial-rebuild.sh
diff --git a/t/t9126-git-svn-partial-rebuild.sh b/t/t9126-git-svn-partial-rebuild.sh
new file mode 100755
index 0000000..9a94866
--- /dev/null
+++ b/t/t9126-git-svn-partial-rebuild.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Deskin Miller
+#
+
+test_description='git svn partial-rebuild tests'
+. ./lib-git-svn.sh
+
+test_expect_success \
+    'initialize svnrepo' '
+	mkdir import &&
+	cd import &&
+	mkdir trunk branches tags &&
+	cd trunk &&
+	echo foo > foo &&
+	cd .. &&
+	svn import -m "import for git-svn" . "$svnrepo" >/dev/null &&
+	svn copy "$svnrepo"/trunk "$svnrepo"/branches/a \
+		-m "created branch a" &&
+	cd .. &&
+	rm -rf import &&
+	svn co "$svnrepo"/trunk trunk &&
+	cd trunk &&
+	echo bar >> foo &&
+	svn ci -m "updated trunk" &&
+	cd .. &&
+	svn co "$svnrepo"/branches/a a &&
+	cd a &&
+	echo baz >> a &&
+	svn add a &&
+	svn ci -m "updated a" &&
+	cd .. &&
+	git svn init --stdlayout "$svnrepo"'
+
+test_expect_success 'import an early SVN revision into git' \
+	'git svn fetch -r1:2'
+
+test_expect_success 'make full git mirror of SVN' \
+	'mkdir mirror &&
+	cd mirror &&
+	git init &&
+	git svn init --stdlayout "$svnrepo" &&
+	git svn fetch &&
+	cd ..'
+
+test_expect_success 'fetch from git mirror and partial-rebuild' \
+	'git config --add remote.origin.url "file://$PWD/mirror/.git" &&
+	git config --add remote.origin.fetch refs/remotes/*:refs/remotes/* &&
+	git fetch origin &&
+	git svn fetch
+	'
+
+test_done
-- 
1.6.0.2.GIT
Previous: Eric WongNext: Eric Wong
Message 3 of 5 in “git-svn: do a partial rebuild if rev_map is out-of-date”
  1. git-svn: do a partial rebuild if rev_map is out-of-dateDeskin Miller, Sep 17, 2008
  2. Eric WongSep 18, 2008
  3. 0/1 git-svn: testcase for partial rebuildDeskin Miller, Sep 21, 2008
  4. Eric WongSep 22, 2008
  5. 1/1 git-svn: do a partial rebuild if rev_map is out-of-dateDeskin Miller, Sep 21, 2008

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.