[PATCH 4/4] strbuf_split*(): document functions

2012-11-03 Thread Michael Haggerty
Document strbuf_split_buf(), strbuf_split_str(), strbuf_split_max(), strbuf_split(), and strbuf_list_free() in the header file and in api-strbuf.txt. (These functions were previously completely undocumented.) Signed-off-by: Michael Haggerty --- Documentation/technical/api-strbuf.txt | 16 ++

[PATCH 2/4] strbuf_split_buf(): simplify iteration

2012-11-03 Thread Michael Haggerty
While iterating, update str and slen to keep track of the part of the string that hasn't been processed yet rather than computing things relative to the start of the original string. This eliminates one local variable, reduces the scope of another, and reduces the amount of arithmetic needed withi

[PATCH 3/4] strbuf_split*(): rename "delim" parameter to "terminator"

2012-11-03 Thread Michael Haggerty
The word "delimiter" suggests that the argument separates the substrings, whereas in fact (1) the delimiter characters are included in the output, and (2) if the input string ends with the delimiter, then the output does not include a final empty string. So rename the "delim" arguments of the strb

[PATCH 1/4] strbuf_split_buf(): use ALLOC_GROW()

2012-11-03 Thread Michael Haggerty
Use ALLOC_GROW() rather than inline code to manage memory in strbuf_split_buf(). Rename "pos" to "nr" because it better describes the use of the variable and it better conforms to the "ALLOC_GROW" idiom. Also, instead of adding a sentinal NULL value after each entry is added to the list, only add

[PATCH 0/4] Simplify and document strbuf_split() functions

2012-11-03 Thread Michael Haggerty
The strbuf_split() family of functions was completely undocumented. Add documentation and also simplify the definition of strbuf_split_buf(). Michael Haggerty (4): strbuf_split_buf(): use ALLOC_GROW() strbuf_split_buf(): simplify iteration strbuf_split*(): rename "delim" parameter to "termin

Re: [PATCH v4 00/13] New remote-hg helper

2012-11-03 Thread Felipe Contreras
On Fri, Nov 2, 2012 at 8:20 PM, Felipe Contreras wrote: > On Fri, Nov 2, 2012 at 7:39 PM, Felipe Contreras > wrote: > >> As a rule, I don't see much value in writing a framework that works >> only for one case, that smells more like over-engineering. If we had >> two cases (hg and bzr), then we m

[PATCH 3/3] remote-bzr: add simple tests

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/test-bzr.sh | 111 + 1 file changed, 111 insertions(+) create mode 100755 contrib/remote-helpers/test-bzr.sh diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh new f

[PATCH 2/3] remote-bzr: add support for pushing

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 34 ++ 1 file changed, 34 insertions(+) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 76a609a..de37217 100755 --- a/contrib/remote-helpe

[PATCH 1/3] Add new remote-bzr transport helper

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 187 ++ 1 file changed, 187 insertions(+) create mode 100755 contrib/remote-helpers/git-remote-bzr diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-

[PATCH 0/3] New remote-bzr remote helper

2012-11-03 Thread Felipe Contreras
Hi, This is a proof-of-concept remote helper for bzr, that turns out to work rather well. It uses bzr-fastimport[1], which is what most current bzr<->git tools uses, but the quality is not that great. After applying an important fix[2], it works nicely, but you will get tons of verbose messages.

[PATCH v6 16/16] remote-hg: the author email can be null

2012-11-03 Thread Felipe Contreras
Like 'Foo <>'. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index a9ae844..7929eec 100755 --- a/contrib/remote-helper

[PATCH v6 15/16] remote-hg: add option to not track branches

2012-11-03 Thread Felipe Contreras
Some people prefer it this way. % git config --global remote-hg.track-branches false Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/cont

[PATCH v6 14/16] remote-hg: add extra author test

2012-11-03 Thread Felipe Contreras
For hg.hg. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/test-hg-hg-git.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh index e07bba5..3e76d9f 100755 --- a/contrib/remote

