threads / patch / 36456

patch, 2 partsremote-helpers: graduate

Subject: [PATCH 0/2] remote-helpers: graduate

## tl;dr

8 messages between Apr 20, 2014 and Apr 21, 2014. Diffs are folded; open one to read it.

replies: 7people: 2as markdown or json

Felipe Contreras· Apr 20, 2014, 21:39 UTC · lore

There doesn't seem to be any reason to keep these remote-helpers in the contrib area.

Felipe Contreras (2):
  remote-helpers: move out of contrib
  remote-helpers: move tests out of contrib
 .gitignore                                                 |  2 ++
 Makefile                                                   |  2 ++
 contrib/remote-helpers/Makefile                            | 14 --------------
 contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py |  0
 contrib/remote-helpers/git-remote-hg => git-remote-hg.py   |  0
 t/Makefile                                                 |  8 +++++++-
 .../remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t   |  4 ++--
 .../test-hg-bidi.sh => t/remote-helpers/hg-bidi.t          |  4 ++--
 .../test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t      |  6 +++---
 contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t |  4 ++--
 10 files changed, 20 insertions(+), 24 deletions(-)
 delete mode 100644 contrib/remote-helpers/Makefile
 rename contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py (100%)
 rename contrib/remote-helpers/git-remote-hg => git-remote-hg.py (100%)
 rename contrib/remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t (98%)
 rename contrib/remote-helpers/test-hg-bidi.sh => t/remote-helpers/hg-bidi.t (97%)
 rename contrib/remote-helpers/test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t (98%)
 rename contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t (99%)
-- 
1.9.1+fc3.9.gc73078e
Felipe Contreras· Apr 20, 2014, 21:39 UTC · re: Felipe Contreras · lore

[PATCH 1/2] remote-helpers: move out of contrib

The remote-helpers in contrib/remote-helpers have proved to work, be reliable, and stable. It's time to move them out of contrib, and be distributed by default.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 .gitignore                                                 | 2 ++
 Makefile                                                   | 2 ++
 contrib/remote-helpers/test-bzr.sh                         | 2 +-
 contrib/remote-helpers/test-hg-bidi.sh                     | 2 +-
 contrib/remote-helpers/test-hg-hg-git.sh                   | 4 ++--
 contrib/remote-helpers/test-hg.sh                          | 2 +-
 contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py | 0
 contrib/remote-helpers/git-remote-hg => git-remote-hg.py   | 0
 8 files changed, 9 insertions(+), 5 deletions(-)
 rename contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py (100%)
 rename contrib/remote-helpers/git-remote-hg => git-remote-hg.py (100%)
Show changes to 8 files +9 −5

.gitignore, Makefile, contrib/remote-helpers/test-bzr.sh, contrib/remote-helpers/test-hg-bidi.sh, contrib/remote-helpers/test-hg-hg-git.sh, contrib/remote-helpers/test-hg.sh, contrib/remote-helpers/git-remote-bzr, contrib/remote-helpers/git-remote-hg

diff --git a/.gitignore b/.gitignore
index dc600f9..db5f15e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -119,11 +119,13 @@
 /git-reflog
 /git-relink
 /git-remote
+/git-remote-bzr
 /git-remote-http
 /git-remote-https
 /git-remote-ftp
 /git-remote-ftps
 /git-remote-fd
+/git-remote-hg
 /git-remote-ext
 /git-remote-testgit
 /git-remote-testpy
diff --git a/Makefile b/Makefile
index 2128ce3..fda4567 100644
--- a/Makefile
+++ b/Makefile
@@ -483,6 +483,8 @@ SCRIPT_PERL += git-send-email.perl
 SCRIPT_PERL += git-svn.perl
 
 SCRIPT_PYTHON += git-p4.py
+SCRIPT_PYTHON += git-remote-hg.py
+SCRIPT_PYTHON += git-remote-bzr.py
 
 NO_INSTALL += git-remote-testgit
 
diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index a4656ce..330b147 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -14,7 +14,7 @@ then
 	test_done
 fi
 
-if ! python -c 'import bzrlib'
+if ! "$PYTHON_PATH" -c 'import bzrlib'
 then
 	skip_all='skipping remote-bzr tests; bzr not available'
 	test_done
diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh
index d86e147..e963745 100755
--- a/contrib/remote-helpers/test-hg-bidi.sh
+++ b/contrib/remote-helpers/test-hg-bidi.sh
@@ -17,7 +17,7 @@ then
 	test_done
 fi
 
