git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santhosh <santhoshmani@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH/BUG] git-svn: add test for renamed directory fetch
Date: Thu, 3 Apr 2008 19:17:21 +0530	[thread overview]
Message-ID: <3bc895b00804030647o652e432cqb5a90eafbac906b2@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]

This test tries to fetch a directory which had renames in the history from a
SVN repository.
---
 t/t9121-git-svn-fetch-renamed-dir.sh |   23 +++++++++
 t/t9121/renamed-dir.dump             |   90 ++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100755 t/t9121-git-svn-fetch-renamed-dir.sh
 create mode 100644 t/t9121/renamed-dir.dump

diff --git a/t/t9121-git-svn-fetch-renamed-dir.sh
b/t/t9121-git-svn-fetch-renamed-dir.sh
new file mode 100755
index 0000000..5cd65a6
--- /dev/null
+++ b/t/t9121-git-svn-fetch-renamed-dir.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Santhosh Kumar Mani
+
+
+test_description='git-svn can fetch renamed directories'
+
+. ./lib-git-svn.sh
+
+test_expect_success 'load repository with renamed directory' "
+	svnadmin load -q $rawsvnrepo < ../t9121/renamed-dir.dump &&
+	start_httpd
+	"
+
+test_expect_success 'init and fetch repository' "
+	git svn init $svnrepo/newname &&
+	git svn fetch
+	"
+
+stop_httpd
+
+test_done
+
diff --git a/t/t9121/renamed-dir.dump b/t/t9121/renamed-dir.dump
new file mode 100644
index 0000000..5f9127b
--- /dev/null
+++ b/t/t9121/renamed-dir.dump
@@ -0,0 +1,90 @@
+SVN-fs-dump-format-version: 2
+
+UUID: 06b9b3ad-f546-4fbe-8328-fcb4e6ef5c3f
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2008-04-02T09:11:59.778557Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 117
+Content-length: 117
+
+K 7
+svn:log
+V 14
+initial import
+K 10
+svn:author
+V 8
+santhosh
+K 8
+svn:date
+V 27
+2008-04-02T09:13:03.170863Z
+PROPS-END
+
+Node-path: name
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: name/a.txt
+Node-kind: file
+Node-action: add
+Prop-content-length: 71
+Text-content-length: 6
+Text-content-md5: b1946ac92492d2347c6235b4d2611184
+Content-length: 77
+
+K 13
+svn:mime-type
+V 10
+text/plain
+K 13
+svn:eol-style
+V 2
+LF
+PROPS-END
+hello
+
+
+Revision-number: 2
+Prop-content-length: 109
+Content-length: 109
+
+K 7
+svn:log
+V 7
+renamed
+K 10
+svn:author
+V 8
+santhosh
+K 8
+svn:date
+V 27
+2008-04-02T09:14:22.952186Z
+PROPS-END
+
+Node-path: newname
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 1
+Node-copyfrom-path: name
+
+
+Node-path: name
+Node-action: delete
+
+
-- 
1.5.5.rc3.dirty

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-git-svn-add-test-for-renamed-directory-fetch.patch --]
[-- Type: text/x-patch; name=0001-git-svn-add-test-for-renamed-directory-fetch.patch, Size: 2568 bytes --]

From 30fa29a45be3b8c0f470c0ac55f820a48e53a938 Mon Sep 17 00:00:00 2001
From: Santhosh Kumar Mani <santhoshmani@gmail.com>
Date: Thu, 3 Apr 2008 15:40:15 +0530
Subject: [PATCH] git-svn: add test for renamed directory fetch

This test tries to fetch a directory which had renames in the history from a
SVN repository.
---
 t/t9121-git-svn-fetch-renamed-dir.sh |   23 +++++++++
 t/t9121/renamed-dir.dump             |   90 ++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100755 t/t9121-git-svn-fetch-renamed-dir.sh
 create mode 100644 t/t9121/renamed-dir.dump

diff --git a/t/t9121-git-svn-fetch-renamed-dir.sh b/t/t9121-git-svn-fetch-renamed-dir.sh
new file mode 100755
index 0000000..5cd65a6
--- /dev/null
+++ b/t/t9121-git-svn-fetch-renamed-dir.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Santhosh Kumar Mani
+
+
+test_description='git-svn can fetch renamed directories'
+
+. ./lib-git-svn.sh
+
+test_expect_success 'load repository with renamed directory' "
+	svnadmin load -q $rawsvnrepo < ../t9121/renamed-dir.dump &&
+	start_httpd
+	"
+
+test_expect_success 'init and fetch repository' "
+	git svn init $svnrepo/newname &&
+	git svn fetch
+	"
+
+stop_httpd
+
+test_done
+
diff --git a/t/t9121/renamed-dir.dump b/t/t9121/renamed-dir.dump
new file mode 100644
index 0000000..5f9127b
--- /dev/null
+++ b/t/t9121/renamed-dir.dump
@@ -0,0 +1,90 @@
+SVN-fs-dump-format-version: 2
+
+UUID: 06b9b3ad-f546-4fbe-8328-fcb4e6ef5c3f
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2008-04-02T09:11:59.778557Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 117
+Content-length: 117
+
+K 7
+svn:log
+V 14
+initial import
+K 10
+svn:author
+V 8
+santhosh
+K 8
+svn:date
+V 27
+2008-04-02T09:13:03.170863Z
+PROPS-END
+
+Node-path: name
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: name/a.txt
+Node-kind: file
+Node-action: add
+Prop-content-length: 71
+Text-content-length: 6
+Text-content-md5: b1946ac92492d2347c6235b4d2611184
+Content-length: 77
+
+K 13
+svn:mime-type
+V 10
+text/plain
+K 13
+svn:eol-style
+V 2
+LF
+PROPS-END
+hello
+
+
+Revision-number: 2
+Prop-content-length: 109
+Content-length: 109
+
+K 7
+svn:log
+V 7
+renamed
+K 10
+svn:author
+V 8
+santhosh
+K 8
+svn:date
+V 27
+2008-04-02T09:14:22.952186Z
+PROPS-END
+
+Node-path: newname
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 1
+Node-copyfrom-path: name
+
+
+Node-path: name
+Node-action: delete
+
+
-- 
1.5.5.rc3.dirty


             reply	other threads:[~2008-04-03 13:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03 13:47 Santhosh [this message]
2008-04-03 13:59 ` [PATCH/BUG] git-svn: add test for renamed directory fetch Santhosh
2008-04-07  7:08   ` [PATCH] git-svn: fix following renamed paths when tracking a single path 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

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

  git send-email \
    --in-reply-to=3bc895b00804030647o652e432cqb5a90eafbac906b2@mail.gmail.com \
    --to=santhoshmani@gmail.com \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).