[PATCH v6 13/16] remote-hg: add tests to compare with hg-git

2012-11-03 Thread Felipe Contreras
The base commands come from the tests of the hg-git project. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/test-hg-hg-git.sh | 462 +++ 1 file changed, 462 insertions(+) create mode 100755 contrib/remote-helpers/test-hg-hg-git.sh diff --git a/contrib/re

[PATCH v6 11/16] test-lib: avoid full path to store test results

2012-11-03 Thread Felipe Contreras
No reason to use the full path in case this is used externally. Otherwise we might get errors such as: ./test-lib.sh: line 394: /home/bob/dev/git/t/test-results//home/bob/dev/git/contrib/remote-hg/test-2894.counts: No such file or directory Signed-off-by: Felipe Contreras --- t/test-lib.sh |

[PATCH v6 12/16] remote-hg: add bidirectional tests

2012-11-03 Thread Felipe Contreras
Base commands from hg-git tests: https://bitbucket.org/durin42/hg-git/src Signed-off-by: Felipe Contreras --- contrib/remote-helpers/test-hg-bidi.sh | 243 + 1 file changed, 243 insertions(+) create mode 100755 contrib/remote-helpers/test-hg-bidi.sh diff --git a

[PATCH v6 10/16] remote-hg: add basic tests

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/Makefile | 13 + contrib/remote-helpers/test-hg.sh | 112 ++ 2 files changed, 125 insertions(+) create mode 100644 contrib/remote-helpers/Makefile create mode 100755 contrib/remote-helpers/test

[PATCH v6 09/16] remote-hg: fake bookmark when there's none

2012-11-03 Thread Felipe Contreras
Or at least no current bookmark. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 9db4b7e..dbe309a 1

[PATCH v6 08/16] remote-hg: add compat for hg-git author fixes

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 59 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index d585756..9db4b7e 100755 --- a/contr

[PATCH v6 06/16] remote-hg: match hg merge behavior

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 17 + 1 file changed, 17 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 503a9fc..247b7cb 100755 --- a/contrib/remote-helpers/git-remote-hg +++

[PATCH v6 07/16] remote-hg: add support for hg-git compat mode

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 89 +--- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 247b7cb..d585756 100755 --- a/contr

[PATCH v6 05/16] remote-hg: make sure the encoding is correct

2012-11-03 Thread Felipe Contreras
Independently of the environment. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index a5023c9..503a9fc 100755 -

[PATCH v6 04/16] remote-hg: add support to push URLs

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 45629e0..a5023c9 100755 --- a/contrib/remote-helpers/git-

[PATCH v6 03/16] remote-hg: add support for remote pushing

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index fcceede..45629e0 100755 --- a/contrib/remote-helpers/git-remote-

[PATCH v6 02/16] remote-hg: add support for pushing

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 217 ++- 1 file changed, 215 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index e37e278..fcceede 100755 --- a/cont

[PATCH v6 00/16] New remote-hg helper:w

2012-11-03 Thread Felipe Contreras
Hi, Only a few updates, and has been moved to contrib/remote-helpers (git-remote-bzr is on the way). This remote-hg has advantages other tools don't have: * Uses transport-helper (git clone hg::path) * The code is small * The code is simple * No external dependencies (other than mercurial)

[PATCH v6 01/16] Add new remote-hg transport helper

2012-11-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 391 +++ 1 file changed, 391 insertions(+) create mode 100755 contrib/remote-helpers/git-remote-hg diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg

Re: git-p4 clone @all error

2012-11-03 Thread Pete Wyckoff
merlin...@gmail.com wrote on Wed, 31 Oct 2012 15:01 +0100: > On Tue, Oct 30, 2012 at 11:44 AM, Arthur wrote: > > The problem : > > > > Importing revision 7727 (100%)Traceback (most recent call last): > > File "/usr/bin/git-p4", line 3183, in > > main() > > File "/usr/bin/git-p4", line 317

