fast-export: avoid importing blob marks

We want to be able to import, and then export, using the same marks, so
that we don't push things that the other side already received.

Unfortunately, fast-export doesn't store blobs in the marks, but
fast-import does. This creates a mismatch when fast export is reusing a
mark that was previously stored by fast-import.

There is no point in one tool saving blobs, and the other not, but for
now let's just check in fast-export that the objects are indeed commits.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fixup! fast-export: avoid importing blob marks
remote-testgit: fix direction of marks

Basically this is what we want:

  == pull ==

	testgit			transport-helper

	* export ->		import

	# testgit.marks		git.marks

  == push ==

	testgit			transport-helper

	* import		<- export

	# testgit.marks		git.marks

Each side should be agnostic of the other side. Because testgit.marks
(our helper marks) could be anything, not necessarily a format parsable
by fast-export or fast-import. In this test they happen to be compatible,
because we use those tools, but in the real world it would be something
compelely different. For example, they might be mapping marks to
mercurial revisions (certainly not parsable by fast-import/export).

This is what we have:

  == pull ==

	testgit			transport-helper

	* export ->		import

	# testgit.marks		git.marks

  == push ==

	testgit			transport-helper

	* import		<- export

	# git.marks		testgit.marks

The only reason this is working is that git.marks and testgit.marks are
roughly the same.

This new behavior used to not be possible before due to a bug in
fast-export, but with the bug fixed, it works fine.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-helpers: fix failure message

This is remote-testgit, not remote-hg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rename git-remote-testgit to git-remote-testpy

This script is not really exercising the remote-helper functionality,
but more the python framework for remote helpers that live in
git_remote_helpers.

It's also not a good example of how to write remote-helpers, unless you
are planning to use python, and even then you might not want to use this
framework.

So let's use a more appropriate name: git-remote-testpy.

A patch that replaces git-remote-testgit with a simpler version is on
the way.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add git-remote-testgit

This doesn't depend on python, but depends on bash; it is not making
things much worse.

Exercising the python remote helper framework is for another tool
and another test.  This is about testing the remote-helper
interface.

For now let's just copy the old remote-helpers test script, although
some of those tests don't make sense.  In addition, this script
would be able to test other features not currently being tested.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fixup! Add git-remote-testgit
remote-testgit: remove non-local tests

The simplified remote-testgit does not talk with remote repositories
and incapable of running these tests.  Remove them.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-testgit: remove irrelevant test

This was only to cover a bug that was fixed in remote-testpy not to
resurface.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-testgit: cleanup tests

We don't need a bare 'server' and an intermediary 'public'. The repos
can talk to each other directly; that's what we want to exercise.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-testgit: exercise non-default refspec feature

Unfortunately these tests fail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fixup! remote-testgit: exercise non-default refspec feature
remote-testgit: report success after an import

Doesn't make a difference for the tests, but it does for the ones
seeking reference.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fixup! remote-testgit: report success after an import
gitweb: make remote_heads config setting work

Git configuration items can not contain underscores in their section
and bottom-level variable name; the 'remote_heads' feature can not
be enabled on a per-repository basis with that name.

This changes the git-config option to be `gitweb.remoteheads` but does
not change the gitweb.conf option, to avoid backwards compatibility
issues.  We strip underscores from keys before looking through
git-config output for them.

An existing check on keynames was overly eager to reject non-word
letters, but if we ever start using three-level names, the middle
level string can contain almost anything, so fix that as well while
we are in the vicinity.

Signed-off-by: Phil Pennock <phil@apcera.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'rc/maint-complete-git-p4' into jch

Comment from Pete will need to be addressed in a follow-up patch.

* rc/maint-complete-git-p4:
  Teach git-completion about git p4
Merge branch 'sg/complete-help-undup' into jch

Will merge to 'master' in the seventh batch.

* sg/complete-help-undup:
  completion: remove 'help' duplicate from porcelain commands
Merge branch 'fc/remote-hg' into jch

New remote helper for hg.

Will merge to 'master' in the seventh batch.

* fc/remote-hg:
  remote-hg: avoid bad refs
  remote-hg: try the 'tip' if no checkout present
  remote-hg: fix compatibility with older versions of hg
  remote-hg: add missing config for basic tests
  remote-hg: the author email can be null
  remote-hg: add option to not track branches
  remote-hg: add extra author test
  remote-hg: add tests to compare with hg-git
  remote-hg: add bidirectional tests
  test-lib: avoid full path to store test results
  remote-hg: add basic tests
  remote-hg: fake bookmark when there's none
  remote-hg: add compat for hg-git author fixes
  remote-hg: add support for hg-git compat mode
  remote-hg: match hg merge behavior
  remote-hg: make sure the encoding is correct
  remote-hg: add support to push URLs
  remote-hg: add support for remote pushing
  remote-hg: add support for pushing
  Add new remote-hg transport helper
Merge branch 'fc/remote-bzr' into jch

New remote helper for bzr.

Will merge to 'master' in the seventh batch.

* fc/remote-bzr:
  remote-bzr: update working tree
  remote-bzr: add support for remote repositories
  remote-bzr: add support for pushing
  remote-bzr: add simple tests
  Add new remote-bzr transport helper
Merge branch 'bc/do-not-recurse-in-die' into jch

Will merge to 'master' in the seventh batch.

* bc/do-not-recurse-in-die:
  usage.c: detect recursion in die routines and bail out immediately