Skip to contentSkip to conversation

git svn: should not display zombie externals

PATCH New Eddy Petrișor 1 participant 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git svn: should not display zombie externals

during the history of a repo a svn:external could be added and later removed; such externals shouldn't be displayed since only the current state is relevant

I have encountered the broken behaviour on a git-svn repo with the svn origin a repo served via https (git 1:1.5.6-1~bpo40+1 from Debian Etch backports.) I hope this bug doesn't have to do with the svn repo being served via https.

---
 t/t9101-git-svn-props.sh |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)
t/t9101-git-svn-props.sh +22 -1
index f420796..e5ab748 100755
@@ -211,7 +211,28 @@ EOF
 
 test_expect_success 'test proplist' "
 	git-svn proplist . | cmp - prop.expect &&
-	git-svn proplist nested/directory/.keep | cmp - prop2.expect
+	git-svn proplist nested/directory/.keep | cmp - prop2.expect &&
+	cd ..
+	"
+
+test_expect_success 'show external' "
+	cd test_wc &&
+		svn propset svn:externals 'zombie file:///fake/external' . &&
+		svn ci -m 'added a fake svn:external' &&
+	cd .. &&
+	git-svn fetch &&
+	git-merge git-svn &&
+	git-svn show-externals | grep -q 'zombie'
+	"
+
+test_expect_success 'remove external' "
+	cd test_wc &&
+		svn propdel svn:externals . &&
+		svn ci -m 'deleted the fake external' &&
+	cd .. &&
+	git-svn fetch &&
+	git-merge git-svn &&
+	git-svn show-externals | grep -q -v 'zombie'
 	"
 
 test_done
Signature · 1 line
1.5.6.3
#1 lore raw

PATCH 1/1 git svn: should not display zombie externals

during the history of a repo a svn:external could be added and later removed; such externals shouldn't be displayed since only the current state is relevant

I have encountered the broken behaviour on a git-svn repo with the svn origin a repo served via https (git 1:1.5.6-1~bpo40+1 from Debian Etch backports.) I hope this bug doesn't have to do with the svn repo being served via https.

---
 t/t9101-git-svn-props.sh |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)
t/t9101-git-svn-props.sh +22 -1
index f420796..e5ab748 100755
@@ -211,7 +211,28 @@ EOF
 
 test_expect_success 'test proplist' "
 	git-svn proplist . | cmp - prop.expect &&
-	git-svn proplist nested/directory/.keep | cmp - prop2.expect
+	git-svn proplist nested/directory/.keep | cmp - prop2.expect &&
+	cd ..
+	"
+
+test_expect_success 'show external' "
+	cd test_wc &&
+		svn propset svn:externals 'zombie file:///fake/external' . &&
+		svn ci -m 'added a fake svn:external' &&
+	cd .. &&
+	git-svn fetch &&
+	git-merge git-svn &&
+	git-svn show-externals | grep -q 'zombie'
+	"
+
+test_expect_success 'remove external' "
+	cd test_wc &&
+		svn propdel svn:externals . &&
+		svn ci -m 'deleted the fake external' &&
+	cd .. &&
+	git-svn fetch &&
+	git-merge git-svn &&
+	git-svn show-externals | grep -q -v 'zombie'
 	"
 
 test_done
Signature · 4 lines
1.5.6.3


This one is properly formated (the previous one was a copy/paste from the output of the console).
#2 lore raw

2008/8/1 Eddy Petrișor <[email protected]>:

Quoted 9 lines

during the history of a repo a svn:external could be added and later removed; such externals shouldn't be displayed since only the current state is relevant

I have encountered the broken behaviour on a git-svn repo with the svn origin a repo served via https (git 1:1.5.6-1~bpo40+1 from Debian Etch backports.) I hope this bug doesn't have to do with the svn repo being served via https.

I have finally found the root of this breakage. It seems that the older versions of subversion allowed a svn:external property to be empty, thus generating the zombie externals. Newer versions of subversion (I checked this with 1.4.2 (r22196) from Debian Etch) do not allow such empty svn:externals.

Quoted 47 lines
---
 t/t9101-git-svn-props.sh |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)
t/t9101-git-svn-props.sh +7 -1
index f420796..e5ab748 100755
@@ -211,7 +211,28 @@ EOF
 
 test_expect_success 'test proplist' "
       git-svn proplist . | cmp - prop.expect &&
-       git-svn proplist nested/directory/.keep | cmp - prop2.expect
+       git-svn proplist nested/directory/.keep | cmp - prop2.expect &&
+       cd ..
+       "
+
+test_expect_success 'show external' "
+       cd test_wc &&
+               svn propset svn:externals 'zombie file:///fake/external' .

&&

t/t9101-git-svn-props.sh +15 -1
+               svn ci -m 'added a fake svn:external' &&
+       cd .. &&
+       git-svn fetch &&
+       git-merge git-svn &&
+       git-svn show-externals | grep -q 'zombie'
+       "
+
+test_expect_success 'remove external' "
+       cd test_wc &&
+               svn propdel svn:externals . &&
+               svn ci -m 'deleted the fake external' &&
+       cd .. &&
+       git-svn fetch &&
+       git-merge git-svn &&
+       git-svn show-externals | grep -q -v 'zombie'
       "
 
 test_done
--

1.5.6.3

This one is properly formated (the previous one was a copy/paste from the output of the console).

Signature · 4 lines
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein