remote-hg: adjust to hg 1.9

hg 1.0 changed the signature of hg.clone(). Adjust to it.

A real fix would need to check the hg version or try/catch.
git-remote-hg: add the helper

The helper uses the previously added infrastructure.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
git-remote-hg: add tests
remote-hg: Postel's law dictates we should handle Author<author@mail>

We should handle a missing space before the email part of an author ident
gracefully. See for example the icedtea6 repository.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
remote-hg: another case of Postel's law

This change allows invalid input from Mercurial repositories where the
author is recorded as 'Name <email@blah' (missing the closing '>').

With this change, importing http://scelenic.com/hg itself no longer fails
with:

	fatal: Missing > in ident string: Benoit Boissinot
	<benoit.boissinot@ens-lyon.org <none@none> 1129685868 -0700

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
remote-hg: handle another funny author line from http://scelenic.com/hg

In this case: David Soria Parra <dsp <at> php.net>.

With this last of three Postel patches, remote-hg can import the
Mercurial repository completely.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
remote-hg: do not interfer with hg's revs() method

Matt Mackall introduced a revs() method to the localrepo class on Wed
Nov 2 13:37:34 2011 in the commit 'localrepo: add revs helper method'.
It is used when constructing a commit in memory.

If we store the set of revs we want to handle under the same name, it
overrides that method, resulting in an unpleasant 'TypeError: 'set'
object is not callable' whenever we want to push (as we are constructing
commits in memory, then).

So let's work around that by renaming our field to 'revs_' and hope that
upstream Mercurial does not introduce a field of that name, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Always auto-gc after calling a fast-import transport

After importing anything with fast-import, we should always let the
garbage collector do its job, since the objects are written to disk
inefficiently.

This brings down an initial import of http://selenic.com/hg from about
230 megabytes to about 14.

In the future, we may want to make this configurable on a per-remote
basis, or maybe teach fast-import about it in the first place.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fast-export: report SHA-1 instead of gibberish when marks exist already

Cc: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
t5801: skip without hg

The tests for remote-hg require hg, so skip them all when there is no
hg available.
fix build: compat/mingw.c:1236: error: conflicting types for 'mingw_execv'
compat/../compat/mingw.h:294: note: previous declaration of 'mingw_execv' was here
make: *** [compat/mingw.o] Error 1
POSIX style 1/2
POSIX style 2/2
Rebasing merge to junio/next (830d0c2)

Previous rebasing merge: 33362bc4c7c0178b147f3daa0444deab60428d73
Fix invalid call to dd(1)

t4012 assumed that it is okay to seek beyond the end of stdin. It is not,
and leads to an access violation (Windows speak for: segmentation fault)
with MinGW's dd.exe iff run in non-verbose mode.

Further, for some reason 'echo X | dd bs=1k seek=1' resulted in 2050 bytes
in this developer's setup instead of 1026.

So let's use a valid technique to generate 1024 NULs followed by X and a
line feed: a good ole' Perl script.

This patch is dedicated to Randal "Merlyn" Schwartz.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Start the merging-rebase to junio/next

This commit starts the rebase of ec1752b to 830d0c2
using the rebasing merge dca8a93615b92422f6db43c7645779f79a785e4f.
Make CFLAGS more strict

This is a gcc-ism, but as we use gcc exclusively, we can use them.

Taken from one of Junio's mails. (Reminded to cherry-pick this patch
by one of Karsten Blees' mails.)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Do not compile compat/**/*.c with -Wold-style-definition

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Makefile: Do not use OLD_ICONV on MINGW anymore

We are building libiconv now the same way as upstream MinGW does, so we do
not need OLD_ICONV anymore when compiling Git either in msysGit or
mingwGitDevEnv.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Define NO_GETTEXT for Git for Windows

The dreaded "your vnsprintf is broken (returned -1)" error is back. At
least with the libintl version we have. So for the moment, just work
around the issue by _not_ using gettext.

Ah, I wish that my attempt at implementing a custom strbuf_vaddf() would
not have been brushed aside so rashly. Oh well. Time saved on maintaining
that thing, I guess (although more time went into working around coping
with existing implementations).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>