Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-17 Thread Christian Couder
From: Jeff King p...@peff.net

 On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote:
 
 My preference is:
 
 1) with an s
 2) start
 3) underscore
 
 so that gives: starts_with() and ends_with()
 
 FWIW, that looks good to me, too. Whether there is confusion over the
 meaning of suffix or not, it makes sense, all other things being
 equal, to use the same terms as other popular languages.
 
 Like you, I prefer with an s, but we are deep in bikeshedding
 territory now. I can live with anything. :)

When I prepared a new version of my patch series, this time to rename
suffixcmp() to ends_with(), it appeared that we already have a static
ends_with() function in vcs-svn/fast_export.c with another slightly
different implementation :-)

I will send a new version that will remove this redundant
implementation.

Cheers,
Christian.
--
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: [RFC PATCH] commit -v: strip diffs and submodule shortlogs from the commit message

2013-11-17 Thread Jeff King
On Sat, Nov 16, 2013 at 07:22:29PM -0500, Eric Sunshine wrote:

  /* Truncate the message just before the diff, if any. */
  if (verbose) {
  -   p = strstr(sb.buf, \ndiff --git );
  -   if (p != NULL)
  -   strbuf_setlen(sb, p - sb.buf + 1);
  +   p = strstr(sb.buf, wt_status_diff_divider);
 
 Would it make sense to use the more flexible is_scissors_line() from
 builtin/mailinfo.c here?

I don't think so. We are not trying to be friendly to a remote source
which has given us an arbitrarily-written scissor line. Rather the
opposite: we are trying to be very strict only to break on the line we
have included ourselves.

-Peff
--
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 v4 2/2] Rename suffixcmp() to ends_with() and invert its result

2013-11-17 Thread Christian Couder
Now ends_with() returns 1 when the suffix is present and 0 otherwise.

The old name followed the pattern anything-cmp(), which suggests
a general comparison function suitable for e.g. sorting objects.
But this was not the case for suffixcmp().

Some popular programming languages have functions or methods
called using end and with that are doing what we want.
Therefore it makes sense to use ends_with() as a function
name to replace suffixcmp().

