* [PATCH] git svn: should not display zombie externals
@ 2008-07-31 22:33 Eddy Petrișor
2008-07-31 22:37 ` Eddy Petrișor
0 siblings, 1 reply; 4+ messages in thread
From: Eddy Petrișor @ 2008-07-31 22:33 UTC (permalink / raw)
To: git
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.
Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
---
t/t9101-git-svn-props.sh | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index f420796..e5ab748 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -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
--
1.5.6.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] git svn: should not display zombie externals
2008-07-31 22:33 [PATCH] git svn: should not display zombie externals Eddy Petrișor
@ 2008-07-31 22:37 ` Eddy Petrișor
2008-08-12 17:05 ` Eddy Petrișor
0 siblings, 1 reply; 4+ messages in thread
From: Eddy Petrișor @ 2008-07-31 22:37 UTC (permalink / raw)
To: git
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.
Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
---
t/t9101-git-svn-props.sh | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index f420796..e5ab748 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -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
--
1.5.6.3
This one is properly formated (the previous one was a copy/paste from the output of the console).
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] git svn: should not display zombie externals
2008-07-31 22:37 ` Eddy Petrișor
@ 2008-08-12 17:05 ` Eddy Petrișor
0 siblings, 0 replies; 4+ messages in thread
From: Eddy Petrișor @ 2008-08-12 17:05 UTC (permalink / raw)
To: git
2008/8/1 Eddy Petrișor <eddy.petrisor@gmail.com>:
>
> 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.
> Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
> ---
> t/t9101-git-svn-props.sh | 23 ++++++++++++++++++++++-
> 1 files changed, 22 insertions(+), 1 deletions(-)
>
> diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
> index f420796..e5ab748 100755
> --- a/t/t9101-git-svn-props.sh
> +++ b/t/t9101-git-svn-props.sh
> @@ -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
> --
> 1.5.6.3
>
>
> This one is properly formated (the previous one was a copy/paste from the
> output of the console).
>
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/3] git-svn-externals PoC (in a sh script)
@ 2008-08-29 0:02 Eddy Petrișor
2008-08-29 0:02 ` [PATCH] git svn: should not display zombie externals Eddy Petrișor
0 siblings, 1 reply; 4+ messages in thread
From: Eddy Petrișor @ 2008-08-29 0:02 UTC (permalink / raw)
To: git
Hello,
I have started a while back working on support for svn:externals
support for git-svn, but since I'm not that satisfied with the current
status of the patch, I haven't modified git-svn itself and just left
the sh script I made as a PoC as it was.
There's still work to be done to it, but I the current version is
functional enough to be probably found useful by more people than
myself.
Current status follows:
Current functionality:
- fetches all the externals of an already svn-fetched repo
- support for svn:externals refresh
- if the location of the external has changed, the current working
copy will be placed aside and a new directory will be created
instead
- if the remote URI is the same (maybe a verison bump, there will
be a 'git svn rebase'
- remove support (useful for testing purposes or clean restarts)
- avoid zombie externals at all costs - in some repos empty
svn:externals might exist; svn ignores such externals, so git should
do the same
TODO:
- take into account the revision of an external, if it exists
- do not do deep svn cloning, to avoid legthy operations, just pull HEAD
(this actually needs changes in git-svn itself)
- use/create shallow copies to git svn repos (one revision should be enough
for most externals)
- use submodules for externals
Any comments are welcome.
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] git svn: should not display zombie externals
2008-08-29 0:02 [PATCH 0/3] git-svn-externals PoC (in a sh script) Eddy Petrișor
@ 2008-08-29 0:02 ` Eddy Petrișor
0 siblings, 0 replies; 4+ messages in thread
From: Eddy Petrișor @ 2008-08-29 0:02 UTC (permalink / raw)
To: git; +Cc: Eddy Petrișor
subversion does not process in any way empty svn:externals properties
and doesn't list them in any way; git svn externals shouldn't do that
either
Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
---
t/t9101-git-svn-props.sh | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index f420796..e174b30 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -211,7 +211,29 @@ 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 mkdir zombie &&
+ svn propset svn:externals 'externaldir file:///fake/external' zombie &&
+ svn ci -m 'added a fake svn:external' &&
+ cd .. &&
+ git-svn fetch &&
+ git-merge git-svn &&
+ git-svn show-externals | grep -q 'externaldir'
+ "
+
+test_expect_failure 'remove external' "
+ cd test_wc &&
+ svn propset svn:externals '' zombie &&
+ svn ci -m 'deleted the fake external' &&
+ cd .. &&
+ git-svn fetch &&
+ git-merge git-svn &&
+ git-svn show-externals | grep -v ^# | grep -v ^$ | grep -q -v '^/zombie'
"
test_done
--
1.5.6.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-29 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31 22:33 [PATCH] git svn: should not display zombie externals Eddy Petrișor
2008-07-31 22:37 ` Eddy Petrișor
2008-08-12 17:05 ` Eddy Petrișor
-- strict thread matches above, loose matches on Subject: below --
2008-08-29 0:02 [PATCH 0/3] git-svn-externals PoC (in a sh script) Eddy Petrișor
2008-08-29 0:02 ` [PATCH] git svn: should not display zombie externals Eddy Petrișor
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).