Re: [PATCH v2 0/9] remote-hg, remote-bzr fixes

2013-11-12 Thread Junio C Hamano
Richard Hansen rhan...@bbn.com writes:

 A handful of fixes for the git-remote-hg and git-remote-bzr remote
 helpers and their unit tests.

Thanks; could you arrange with Felipe so that we can have
Acked-by: or Reviewed-by: after your Signed-off-by: lines
of these patches?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2 0/9] remote-hg, remote-bzr fixes

2013-11-12 Thread Felipe Contreras
Richard Hansen wrote:
 A handful of fixes for the git-remote-hg and git-remote-bzr remote
 helpers and their unit tests.

I'm OK with the whole series.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/9] remote-hg, remote-bzr fixes

2013-11-11 Thread Richard Hansen
A handful of fixes for the git-remote-hg and git-remote-bzr remote
helpers and their unit tests.

Changes from v1:

diff --git a/contrib/remote-helpers/test-bzr.sh 
b/contrib/remote-helpers/test-bzr.sh
index ea597b0..1e53ff9 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -5,8 +5,8 @@
 
 test_description='Test remote-bzr'
 
-cd ${0%/*}/../../t || exit 1
-. ./test-lib.sh
+test -n $TEST_DIRECTORY || TEST_DIRECTORY=${0%/*}/../../t
+. $TEST_DIRECTORY/test-lib.sh
 
 if ! test_have_prereq PYTHON
 then
@@ -28,9 +28,6 @@ check () {
 
 bzr whoami A U Thor aut...@example.com
 
-# silence warnings
-git config --global push.default simple
-
 test_expect_success 'cloning' '
(
bzr init bzrrepo 
@@ -382,7 +379,7 @@ test_expect_success 'export utf-8 authors' '
git add content 
git commit -m one 
git remote add bzr bzr::../bzrrepo 
-   git push -u bzr master
+   git push bzr master
) 
 
(
diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index 9f5066b..347e812 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -8,8 +8,8 @@
 
 test_description='Test remote-hg'
 
-cd ${0%/*}/../../t || exit 1
-. ./test-lib.sh
+test -n $TEST_DIRECTORY || TEST_DIRECTORY=${0%/*}/../../t
+. $TEST_DIRECTORY/test-lib.sh
 
 if ! test_have_prereq PYTHON
 then
@@ -102,9 +102,6 @@ setup () {
GIT_AUTHOR_DATE=2007-01-01 00:00:00 +0230 
GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE 
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
-
-   # silence warnings
-   git config --global push.default simple
 }
 
 setup
@@ -210,16 +207,16 @@ test_expect_success 'authors' '
../expected 
author_test alpha  H G Wells we...@example.com 
author_test beta beta beta unknown 
-   author_test beta beta t...@example.com (comment) beta 
t...@example.com 
-   author_test gamma ga...@example.com Unknown ga...@example.com 
-   author_test delta deltat...@example.com delta t...@example.com 

-   author_test epsilon epsilon t...@example.com epsilon 
t...@example.com 
-   author_test zeta  zeta  zeta unknown 
-   author_test eta eta  t...@example.com  eta t...@example.com 
-   author_test theta theta t...@example.com theta t...@example.com 

-   author_test iota iota  test at example dot com iota unknown 

-   author_test kappa ka...@example.com Unknown ka...@example.com 
-   author_test lambda lambda.lam...@example.com Unknown 
lambda.lam...@example.com
+   author_test gamma gamma t...@example.com (comment) gamma 
t...@example.com 
+   author_test delta de...@example.com Unknown de...@example.com 
+   author_test epsilon epsilont...@example.com epsilon 
t...@example.com 
+   author_test zeta zeta t...@example.com zeta t...@example.com 
+   author_test eta  eta  eta unknown 
+   author_test theta theta  t...@example.com  theta 
t...@example.com 
+   author_test iota iota t...@example.com iota t...@example.com 
+   author_test kappa kappa  test at example dot com kappa 
unknown 
+   author_test lambda lam...@example.com Unknown lam...@example.com 

+   author_test mu mu...@example.com Unknown mu...@example.com
) 
 
git clone hg::hgrepo gitrepo 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b25249e..af172d9 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -26,6 +26,10 @@ then
# outside of t/, e.g. for running tests on the test library
# itself.
TEST_DIRECTORY=$(pwd)
+else
+   # ensure that TEST_DIRECTORY is an absolute path so that it
+   # works even if the current working directory is changed
+   TEST_DIRECTORY=$(cd $TEST_DIRECTORY  pwd) || exit 1
 fi
 if test -z $TEST_OUTPUT_DIRECTORY
 then

Richard Hansen (9):
  remote-hg:  don't decode UTF-8 paths into Unicode objects
  test-lib.sh: convert $TEST_DIRECTORY to an absolute path
  test-bzr.sh, test-hg.sh: allow running from any dir
  test-bzr.sh, test-hg.sh: prepare for change to push.default=simple
  test-hg.sh: eliminate 'local' bashism
  test-hg.sh: avoid obsolete 'test' syntax
  test-hg.sh: fix duplicate content strings in author tests
  test-hg.sh: help user correlate verbose output with email test
  remote-bzr, remote-hg: fix email address regular expression

 contrib/remote-helpers/git-remote-bzr |  7 +++
 contrib/remote-helpers/git-remote-hg  |  9 -
 contrib/remote-helpers/test-bzr.sh|  5 +++--
 contrib/remote-helpers/test-hg.sh | 30 --
 t/test-lib.sh |  4 
 5 files changed, 30 insertions(+), 25 deletions(-)

-- 
1.8.5.rc1.208.g8ff7964

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html