-if ! python -c 'import mercurial'
+if ! "$PYTHON_PATH" -c 'import mercurial'
 then
 	skip_all='skipping remote-hg tests; mercurial not available'
 	test_done
diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh
index b23909a..c6b4541 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/contrib/remote-helpers/test-hg-hg-git.sh
@@ -17,13 +17,13 @@ then
 	test_done
 fi
 
-if ! python -c 'import mercurial'
+if ! "$PYTHON_PATH" -c 'import mercurial'
 then
 	skip_all='skipping remote-hg tests; mercurial not available'
 	test_done
 fi
 
-if ! python -c 'import hggit'
+if ! "$PYTHON_PATH" -c 'import hggit'
 then
 	skip_all='skipping remote-hg tests; hg-git not available'
 	test_done
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index 7d90056..00b7dde 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -17,7 +17,7 @@ then
 	test_done
 fi
 
-if ! python -c 'import mercurial'
+if ! "$PYTHON_PATH" -c 'import mercurial'
 then
 	skip_all='skipping remote-hg tests; mercurial not available'
 	test_done
diff --git a/contrib/remote-helpers/git-remote-bzr b/git-remote-bzr.py
similarity index 100%
rename from contrib/remote-helpers/git-remote-bzr
rename to git-remote-bzr.py
diff --git a/contrib/remote-helpers/git-remote-hg b/git-remote-hg.py
similarity index 100%
rename from contrib/remote-helpers/git-remote-hg
rename to git-remote-hg.py
-- 
1.9.1+fc3.9.gc73078e
Felipe Contreras· Apr 20, 2014, 21:39 UTC · re: Felipe Contreras · lore

[PATCH 2/2] remote-helpers: move tests out of contrib

They should be tested by default.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/Makefile                            | 14 --------------
 t/Makefile                                                 |  8 +++++++-
 .../remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t   |  2 +-
 .../test-hg-bidi.sh => t/remote-helpers/hg-bidi.t          |  2 +-
 .../test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t      |  2 +-
 contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t |  2 +-
 6 files changed, 11 insertions(+), 19 deletions(-)
 delete mode 100644 contrib/remote-helpers/Makefile
 rename contrib/remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t (99%)
 rename contrib/remote-helpers/test-hg-bidi.sh => t/remote-helpers/hg-bidi.t (98%)
 rename contrib/remote-helpers/test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t (99%)
 rename contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t (99%)
Show changes to 10 files +11 −19

contrib/remote-helpers/Makefile, t/Makefile, contrib/remote-helpers/test-bzr.sh, t/remote-helpers/bzr.t, contrib/remote-helpers/test-hg-bidi.sh, t/remote-helpers/hg-bidi.t, contrib/remote-helpers/test-hg-hg-git.sh, t/remote-helpers/hg-hg-git.t, contrib/remote-helpers/test-hg.sh, t/remote-helpers/hg.t

diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
deleted file mode 100644
index 239161d..0000000
--- a/contrib/remote-helpers/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-TESTS := $(wildcard test*.sh)
-
-export T := $(addprefix $(CURDIR)/,$(TESTS))
-export MAKE := $(MAKE) -e
-export PATH := $(CURDIR):$(PATH)
-export TEST_LINT := test-lint-executable test-lint-shell-syntax
-
-test:
-	$(MAKE) -C ../../t $@
-
-$(TESTS):
-	$(MAKE) -C ../../t $(CURDIR)/$@
-
-.PHONY: $(TESTS)
diff --git a/t/Makefile b/t/Makefile
index 8fd1a72..818f4ed 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -14,6 +14,7 @@ RM ?= rm -f
 PROVE ?= prove
 DEFAULT_TEST_TARGET ?= test
 TEST_LINT ?= test-lint-duplicates test-lint-executable
+export TEST_DIRECTORY = $(CURDIR)
 
 ifdef TEST_OUTPUT_DIRECTORY
 TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results
@@ -29,6 +30,9 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
 TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
 TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