Re: [PATCH] git p4: catch p4 describe errors

2012-11-03 Thread Matt Arsenault
On Nov 3, 2012, at 16:07 , Pete Wyckoff wrote: > > Arthur and Matt, you've both had intermittent "p4 describe" > errors. I've not been able to repeat this or come up with > a possible root cause. But it is clear that the error handling > in this area is weak. I tried this week to find the comm

[PATCH] git p4: catch p4 describe errors

2012-11-03 Thread Pete Wyckoff
Group the two calls to "p4 describe" into a new helper function, and try to validate the p4 results. The current behavior when p4 describe fails is to die with a python backtrace. The new behavior will print the full response. Based-on-patch-by: Matt Arsenault Signed-off-by: Pete Wyckoff ---

Re: [PATCH] Enable parallelism in git submodule update.

2012-11-03 Thread Jens Lehmann
Am 03.11.2012 19:44, schrieb Phil Hord: > On Sat, Nov 3, 2012 at 11:42 AM, Jens Lehmann wrote: >> Am 30.10.2012 19:11, schrieb Stefan Zager: >>> This is a refresh of a conversation from a couple of months ago. >>> >>> I didn't try to implement all the desired features (e.g., smart logic >>> for pa

Re: [PATCH] Enable parallelism in git submodule update.

2012-11-03 Thread Jens Lehmann
Am 29.07.2012 17:37, schrieb Jens Lehmann: > Am 27.07.2012 20:37, schrieb Stefan Zager: >> The --jobs parameter may be used to set the degree of per-submodule >> parallel execution. > > I think this is a sound idea, but it would be good to see some > actual measurements. What are the performance n

Re: Wrap commit messages on `git commit -m`

2012-11-03 Thread Phil Hord
On Sat, Nov 3, 2012 at 3:41 AM, David Aguilar wrote: > On Fri, Nov 2, 2012 at 11:38 PM, Jonathan Nieder wrote: >> Ramkumar Ramachandra wrote: >>> Jonathan Nieder wrote: >> Ram, what platform do your colleagues use? >>> >>> Red Hat Enterprise Linux 5. >> >> Oh, ok. In that case I blame habit

Re: [PATCH] Enable parallelism in git submodule update.

2012-11-03 Thread Phil Hord
On Sat, Nov 3, 2012 at 11:42 AM, Jens Lehmann wrote: > Am 30.10.2012 19:11, schrieb Stefan Zager: >> This is a refresh of a conversation from a couple of months ago. >> >> I didn't try to implement all the desired features (e.g., smart logic >> for passing a -j parameter to recursive submodule inv

Re: [PATCH] Enable parallelism in git submodule update.

2012-11-03 Thread Jens Lehmann
Am 30.10.2012 19:11, schrieb Stefan Zager: > This is a refresh of a conversation from a couple of months ago. > > I didn't try to implement all the desired features (e.g., smart logic > for passing a -j parameter to recursive submodule invocations), but I > did address the one issue that Junio ins

Re: git-p4 clone @all error

2012-11-03 Thread Pete Wyckoff
a.fou...@amesys.fr wrote on Tue, 30 Oct 2012 03:44 -0700: > So, i want import my perforce projet on my server git. > > perforce my project tree : > > depot > dev_data > mainline > release_1.0 > release_1.0.0 > > my command is : > > git-p4 clone -v --detect-branches //depot@all /home/use

Re: Wrap commit messages on `git commit -m`

2012-11-03 Thread David Aguilar
On Fri, Nov 2, 2012 at 11:38 PM, Jonathan Nieder wrote: > Ramkumar Ramachandra wrote: >> Jonathan Nieder wrote: > >>> Ram, what platform do your colleagues use? >> >> Red Hat Enterprise Linux 5. > > Oh, ok. In that case I blame habit. > > I think the best option you have is to just complain to yo