And in vcs-svn/fast_export.c there was already an ends_with()
function that did the same thing. Let's used the renamed one
while at it.

Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
 builtin/clone.c   |  2 +-
 builtin/fetch.c   |  2 +-
 builtin/merge-recursive.c |  2 +-
 builtin/remote.c  |  6 +++---
 builtin/repack.c  |  2 +-
 connected.c   |  2 +-
 git-compat-util.h |  2 +-
 strbuf.c  |  6 +++---
 vcs-svn/fast_export.c | 11 +--
 9 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index 874e0fd..7c0c5cf 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -510,7 +510,7 @@ static void write_followtags(const struct ref *refs, const 
char *msg)
for (ref = refs; ref; ref = ref-next) {
if (prefixcmp(ref-name, refs/tags/))
continue;
-   if (!suffixcmp(ref-name, ^{}))
+   if (ends_with(ref-name, ^{}))
continue;
if (!has_sha1_file(ref-old_sha1))
continue;
diff --git a/builtin/fetch.c b/builtin/fetch.c
index bd7a101..0db2631 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -653,7 +653,7 @@ static void find_non_local_tags(struct transport *transport,
 * to fetch then we can mark the ref entry in the list
 * as one to ignore by setting util to NULL.
 */
-   if (!suffixcmp(ref-name, ^{})) {
+   if (ends_with(ref-name, ^{})) {
if (item  !has_sha1_file(ref-old_sha1) 
!will_fetch(head, ref-old_sha1) 
!has_sha1_file(item-util) 
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index 3a64f5d..4111b98 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -29,7 +29,7 @@ int cmd_merge_recursive(int argc, const char **argv, const 
char *prefix)
struct commit *result;
 
init_merge_options(o);
-   if (argv[0]  !suffixcmp(argv[0], -subtree))
+   if (argv[0]  ends_with(argv[0], -subtree))
o.subtree_shift = ;
 
if (argc  4)
diff --git a/builtin/remote.c b/builtin/remote.c
index 9b3a98e..cd56542 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -269,13 +269,13 @@ static int config_read_branches(const char *key, const 
char *value, void *cb)
enum { REMOTE, MERGE, REBASE } type;
 
key += 7;
-   if (!suffixcmp(key, .remote)) {
+   if (ends_with(key, .remote)) {
name = xstrndup(key, strlen(key) - 7);
type = REMOTE;
-   } else if (!suffixcmp(key, .merge)) {
+   } else if (ends_with(key, .merge)) {
name = xstrndup(key, strlen(key) - 6);
type = MERGE;
-   } else if (!suffixcmp(key, .rebase)) {
+   } else if (ends_with(key, .rebase)) {
name = xstrndup(key, strlen(key) - 7);
type = REBASE;
} else
diff --git a/builtin/repack.c b/builtin/repack.c
index a0ff5c7..938bc75 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -78,7 +78,7 @@ static void get_non_kept_pack_filenames(struct string_list 
*fname_list)
return;
 
while ((e = readdir(dir)) != NULL) {
-   if (suffixcmp(e-d_name, .pack))
+   if (!ends_with(e-d_name, .pack))
continue;
 
len = strlen(e-d_name) - strlen(.pack);
diff --git a/connected.c b/connected.c
index fae8d64..51d8ba4 100644
--- a/connected.c
+++ b/connected.c
@@ -38,7 +38,7 @@ int check_everything_connected_with_transport(sha1_iterate_fn 
fn,
if (transport  transport-smart_options 
transport-smart_options-self_contained_and_connected 
transport-pack_lockfile 
-   !suffixcmp(transport-pack_lockfile, .keep)) {
+   ends_with(transport-pack_lockfile, .keep)) {
struct strbuf idx_file = STRBUF_INIT;
strbuf_addstr(idx_file, transport-pack_lockfile);
strbuf_setlen(idx_file, idx_file.len - 5); /* .keep */
diff --git a/git-compat-util.h b/git-compat-util.h
index 7776f12..37f0ba0 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -351,7 +351,7 @@ extern void set_error_routine(void (*routine)(const char 
*err, va_list params));

[PATCH v4 1/2] builtin/remote: remove postfixcmp() and use suffixcmp() instead

2013-11-17 Thread Christian Couder
Commit 8cc5b290 (git merge -Xoption, 25 Nov 2009) introduced
suffixcmp() with nearly the same implementation as postfixcmp()
that already existed since commit 211c8968 (Make git-remote a
builtin, 29 Feb 2008).

The only difference between the two implementations is that,
when the string is smaller than the suffix, one implementation
returns 1 while the other one returns -1.

But, as postfixcmp() is only used to compare for equality, the
distinction does not matter and does not affect the correctness of
this patch.

As postfixcmp() has always been static in builtin/remote.c
and is used nowhere else, it makes more sense to remove it
and use suffixcmp() instead in builtin/remote.c, rather than
to remove suffixcmp().

Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
 builtin/remote.c | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/builtin/remote.c b/builtin/remote.c
index 4e14891..9b3a98e 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -80,14 +80,6 @@ static int verbose;
 static int show_all(void);
 static int prune_remote(const char *remote, int dry_run);
 
-static inline int postfixcmp(const char *string, const char *postfix)
-{
-   int len1 = strlen(string), len2 = strlen(postfix);
-   if (len1  len2)
-   return 1;
-   return strcmp(string + len1 - len2, postfix);
-}
-
 static int fetch_remote(const char *name)
 {
const char *argv[] = { fetch, name, NULL, NULL };
@@ -277,13 +269,13 @@ static int config_read_branches(const char *key, const 
char *value, void *cb)
enum { REMOTE, MERGE, REBASE } type;
 
key += 7;
-   if (!postfixcmp(key, .remote)) {
+   if (!suffixcmp(key, .remote)) {
name = xstrndup(key, strlen(key) - 7);
type = REMOTE;
-   } else if (!postfixcmp(key, .merge)) {
+   } else if (!suffixcmp(key, .merge)) {
name = xstrndup(key, strlen(key) - 6);
type = MERGE;
-   } else if (!postfixcmp(key, .rebase)) {
+   } else if (!suffixcmp(key, .rebase)) {
name = xstrndup(key, strlen(key) - 7);
type = REBASE;
} else
-- 
1.8.4.1.561.g12affca


--
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: Possibly a bug

2013-11-17 Thread Jeff King
On Sun, Nov 17, 2013 at 04:59:20AM +0200, Jiergir Ogoerg wrote:

 As suggested by the git book/tutorial I cloned simplegit-progit to
 learn using git.
 The issue:
 git log --since=5.years
 yields 2 commits, while
 git log --since=6.years
 yields 3 commits, despite the Date in both cases being March 2008.
 Is it a bug?

No, but it is confusing.

The `--since` and `--until` flags use the committer date, not the author
date. Try `git log --pretty=fuller`, and you will see that the author
and committer dates do not match for the top two commits (their
committer date is within 5 years).

Usually the two dates are the same, but they can be different if a
commit is rebased, or applied via patch.

-Peff
--
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: Symbolic refs break ref advertisement on 1.8.4.3+

2013-11-17 Thread Jeff King
On Sun, Nov 17, 2013 at 01:39:52AM +1100, Bryan Turner wrote:

 Aphrael:example bturner$ for ((i=1;i21;i++)); do git symbolic-ref
 refs/heads/syms/$i refs/heads/master; done
 Aphrael:example bturner$ git ls-remote .
 fatal: protocol error: impossibly long line
 fatal: Could not read from remote repository.
 
 A symref= entry is written into the first packet of the ref
 advertisement, right after the capabilities, for each symbolic ref in
 the repository. Unfortunately, no splitting is done on that value and
 so once you have 15-20 symbolic refs (more or less depending on path
 lengths), you blow the 996 byte limit in format_packet (pkt-line.c)
 and all further clone/fetch operations fail.

Ick, yeah. I don't think there is a way around that with the way the
information is shoe-horned into the protocol.  We should probably just
revert 5e7dcad (upload-pack: send non-HEAD symbolic refs, 2013-09-17),
and assume the HEAD branch name is short enough to fit.

Another option would be to cap the number of non-HEAD symrefs we'd send
(by counting up the bytes and keeping below the limit). That at least
makes the easy cases work, but it's a bit too flaky for my taste.

-Peff
--
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: [RFC PATCH] commit -v: strip diffs and submodule shortlogs from the commit message

2013-11-17 Thread Jens Lehmann
Am 17.11.2013 10:09, schrieb Jeff King:
 
 diff --git a/builtin/commit.c b/builtin/commit.c
 index 6ab4605..091a6e7 100644
 --- a/builtin/commit.c
 +++ b/builtin/commit.c
 @@ -1602,9 +1602,9 @@ int cmd_commit(int argc, const char **argv, const char 
 *prefix)

  /* Truncate the message just before the diff, if any. */
  if (verbose) {
 -p = strstr(sb.buf, \ndiff --git );
 -if (p != NULL)
 -strbuf_setlen(sb, p - sb.buf + 1);
 +p = strstr(sb.buf, wt_status_diff_divider);
 +if ((p != NULL)  (p  sb.buf)  (p[-1] == '\n'))
 +strbuf_setlen(sb, p - sb.buf);
 
 I think your check for a preceding newline is too strict. If I delete
 everything before the scissor line (e.g., because I am trying to abort
 the commit), we should still remove the diff. With your patch, we do
 not, and a commit message consisting solely of the diff.
 
 So I think you want:
 
   if (p  (p == sb.buf || p[-1] == '\n'))

Thanks for catching this, will do so in v2.

 +fprintf(s-fp, _(# The diff below will be removed when keeping the 
 previous line.\n));
 
 I found this hard to parse, I think because of the keeping (why would
 I not keep it?), and because you are talking about lines above and
 below. It is not as accurate to say:
 
   # -- 8 
   # Everything below this line will be removed.
 
 because it is technically the line above that is the cutoff. But I think
 the meaning is clear, and it is simpler to parse.

Ok.

 I do think it would be simpler with a single line. I know handling the
 i18n was a question there, but I think we should be fine as long as we
 check for the exact bytes we wrote. Surely gettext can do something
 like:
 
   magic = _(# Everything below this line will be removed);
   fprintf(fh, %s, magic);
   ...
   p = strstr(magic);
 
 I don't know what guarantees on string lifetime gettext gives us, but
 the worst case is that we simply strdup the result.
 
 I suppose it's possible that the translated string could have utf8 with
 multiple representations, and the user's editor normalizes the text in a
 different way than we wrote it when it saves the result. I don't know if
 that is worth caring about or not; it seems kind of insane.

I don't have any strong feelings about this one. I'd be fine with
dropping the scissor line and taking the translated string as divider
line. What do others think?
--
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


Git clone from ftp issue

2013-11-17 Thread Zachary Rodriguez
Hello. I am having trouble setting up a git repository on an ftp
server. The repository is bare and has had several commits made before
being moved to the ftp server. I am attempting to clone from my ftp
server, but git fails with the ftp error code 550. Inspection of the
ftp packets via wireshark reveals that git is successfully changing to
its desired working directory on the ftp server, but then it attempts
to execute the 'size' command on the refs directory which generates
the error code 550. Is this normal behavior or is it a bug?
--
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


Git - fossil bridging?

2013-11-17 Thread Tim Chase
Has there been any development on git-fossil bridging?  I know one
can spew fastimports between the two for an initial synchronization,
but I'd like to have a continuous bridge; something like git-svn.
I have fossil on one machine (mostly a public machine, for
bug-tracking, wiki, etc that fossil does nicely) while using git
locally and pushing change-sets out to the fossil repo.

Any tips?

My current experimentation just houses both in the same location with
my git master branch manually synced with the fossil repo (which is
really all I need which does simplify matters greatly, though it
would be nice to sync multiple branches if the functionality was
there).

Thanks,

-tkc




--
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: Fwd: Error with git-svn pushing a rename

2013-11-17 Thread Andreas Stricker
Hi Jonathan

 Can you give an exact sequence of steps (including Upgrade Subversion
 at this step) to reproduce the problem?  That would help immensely
 --- if at all possible, I would very much like to keep existing
 git-svn repos working on upgrade.

Of course. I've attached a text file with the commands required to
reproduce this error.

From my experiments it looks like after the subversion is upgraded
to 1.8 the problem only occurs if git svn fetch fetches new changes
from the subversion repository. Without changes in upstream subversion
repository I couldn't reproduce the error. And a rename is required too.

Hope this helps.

Regards, Andy
andy@m:r $ git
-bash: /opt/local/bin/git: No such file or directory
andy@m:r $ svn
-bash: /opt/local/bin/svn: No such file or directory
andy@m:r $ sudo port install subversion---  Computing dependencies for 
subversion
---  Fetching archive for subversion
---  Attempting to fetch subversion-1.7.10_1.darwin_11.x86_64.tbz2 from 
http://lil.fr.packages.macports.org/subversion
---  Attempting to fetch subversion-1.7.10_1.darwin_11.x86_64.tbz2.rmd160 from 
http://lil.fr.packages.macports.org/subversion
---  Installing subversion @1.7.10_1
---  Activating subversion @1.7.10_1
---  Cleaning subversion
---  Updating database of binaries: 100.0%
---  Scanning binaries for linking errors: 100.0%
---  Found 15 broken file(s), matching files to ports
---  Found 1 broken port(s), determining rebuild order
---  Rebuilding in order
 subversion @1.7.10 
---  Computing dependencies for subversion
---  Cleaning subversion
---  Scanning binaries for linking errors: 100.0%
---  Found 15 broken file(s), matching files to ports
---  Found 1 broken port(s), determining rebuild order
---  Rebuilding in order
 subversion @1.7.10 
---  Computing dependencies for subversion
---  Fetching distfiles for subversion
---  Verifying checksums for subversion
---  Extracting subversion
---  Applying patches to subversion
---  Configuring subversion
---  Building subversion
---  Staging subversion into destroot
---  Deactivating subversion @1.7.10_1
---  Cleaning subversion
---  Uninstalling subversion @1.7.10_1
---  Cleaning subversion
---  Computing dependencies for subversion
---  Installing subversion @1.7.10_1
---  Activating subversion @1.7.10_1
---  Cleaning subversion
---  Updating database of binaries: 100.0%
---  Scanning binaries for linking errors: 100.0%
---  No broken files found.
andy@m:r $ sudo port install git-core +bash_completion +credential_osxkeychain 
+doc +pcre +python27 +svn
Password:
---  Computing dependencies for git-core
---  Dependencies to be installed: p5.12-svn-simple 
subversion-perlbindings-5.12
---  Fetching archive for subversion-perlbindings-5.12
---  Attempting to fetch 
subversion-perlbindings-5.12-1.7.10_0.darwin_11.x86_64.tbz2 from 
http://lil.fr.packages.macports.org/subversion-perlbindings-5.12
---  Attempting to fetch 
subversion-perlbindings-5.12-1.7.10_0.darwin_11.x86_64.tbz2.rmd160 from 
http://lil.fr.packages.macports.org/subversion-perlbindings-5.12
---  Installing subversion-perlbindings-5.12 @1.7.10_0
---  Activating subversion-perlbindings-5.12 @1.7.10_0
---  Cleaning subversion-perlbindings-5.12
---  Fetching archive for p5.12-svn-simple
---  Attempting to fetch p5.12-svn-simple-0.280.0_4.darwin_11.noarch.tbz2 from 
http://lil.fr.packages.macports.org/p5.12-svn-simple
---  Attempting to fetch 
p5.12-svn-simple-0.280.0_4.darwin_11.noarch.tbz2.rmd160 from 
http://lil.fr.packages.macports.org/p5.12-svn-simple
---  Installing p5.12-svn-simple @0.280.0_4
---  Activating p5.12-svn-simple @0.280.0_4
---  Cleaning p5.12-svn-simple
---  Fetching archive for git-core
---  Attempting to fetch 
git-core-1.8.4.2_0+bash_completion+credential_osxkeychain+doc+pcre+python27+svn.darwin_11.x86_64.tbz2
 from http://lil.fr.packages.macports.org/git-core
---  Attempting to fetch 
git-core-1.8.4.2_0+bash_completion+credential_osxkeychain+doc+pcre+python27+svn.darwin_11.x86_64.tbz2
 from http://mse.uk.packages.macports.org/sites/packages.macports.org/git-core
---  Attempting to fetch 
git-core-1.8.4.2_0+bash_completion+credential_osxkeychain+doc+pcre+python27+svn.darwin_11.x86_64.tbz2
 from http://packages.macports.org/git-core
---  Fetching distfiles for git-core
---  Verifying checksums for git-core
---  Extracting git-core
---  Applying patches to git-core
---  Configuring git-core
---  Building git-core
---  Staging git-core into destroot
---  Installing git-core 
@1.8.4.2_0+bash_completion+credential_osxkeychain+doc+pcre+python27+svn
---  Activating git-core 
@1.8.4.2_0+bash_completion+credential_osxkeychain+doc+pcre+python27+svn
---  Cleaning git-core
---  Updating database of binaries: 100.0%
---  Scanning binaries for linking errors: 100.0%
---  No broken files found.
andy@m:r $ git version
git version 1.8.4.2
andy@m:r $ svn --version |head -n2svn, Version 1.7.10 (r1485443)
   übersetzt Nov 17 2013, 22:58:41
andy@m:r $ svnadmin create svnrepo
andy@m:r $ 

Re: Git - fossil bridging?

2013-11-17 Thread Tim Chase
On 2013-11-17 14:43, Kyle J. McKay wrote:
 Sounds like you want to write a 'git-remote-fossil' helper so you
 can do something like:
 
git clone fossil::http://sqlite.org/src

Pretty much.  Or at least something akin to git-svn where one would do

  git fossil clone http://some.fossil.url/path/to/repo.fossil
  # hack hack
  git commit
  # possibly some git-branch, git-merge, git-rebase, git-cherry-pick
  # lather, rinse, repeat
  git fossil push # or git fossil dcommit

I've not played with the git+hg or git+bzr bridges to see if they'd
have a more useful interface that would better map to fossil.  If so,
imagine that's what I typed above ;-)

-tkc




--
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 v3 4/9] test-bzr.sh, test-hg.sh: prepare for change to push.default=simple

2013-11-17 Thread Richard Hansen
Change 'git push remote' to 'git push remote branch' in one of
the test-bzr.sh tests to ensure that the test continues to pass when
the default value of push.default changes to simple.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/test-bzr.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/test-bzr.sh 
b/contrib/remote-helpers/test-bzr.sh
index 1e850c3..1e53ff9 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -379,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 bzr
+   git push bzr master
) 
 
(
-- 
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


[PATCH v3 8/9] test-hg.sh: help user correlate verbose output with email test

2013-11-17 Thread Richard Hansen
It's hard to tell which author conversion test failed when the email
addresses look similar.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/test-hg.sh | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index eb72db8..642ad93 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -206,16 +206,16 @@ test_expect_success 'authors' '
 
../expected 
author_test alpha  H G Wells we...@example.com 
-   author_test beta test test unknown 
-   author_test gamma test t...@example.com (comment) test 
t...@example.com 
-   author_test delta t...@example.com Unknown t...@example.com 
-   author_test epsilon namet...@example.com name t...@example.com 

-   author_test zeta name t...@example.com name t...@example.com 
-   author_test eta  test  test unknown 
-   author_test theta test  t...@example.com  test t...@example.com 

-   author_test iota test t...@example.com test t...@example.com 
-   author_test kappa test  test at example dot com test 
unknown 
-   author_test lambda t...@example.com Unknown t...@example.com
+   author_test beta beta beta unknown 
+   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
) 
 
git clone hg::hgrepo gitrepo 
-- 
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


[PATCH v3 7/9] test-hg.sh: fix duplicate content strings in author tests

2013-11-17 Thread Richard Hansen
beta was used twice.  Change the second copy to gamma and
increment the remaining content strings.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/test-hg.sh | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index 5535e8c..eb72db8 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -207,15 +207,15 @@ test_expect_success 'authors' '
../expected 
author_test alpha  H G Wells we...@example.com 
author_test beta test test unknown 
-   author_test beta test t...@example.com (comment) test 
t...@example.com 
-   author_test gamma t...@example.com Unknown t...@example.com 
-   author_test delta namet...@example.com name t...@example.com 
-   author_test epsilon name t...@example.com name t...@example.com 

-   author_test zeta  test  test unknown 
-   author_test eta test  t...@example.com  test t...@example.com 
-   author_test theta test t...@example.com test t...@example.com 
-   author_test iota test  test at example dot com test unknown 

-   author_test kappa t...@example.com Unknown t...@example.com
+   author_test gamma test t...@example.com (comment) test 
t...@example.com 
+   author_test delta t...@example.com Unknown t...@example.com 
+   author_test epsilon namet...@example.com name t...@example.com 

+   author_test zeta name t...@example.com name t...@example.com 
+   author_test eta  test  test unknown 
+   author_test theta test  t...@example.com  test t...@example.com 

+   author_test iota test t...@example.com test t...@example.com 
+   author_test kappa test  test at example dot com test 
unknown 
+   author_test lambda t...@example.com Unknown t...@example.com
) 
 
git clone hg::hgrepo gitrepo 
-- 
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


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

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

Changes from v2:
  * changed the author on the following patches to Felipe Contreras:
- [2/9] test-lib.sh: convert $TEST_DIRECTORY to an absolute path
- [3/9] test-bzr.sh, test-hg.sh: allow running from any dir
  * added 'Reviewed-by: Felipe Contreras felipe.contre...@gmail.com'
to the other patches
  * made the following comment change:

diff --git a/t/test-lib.sh b/t/test-lib.sh
index af172d9..d303e6c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -28,7 +28,7 @@ then
TEST_DIRECTORY=$(pwd)
 else
# ensure that TEST_DIRECTORY is an absolute path so that it
-   # works even if the current working directory is changed
+   # is valid even if the current working directory is changed
TEST_DIRECTORY=$(cd $TEST_DIRECTORY  pwd) || exit 1
 fi
 if test -z $TEST_OUTPUT_DIRECTORY

Felipe Contreras (2):
  test-lib.sh: convert $TEST_DIRECTORY to an absolute path
  test-bzr.sh, test-hg.sh: allow running from any dir

Richard Hansen (7):
  remote-hg:  don't decode UTF-8 paths into Unicode objects
  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


[PATCH v3 1/9] remote-hg: don't decode UTF-8 paths into Unicode objects

2013-11-17 Thread Richard Hansen
The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-hg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index 3222afd..c6026b9 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -747,7 +747,7 @@ def parse_commit(parser):
 f = { 'deleted' : True }
 else:
 die('Unknown file command: %s' % line)
-path = c_style_unescape(path).decode('utf-8')
+path = c_style_unescape(path)
 files[path] = f
 
 # only export the commits if we are on an internal proxy repo
-- 
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


[PATCH v3 9/9] remote-bzr, remote-hg: fix email address regular expression

2013-11-17 Thread Richard Hansen
Before, strings like foo@example.com would be converted to
foo. b...@example.com when they should be unknown
foo@example.com.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 7 +++
 contrib/remote-helpers/git-remote-hg  | 7 +++
 contrib/remote-helpers/test-hg.sh | 3 ++-
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index 054161a..7e34532 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -44,8 +44,8 @@ import StringIO
 import atexit, shutil, hashlib, urlparse, subprocess
 
 NAME_RE = re.compile('^([^]+)')
-AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$')
-EMAIL_RE = re.compile('^([^]+[^ \\\t])?\\b(?:[ \\t]*?)\\b([^ \\t]+@[^ 
\\t]+)')
+AUTHOR_RE = re.compile('^([^]+?)? ?[]([^]*)(?:$|)')
+EMAIL_RE = re.compile(r'([^ \t]+@[^ \t]+)')
 RAW_AUTHOR_RE = re.compile('^(\w+) (.+)? (.*) (\d+) ([+-]\d+)')
 
 def die(msg, *args):
@@ -193,8 +193,7 @@ def fixup_user(user):
 else:
 m = EMAIL_RE.match(user)
 if m:
-name = m.group(1)
-mail = m.group(2)
+mail = m.group(1)
 else:
 m = NAME_RE.match(user)
 if m:
diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index c6026b9..30402d5 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -51,8 +51,8 @@ import time as ptime
 #
 
 NAME_RE = re.compile('^([^]+)')
-AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$')
-EMAIL_RE = re.compile('^([^]+[^ \\\t])?\\b(?:[ \\t]*?)\\b([^ \\t]+@[^ 
\\t]+)')
+AUTHOR_RE = re.compile('^([^]+?)? ?[]([^]*)(?:$|)')
+EMAIL_RE = re.compile(r'([^ \t]+@[^ \t]+)')
 AUTHOR_HG_RE = re.compile('^(.*?) ?(.*?)(?:(.+)?)?$')
 RAW_AUTHOR_RE = re.compile('^(\w+) (?:(.+)? )?(.*) (\d+) ([+-]\d+)')
 
@@ -316,8 +316,7 @@ def fixup_user_git(user):
 else:
 m = EMAIL_RE.match(user)
 if m:
-name = m.group(1)
-mail = m.group(2)
+mail = m.group(1)
 else:
 m = NAME_RE.match(user)
 if m:
diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index 642ad93..347e812 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -215,7 +215,8 @@ test_expect_success 'authors' '
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 lambda lam...@example.com Unknown lam...@example.com 

+   author_test mu mu...@example.com Unknown mu...@example.com
) 
 
git clone hg::hgrepo gitrepo 
-- 
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


[PATCH v3 3/9] test-bzr.sh, test-hg.sh: allow running from any dir

2013-11-17 Thread Richard Hansen
From: Felipe Contreras felipe.contre...@gmail.com

Set TEST_DIRECTORY to the t/ directory (if TEST_DIRECTORY is not
already set) so that the user doesn't already have to be in the test
directory to run these test scripts.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
Based-on-patch-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Richard Hansen rhan...@bbn.com
Signed-off-by: Richard Hansen rhan...@bbn.com
---
 contrib/remote-helpers/test-bzr.sh | 3 ++-
 contrib/remote-helpers/test-hg.sh  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/remote-helpers/test-bzr.sh 
b/contrib/remote-helpers/test-bzr.sh
index 5c50251..1e850c3 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -5,7 +5,8 @@
 
 test_description='Test remote-bzr'
 
-. ./test-lib.sh
+test -n $TEST_DIRECTORY || TEST_DIRECTORY=${0%/*}/../../t
+. $TEST_DIRECTORY/test-lib.sh
 
 if ! test_have_prereq PYTHON
 then
diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index 72f745d..fa7d17b 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -8,7 +8,8 @@
 
 test_description='Test remote-hg'
 
-. ./test-lib.sh
+test -n $TEST_DIRECTORY || TEST_DIRECTORY=${0%/*}/../../t
+. $TEST_DIRECTORY/test-lib.sh
 
 if ! test_have_prereq PYTHON
 then
-- 
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


[PATCH v3 5/9] test-hg.sh: eliminate 'local' bashism

2013-11-17 Thread Richard Hansen
Unlike bash, POSIX shell does not specify a 'local' command for
declaring function-local variable scope.  Except for IFS, the variable
names are not used anywhere else in the script so simply remove the
'local'.  For IFS, move the assignment to the 'read' command to
prevent it from affecting code outside the function.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/test-hg.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index fa7d17b..ceef6b1 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -54,14 +54,14 @@ check_bookmark () {
 }
 
 check_push () {
-   local expected_ret=$1 ret=0 ref_ret=0 IFS=':'
+   expected_ret=$1 ret=0 ref_ret=0
 
shift
git push origin $@ 2error
ret=$?
cat error
 
-   while read branch kind
+   while IFS=':' read branch kind
do
case $kind in
'new')
-- 
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


[PATCH v3 2/9] test-lib.sh: convert $TEST_DIRECTORY to an absolute path

2013-11-17 Thread Richard Hansen
From: Felipe Contreras felipe.contre...@gmail.com

If $TEST_DIRECTORY is specified in the environment, convert the value
to an absolute path to ensure that it remains valid even when 'cd' is
used.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
Reviewed-by: Richard Hansen rhan...@bbn.com
Signed-off-by: Richard Hansen rhan...@bbn.com
---
 t/test-lib.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index b25249e..d303e6c 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
+   # is valid even if the current working directory is changed
+   TEST_DIRECTORY=$(cd $TEST_DIRECTORY  pwd) || exit 1
 fi
 if test -z $TEST_OUTPUT_DIRECTORY
 then
-- 
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


[PATCH v3 6/9] test-hg.sh: avoid obsolete 'test' syntax

2013-11-17 Thread Richard Hansen
The POSIX spec says that the '-a', '-o', and parentheses operands to
the 'test' utility are obsolete extensions due to the potential for
ambiguity.  Replace '-o' with '|| test' to avoid unspecified behavior.

Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/test-hg.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index ceef6b1..5535e8c 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -83,7 +83,7 @@ check_push () {
test $ref_ret -ne 0  echo match for '$branch' failed  
break
done
 
-   if test $expected_ret -ne $ret -o $ref_ret -ne 0
+   if test $expected_ret -ne $ret || test $ref_ret -ne 0
then
return 1
fi
-- 
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


[PATCH v3] remote-bzr: support the new 'force' option

2013-11-17 Thread Richard Hansen
Signed-off-by: Richard Hansen rhan...@bbn.com
Reviewed-by: Felipe Contreras felipe.contre...@gmail.com
---

This is a reroll of:
  http://article.gmane.org/gmane.comp.version-control.git/237699
based on feedback from Felipe:
  http://article.gmane.org/gmane.comp.version-control.git/237756

This patch is an optional extension to Felipe's transport-helper:
updates patch series:
  http://thread.gmane.org/gmane.comp.version-control.git/237738
and it requires those changes to work.

Changes from v2:
  * remove 'import types' (no longer necessary)
  * change '(opt, val) = parser[1:3]' to 'opt, val = parser[1:3]'
  * add 'Reviewed-by: Felipe Contreras felipe.contre...@gmail.com'
to commit message based on Felipe's comment in:
http://article.gmane.org/gmane.comp.version-control.git/237756

 contrib/remote-helpers/git-remote-bzr | 31 ++-
 contrib/remote-helpers/test-bzr.sh| 22 +-
 2 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index 7e34532..ea0e82a 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -684,7 +684,8 @@ def do_export(parser):
 peer = bzrlib.branch.Branch.open(peers[name],
  
possible_transports=transports)
 try:
-peer.bzrdir.push_branch(branch, revision_id=revid)
+peer.bzrdir.push_branch(branch, revision_id=revid,
+overwrite=force)
 except bzrlib.errors.DivergedBranches:
 print error %s non-fast forward % ref
 continue
@@ -718,8 +719,32 @@ def do_capabilities(parser):
 print *import-marks %s % path
 print *export-marks %s % path
 
+print option
 print
 
+class InvalidOptionValue(Exception):
+pass
+
+def get_bool_option(val):
+if val == 'true':
+return True
+elif val == 'false':
+return False
+else:
+raise InvalidOptionValue()
+
+def do_option(parser):
+global force
+opt, val = parser[1:3]
+try:
+if opt == 'force':
+force = get_bool_option(val)
+print 'ok'
+else:
+print 'unsupported'
+except InvalidOptionValue:
+print error '%s' is not a valid value for option '%s' % (val, opt)
+
 def ref_is_valid(name):
 return not True in [c in name for c in '~^: \\']
 
@@ -882,6 +907,7 @@ def main(args):
 global is_tmp
 global branches, peers
 global transports
+global force
 
 alias = args[1]
 url = args[2]
@@ -895,6 +921,7 @@ def main(args):
 branches = {}
 peers = {}
 transports = []
+force = False
 
 if alias[5:] == url:
 is_tmp = True
@@ -930,6 +957,8 @@ def main(args):
 do_import(parser)
 elif parser.check('export'):
 do_export(parser)
+elif parser.check('option'):
+do_option(parser)
 else:
 die('unhandled command: %s' % line)
 sys.stdout.flush()
diff --git a/contrib/remote-helpers/test-bzr.sh 
b/contrib/remote-helpers/test-bzr.sh
index 1e53ff9..4f379c2 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -66,13 +66,33 @@ test_expect_success 'pushing' '
test_cmp expected actual
 '
 
+test_expect_success 'forced pushing' '
+   (
+   cd gitrepo 
+   echo three-new content 
+   git commit -a --amend -m three-new 
+   git push -f
+   ) 
+
+   (
+   cd bzrrepo 
+   # the forced update overwrites the bzr branch but not the bzr
+   # working directory (it tries to merge instead)
+   bzr revert
+   ) 
+
+   echo three-new expected 
+   cat bzrrepo/content actual 
+   test_cmp expected actual
+'
+
 test_expect_success 'roundtrip' '
(
cd gitrepo 
git pull 
git log --format=%s -1 origin/master actual
) 
-   echo three expected 
+   echo three-new expected 
test_cmp expected actual 
 
(cd gitrepo  git push  git pull) 
-- 
1.8.5.rc2.10.g50cf47a

--
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: Git - fossil bridging?

2013-11-17 Thread Johan Herland
On Mon, Nov 18, 2013 at 1:26 AM, Tim Chase g...@tim.thechases.com wrote:
 On 2013-11-17 14:43, Kyle J. McKay wrote:
 Sounds like you want to write a 'git-remote-fossil' helper so you
 can do something like:

git clone fossil::http://sqlite.org/src

 Pretty much.  Or at least something akin to git-svn where one would do

   git fossil clone http://some.fossil.url/path/to/repo.fossil
   # hack hack
   git commit
   # possibly some git-branch, git-merge, git-rebase, git-cherry-pick
   # lather, rinse, repeat
   git fossil push # or git fossil dcommit

 I've not played with the git+hg or git+bzr bridges to see if they'd
 have a more useful interface that would better map to fossil.  If so,
 imagine that's what I typed above ;-)

If you're looking at implementing this, please look at git help
remote-helpers (or
https://www.kernel.org/pub/software/scm/git/docs/git-remote-helpers.html
) which describes an infrastructure (in addition to
fast-import/export) we have for interacting with foreign version
control systems. A remote helper for fossil repos would allow you to
consider the fossil repo as a git remote, and the usual git
clone/fetch/pull/push commands for interacting with remote repos would
Just Work against a fossil repo.

I understand how you might want to model this on git svn, since that
is obviously the most popular interface between git and an other VCS,
but I believe git-svn is not the best example for how to write these
gateways nowadays. git-svn was written long before git remote-helpers
existed, but I hope/believe that if it was written again today, it
would use remote-helpers instead of implementing its own commands.

git-remote-bzr and git-remote-hg in contrib/remote-helpers/ is the
code that implements the git+bzr and git+hg bridges you mention above.
Those would be useful reference points when implementing a
git-remote-fossil helper. git-remote-mediawiki in contrib/mw-to-git/
might also be a useful example.


...Johan

-- 
Johan Herland, jo...@herland.net
www.herland.net
--
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: Problem while cloning a git repo

2013-11-17 Thread ycollette . nospam
When I clone a git repo from github (via https), I've no problems.
It looks like that the problem is only related to my special repo with big 
zip commited inside.

YC

- Mail original -
De: Yann COLLETTE ycollette.nos...@free.fr
À: git@vger.kernel.org
Envoyé: Jeudi 14 Novembre 2013 09:20:51
Objet: Re: Problem while cloning a git repo

I am not able to clone via https because gerrit doesn't propose this way 
of cloning.
When I clone via http, I see that git is starting the download of objects:
remote: Counting objects: 256, done
remote: Finding sources: 100% (256/256)
Receiving objects: 46% ... (this part always fails at 46 %).
So, I think that the proxy part is not a problem (there is no proxy set 
here).
If I set GIT_CURL_VERBOSE=1 before cloning, I've got the following error:
* Problem (2) in the Chunked-Encoded data
* Closing connection 1

YC

Le 14/11/2013 00:40, brian m. carlson a écrit :
 On Wed, Nov 13, 2013 at 08:43:28AM +0100, Yann COLLETTE wrote:
 Hello,

 When I perform the git clone via git, it works. The problem is only
 happening via http.
 I tried to play with http.postBuffer and I set this parameter to
 it's maximum (a little bit before a git clone triggered a memory
 alloc problem) and I see that something big is trying to be
 downloaded. But I don't see such a big file in my history of
 commits. The maximum one seems to be around 50 Mo ...
 Please keep the list in CC.

 http.postBuffer doesn't affect clones, only pushes, so that isn't
 relevant here.  You're experiencing something that is dropping the
 connection over HTTP.  So you either have a bad proxy, or something else
 is causing the connection to be dropped.  Since it's only over HTTP, I
 suspect it's the former.

 Do you have HTTPS, and if so, does it work if you try to clone over
 that?


--
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
--
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: Add a bugzilla website

2013-11-17 Thread ycollette . nospam

On most linux distro bugzilla website, there are some people dedicated to 
triaging bugs (finding duplicated bugs, asking for more informations, closing 
old and / or resolved bugs).
To have an efficient bugtracking tool needs to have some people dedicated to 
this.
But for the user, it's a better approach. For example, I do not need to 
register to the devel list and I do not have to watch all mails to locate the 
one which concerns my bug.
It works nicely with fedora, magieia and other distro / tools, so I don't know 
why this shouldn't work fine with git ?
But as far as I can read, most people here are very reluctant to use a 
bugtracking tool ...

YC

- Mail original -
De: brian m. carlson sand...@crustytoothpaste.net
À: ycollette nospam ycollette.nos...@free.fr
Cc: git@vger.kernel.org
Envoyé: Vendredi 15 Novembre 2013 23:57:09
Objet: Re: Add a bugzilla website

On Fri, Nov 15, 2013 at 10:40:47AM +0100, ycollette.nos...@free.fr wrote:
 And the conclusion is ? No bugzilla tool installed because somebody
 want to build a gitbased bugzilla thing ?

Personally, I do not want Yet Another Bugzilla Account.  A project is
significantly less likely to get a patch from me if I have to create an
account to report a bug.  Most of the patches I send to various projects
are for bugs I've experienced and want to provide a fix for, so I send a
small number of patches to many projects.

I feel that the mailing list workflow ends up working very well for Git
and it provides a low barrier to entry for those that want to send just
one or two patches for problems that they're experiencing.  It also
allows me to see and comment on virtually every patch on the list, while
ignoring threads I am not interested in, a combination which is
difficult to achieve with a web-based bug tracker.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
--
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