Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-08 03:39:35 +0400
committerJunio C Hamano <gitster@pobox.com>2013-05-08 09:38:40 +0400
commit435f39a3e8f9dc1aab786347d4a92aee3ecef56a (patch)
tree47446fe3909cb249e6b9c950c2186be11d3ae4f4 /contrib/remote-helpers/test-bzr.sh
parent3b892dc8280b3abfd10e97e1bacc8acf580980b8 (diff)
remote-bzr: fix for disappeared revisions
It's possible that the previous tip goes away, we should not assume it's always present. Fortunately we are only using it to calculate the progress to display to the user, so only that needs to be fixed. Also, add a test that triggers this issue. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/test-bzr.sh')
-rwxr-xr-xcontrib/remote-helpers/test-bzr.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index cec55f132e..d9c32f4864 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -300,4 +300,42 @@ test_expect_success 'proper bzr repo' '
test_cmp ../expected actual
'
+test_expect_success 'strip' '
+ # Do not imitate this style; always chdir inside a subshell instead
+ mkdir -p tmp && cd tmp &&
+ test_when_finished "cd .. && rm -rf tmp" &&
+
+ (
+ bzr init bzrrepo &&
+ cd bzrrepo &&
+
+ echo one >> content &&
+ bzr add content &&
+ bzr commit -m one &&
+
+ echo two >> content &&
+ bzr commit -m two
+ ) &&
+
+ git clone "bzr::$PWD/bzrrepo" gitrepo &&
+
+ (
+ cd bzrrepo &&
+ bzr uncommit --force &&
+
+ echo three >> content &&
+ bzr commit -m three &&
+
+ echo four >> content &&
+ bzr commit -m four &&
+ bzr log --line | sed -e "s/^[0-9]\+: //" > ../expected
+ ) &&
+
+ (cd gitrepo &&
+ git fetch &&
+ git log --format="%an %ad %s" --date=short origin/master > ../actual) &&
+
+ test_cmp expected actual
+'
+
test_done