+TREMOTE = $(wildcard remote-helpers/*.t)
+
+T += $(TREMOTE)
 
 all: $(DEFAULT_TEST_TARGET)
 
@@ -55,7 +59,7 @@ clean: clean-except-prove-cache
 test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax
 
 test-lint-duplicates:
-	@dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \
+	@dups=`echo $(filter-out $(TREMOTE),$(T)) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \
 		test -z "$$dups" || { \
 		echo >&2 "duplicate test numbers:" $$dups; exit 1; }
 
@@ -84,6 +88,8 @@ full-svn-test:
 gitweb-test:
 	$(MAKE) $(TGITWEB)
 
+remote-helpers-test: $(TREMOTE)
+
 valgrind:
 	$(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
 
diff --git a/contrib/remote-helpers/test-bzr.sh b/t/remote-helpers/bzr.t
similarity index 99%
rename from contrib/remote-helpers/test-bzr.sh
rename to t/remote-helpers/bzr.t
index 330b147..066e326 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/t/remote-helpers/bzr.t
@@ -5,7 +5,7 @@
 
 test_description='Test remote-bzr'
 
-test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
+test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/..
 . "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON
diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/t/remote-helpers/hg-bidi.t
similarity index 98%
rename from contrib/remote-helpers/test-hg-bidi.sh
rename to t/remote-helpers/hg-bidi.t
index e963745..f6c51b0 100755
--- a/contrib/remote-helpers/test-hg-bidi.sh
+++ b/t/remote-helpers/hg-bidi.t
@@ -8,7 +8,7 @@
 
 test_description='Test bidirectionality of remote-hg'
 
-test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
+test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/..
 . "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON
diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/t/remote-helpers/hg-hg-git.t
similarity index 99%
rename from contrib/remote-helpers/test-hg-hg-git.sh
rename to t/remote-helpers/hg-hg-git.t
index c6b4541..12e2d51 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/t/remote-helpers/hg-hg-git.t
@@ -8,7 +8,7 @@
 
 test_description='Test remote-hg output compared to hg-git'
 
-test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
+test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/..
 . "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON
diff --git a/contrib/remote-helpers/test-hg.sh b/t/remote-helpers/hg.t
similarity index 99%
rename from contrib/remote-helpers/test-hg.sh
rename to t/remote-helpers/hg.t
index 00b7dde..b4f26e7 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/t/remote-helpers/hg.t
@@ -8,7 +8,7 @@
 
 test_description='Test remote-hg'
 
-test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
+test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/..
 . "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON
-- 
1.9.1+fc3.9.gc73078e
Junio C Hamano· Apr 21, 2014, 18:36 UTC · re: Felipe Contreras · lore

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 54 quoted lines
> They should be tested by default.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  contrib/remote-helpers/Makefile                            | 14 --------------
>  t/Makefile                                                 |  8 +++++++-
>  .../remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t   |  2 +-
>  .../test-hg-bidi.sh => t/remote-helpers/hg-bidi.t          |  2 +-
>  .../test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t      |  2 +-
>  contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t |  2 +-
>  6 files changed, 11 insertions(+), 19 deletions(-)
>  delete mode 100644 contrib/remote-helpers/Makefile
>  rename contrib/remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t (99%)
>  rename contrib/remote-helpers/test-hg-bidi.sh => t/remote-helpers/hg-bidi.t (98%)
>  rename contrib/remote-helpers/test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t (99%)
>  rename contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t (99%)
>
> diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
> deleted file mode 100644
> index 239161d..0000000
> --- a/contrib/remote-helpers/Makefile
> +++ /dev/null
> @@ -1,14 +0,0 @@
> -TESTS := $(wildcard test*.sh)
> -
> -export T := $(addprefix $(CURDIR)/,$(TESTS))
> -export MAKE := $(MAKE) -e
> -export PATH := $(CURDIR):$(PATH)
> -export TEST_LINT := test-lint-executable test-lint-shell-syntax
> -
> -test:
> -	$(MAKE) -C ../../t $@
> -
> -$(TESTS):
> -	$(MAKE) -C ../../t $(CURDIR)/$@
> -
> -.PHONY: $(TESTS)
> diff --git a/t/Makefile b/t/Makefile
> index 8fd1a72..818f4ed 100644
> --- a/t/Makefile
> +++ b/t/Makefile
> @@ -14,6 +14,7 @@ RM ?= rm -f
>  PROVE ?= prove
>  DEFAULT_TEST_TARGET ?= test
>  TEST_LINT ?= test-lint-duplicates test-lint-executable
> +export TEST_DIRECTORY = $(CURDIR)
>  
>  ifdef TEST_OUTPUT_DIRECTORY
>  TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results
> @@ -29,6 +30,9 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
>  T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
>  TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
>  TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
> +TREMOTE = $(wildcard remote-helpers/*.t)

This step needs a bit more work, I am afraid, to at least have these three test scripts follow the same numbering scheme. Especially given that there were recent discussions on allowing a range of tests to be run (or omitted) via notations like "5000,5020,9800-9812", not doing so now will make it harder to implement such an enhancement.

Also, I noticed that, unlike say t9801 that shows this:
    $ cd t && make T=t9801-*sh prove
    rm -f -r 'test-results'
    *** prove ***
    t9801-git-p4-branch.sh .. skipped: skipping git p4 tests; no p4 or p4d
    Files=1, Tests=0,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.00 ...
    Result: NOTESTS
these are unnecessarily noisy when refusing to run:
    $ cd t && make T=remote-helpers/bzr.t prove
    *** prove ***
    remote-helpers/bzr.t .. Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/local/buildtools/current/sitecustomize/sitecu...
        return real_import(name, globals, locals, fromlist, level)
    ImportError: No module named bzrlib
    remote-helpers/bzr.t .. skipped: skipping remote-bzr tests; bzr not available
    Files=1, Tests=0,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.02 ...
Can we squelch these expected import error messages?
Thanks.
Felipe Contreras· Apr 21, 2014, 18:53 UTC · re: Junio C Hamano · lore

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

Junio C Hamano wrote:
Show 62 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > They should be tested by default.
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> >  contrib/remote-helpers/Makefile                            | 14 --------------
> >  t/Makefile                                                 |  8 +++++++-
> >  .../remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t   |  2 +-
> >  .../test-hg-bidi.sh => t/remote-helpers/hg-bidi.t          |  2 +-
> >  .../test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t      |  2 +-
> >  contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t |  2 +-
> >  6 files changed, 11 insertions(+), 19 deletions(-)
> >  delete mode 100644 contrib/remote-helpers/Makefile
> >  rename contrib/remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t (99%)
> >  rename contrib/remote-helpers/test-hg-bidi.sh => t/remote-helpers/hg-bidi.t (98%)
> >  rename contrib/remote-helpers/test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t (99%)
> >  rename contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t (99%)
> >
> > diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
> > deleted file mode 100644
> > index 239161d..0000000
> > --- a/contrib/remote-helpers/Makefile
> > +++ /dev/null
> > @@ -1,14 +0,0 @@
> > -TESTS := $(wildcard test*.sh)
> > -
> > -export T := $(addprefix $(CURDIR)/,$(TESTS))
> > -export MAKE := $(MAKE) -e
> > -export PATH := $(CURDIR):$(PATH)
> > -export TEST_LINT := test-lint-executable test-lint-shell-syntax
> > -
> > -test:
> > -	$(MAKE) -C ../../t $@
> > -
> > -$(TESTS):
> > -	$(MAKE) -C ../../t $(CURDIR)/$@
> > -
> > -.PHONY: $(TESTS)
> > diff --git a/t/Makefile b/t/Makefile
> > index 8fd1a72..818f4ed 100644
> > --- a/t/Makefile
> > +++ b/t/Makefile
> > @@ -14,6 +14,7 @@ RM ?= rm -f
> >  PROVE ?= prove
> >  DEFAULT_TEST_TARGET ?= test
> >  TEST_LINT ?= test-lint-duplicates test-lint-executable
> > +export TEST_DIRECTORY = $(CURDIR)
> >  
> >  ifdef TEST_OUTPUT_DIRECTORY
> >  TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results
> > @@ -29,6 +30,9 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
> >  T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
> >  TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
> >  TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
> > +TREMOTE = $(wildcard remote-helpers/*.t)
> 
> This step needs a bit more work, I am afraid, to at least have these
> three test scripts follow the same numbering scheme.  Especially given
> that there were recent discussions on allowing a range of tests to
> be run (or omitted) via notations like "5000,5020,9800-9812", not
> doing so now will make it harder to implement such an enhancement.

I don't see how such an enhancement would be beneficial to these remote helpers. For starters there aren't any number rages left for them, which is the reason why I created a new directory and handled them in a special way.

There might be other practical reasons to use this numbering scheme (although I'm sure the scripts could be fixed to not assume those), so I'm OK with having numbers _for now_, but the range namespace should be different from t/t*.sh; it should start from 0, since this is a different directory. That would probably require updating the scripts anyway, so I'm not sure what would be the benefit of this numbering scheme.

Show 22 quoted lines
> Also, I noticed that, unlike say t9801 that shows this:
> 
>     $ cd t && make T=t9801-*sh prove
>     rm -f -r 'test-results'
>     *** prove ***
>     t9801-git-p4-branch.sh .. skipped: skipping git p4 tests; no p4 or p4d
>     Files=1, Tests=0,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.00 ...
>     Result: NOTESTS
> 
> these are unnecessarily noisy when refusing to run:
> 
>     $ cd t && make T=remote-helpers/bzr.t prove
>     *** prove ***
>     remote-helpers/bzr.t .. Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "/usr/local/buildtools/current/sitecustomize/sitecu...
>         return real_import(name, globals, locals, fromlist, level)
>     ImportError: No module named bzrlib
>     remote-helpers/bzr.t .. skipped: skipping remote-bzr tests; bzr not available
>     Files=1, Tests=0,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.02 ...
> 
> Can we squelch these expected import error messages?
Sure:
if ! "$PYTHON_PATH" -c 'import bzrlib' > /dev/null 2>&1
-- 
Felipe Contreras
Junio C Hamano· Apr 21, 2014, 19:24 UTC · re: Felipe Contreras · lore

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 8 quoted lines
>> This step needs a bit more work, I am afraid, to at least have these
>> three test scripts follow the same numbering scheme.  Especially given
>> that there were recent discussions on allowing a range of tests to
>> be run (or omitted) via notations like "5000,5020,9800-9812", not
>> doing so now will make it harder to implement such an enhancement.
>
> I don't see how such an enhancement would be beneficial to these remote
> helpers.

Why are remote helpers more special than other parts of the system? Do they _have to_ be different and special?

> For starters there aren't any number rages left for them,...

Wouldn't "5 - the pull and exporting" be an obvious space for them, especiall somewhere after 5800?

> There might be other practical reasons to use this numbering scheme (although
> I'm sure the scripts could be fixed to not assume those),...
;-)  Yes, as long as you can program it, anything is possible.
>> Can we squelch these expected import error messages?
>
> Sure:

Then I'd expect a reroll, at least to 2/2 (I do not think I saw anything iffy in 1/2).

Thanks.
Felipe Contreras· Apr 21, 2014, 19:23 UTC · re: Junio C Hamano · lore

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

Junio C Hamano wrote:
Show 12 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> >> This step needs a bit more work, I am afraid, to at least have these
> >> three test scripts follow the same numbering scheme.  Especially given
> >> that there were recent discussions on allowing a range of tests to
> >> be run (or omitted) via notations like "5000,5020,9800-9812", not
> >> doing so now will make it harder to implement such an enhancement.
> >
> > I don't see how such an enhancement would be beneficial to these remote
> > helpers.
> 
> Why are remote helpers more special than other parts of the system?
They aren't.
> Do they _have to_ be different and special?
No.
 
> > For starters there aren't any number rages left for them,...
> 
> Wouldn't "5 - the pull and exporting" be an obvious space for them,
> especiall somewhere after 5800?

Not _that_ obvious. If you are OK with having the hg-hg-git test (a test which requires hg-git, a tool that is completely independent from git-remote-hg) there, then fine.

-- 
Felipe Contreras
Junio C Hamano· Apr 21, 2014, 18:06 UTC · re: Felipe Contreras · lore

Re: [PATCH 0/2] remote-helpers: graduate

Felipe Contreras <felipe.contreras@gmail.com> writes:
> There doesn't seem to be any reason to keep these remote-helpers in the contrib
> area.
Yay.

I wouldn't phrase it "doesn't seem to be any reason", though. The decision to include is not done due to lack of negatives, but because adding them would be useful.

And I think for these two, it holds true---people seem to have been experimenting with them and getting good results with occasional bug reports that are addressed in a reasonable promptness.

Will queue.
Show 22 quoted lines
> Felipe Contreras (2):
>   remote-helpers: move out of contrib
>   remote-helpers: move tests out of contrib
>
>  .gitignore                                                 |  2 ++
>  Makefile                                                   |  2 ++
>  contrib/remote-helpers/Makefile                            | 14 --------------
>  contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py |  0
>  contrib/remote-helpers/git-remote-hg => git-remote-hg.py   |  0
>  t/Makefile                                                 |  8 +++++++-
>  .../remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t   |  4 ++--
>  .../test-hg-bidi.sh => t/remote-helpers/hg-bidi.t          |  4 ++--
>  .../test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t      |  6 +++---
>  contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t |  4 ++--
>  10 files changed, 20 insertions(+), 24 deletions(-)
>  delete mode 100644 contrib/remote-helpers/Makefile
>  rename contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py (100%)
>  rename contrib/remote-helpers/git-remote-hg => git-remote-hg.py (100%)
>  rename contrib/remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t (98%)
>  rename contrib/remote-helpers/test-hg-bidi.sh => t/remote-helpers/hg-bidi.t (97%)
>  rename contrib/remote-helpers/test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t (98%)
>  rename contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t (99%)

← back to recent threads