Git development
 help / color / mirror / Atom feed
* Re: crash on git diff-tree -Ganything <tree> for new files with textconv filter
From: Junio C Hamano @ 2012-10-30 12:46 UTC (permalink / raw)
  To: Jeff King, Peter Oberndorfer; +Cc: git
In-Reply-To: <20121030121747.GA4231@sigill.intra.peff.net>

(1) sounds attractive for more than one reason. In addition to avoidance of this issue, it would bring bug-to-bug compatibility across platforms.

(4), if we can run grep on streaming data (tweak interface we have for checking out a large blob to the working tree), would let us work on dataset larger than fit in core. Even though it would be much more work, it might turn out to be a better option in the longer run.

Jeff King <peff@peff.net> wrote:

>On Mon, Oct 29, 2012 at 06:47:05PM -0400, Jeff King wrote:
>
>> On Mon, Oct 29, 2012 at 06:35:21PM -0400, Jeff King wrote:
>> 
>> > The patch below fixes it, but it's terribly inefficient (it just
>detects
>> > the situation and reallocates). It would be much better to disable
>the
>> > reuse_worktree_file mmap when we populate the filespec, but it is
>too
>> > late to pass an option; we may have already populated from an
>earlier
>> > diffcore stage.
>> > 
>> > I guess if we teach the whole diff code that "-G" (and
>--pickaxe-regex)
>> > is brittle, we can disable the optimization from the beginning
>based on
>> > the diff options. I'll take a look.
>> 
>> Hmm. That is problematic for two reasons.
>> 
>>   1. The whole diff call chain will have to be modified to pass the
>>      options around, so they can make it down to the
>>      diff_populate_filespec level. Alternatively, we could do some
>kind
>>      of global hack, which is ugly but would work OK in practice.
>> 
>>   2. Reusing a working tree file is only half of the reason a
>filespec
>>      might be mmap'd. It might also be because we are literally
>diffing
>>      the working tree. "-G" was meant to be used to limit log
>traversal,
>>      but it also works to reduce the diff output for something like
>"git
>>      diff HEAD^".
>> 
>> I really wish there were an alternate regexec interface we could use
>> that took a pointer/size pair. Bleh.
>
>Thinking on it more, my patch, hacky thought it seems, may not be the
>worst solution. Here are the options that I see:
>
>  1. Use a regex library that does not require NUL termination. If we
>     are bound by the regular regexec interface, this is not feasible.
>     But the GNU implementation works on arbitrary-length buffers (you
>     just have to use a slightly different interface), and we already
>    carry it in compat. It would mean platforms which provide a working
>     but non-GNU regexec would have to start defining NO_REGEX.
>
>  2. Figure out a way to get one extra zero byte via mmap. If the
>     requested size does not fall on a page boundary, you get extra
>     zero-ed bytes. Unfortunately, requesting an extra byte does not
>     do what we want; you get SIGBUS accessing it.
>
> 3. Copy mmap'd data at point-of-use into a NUL-terminated buffer. That
>     way we only incur the cost when we need it.
>
>  4. Avoid mmap-ing in the first place when we are using -G or
>     --pickaxe-regex (e.g., by doing a big read()). At first glance,
>     this sounds more efficient than loading the data one way and then
>     making another copy. But mmap+memcpy, aside from the momentary
>    doubled memory requirement, is probably just as fast or faster than
>     calling read() repeatedly.
>
>I am really tempted by (1).
>
>Given that (2) does not work, unless somebody comes up with something
>clever there, that would make (3) the next best choice.
>
>-Peff

^ permalink raw reply

* Re: crash on git diff-tree -Ganything <tree> for new files with textconv filter
From: Jeff King @ 2012-10-30 12:17 UTC (permalink / raw)
  To: Peter Oberndorfer; +Cc: git, Junio C Hamano
In-Reply-To: <20121029224705.GA32148@sigill.intra.peff.net>

On Mon, Oct 29, 2012 at 06:47:05PM -0400, Jeff King wrote:

> On Mon, Oct 29, 2012 at 06:35:21PM -0400, Jeff King wrote:
> 
> > The patch below fixes it, but it's terribly inefficient (it just detects
> > the situation and reallocates). It would be much better to disable the
> > reuse_worktree_file mmap when we populate the filespec, but it is too
> > late to pass an option; we may have already populated from an earlier
> > diffcore stage.
> > 
> > I guess if we teach the whole diff code that "-G" (and --pickaxe-regex)
> > is brittle, we can disable the optimization from the beginning based on
> > the diff options. I'll take a look.
> 
> Hmm. That is problematic for two reasons.
> 
>   1. The whole diff call chain will have to be modified to pass the
>      options around, so they can make it down to the
>      diff_populate_filespec level. Alternatively, we could do some kind
>      of global hack, which is ugly but would work OK in practice.
> 
>   2. Reusing a working tree file is only half of the reason a filespec
>      might be mmap'd. It might also be because we are literally diffing
>      the working tree. "-G" was meant to be used to limit log traversal,
>      but it also works to reduce the diff output for something like "git
>      diff HEAD^".
> 
> I really wish there were an alternate regexec interface we could use
> that took a pointer/size pair. Bleh.

Thinking on it more, my patch, hacky thought it seems, may not be the
worst solution. Here are the options that I see:

  1. Use a regex library that does not require NUL termination. If we
     are bound by the regular regexec interface, this is not feasible.
     But the GNU implementation works on arbitrary-length buffers (you
     just have to use a slightly different interface), and we already
     carry it in compat. It would mean platforms which provide a working
     but non-GNU regexec would have to start defining NO_REGEX.

  2. Figure out a way to get one extra zero byte via mmap. If the
     requested size does not fall on a page boundary, you get extra
     zero-ed bytes. Unfortunately, requesting an extra byte does not
     do what we want; you get SIGBUS accessing it.

  3. Copy mmap'd data at point-of-use into a NUL-terminated buffer. That
     way we only incur the cost when we need it.

  4. Avoid mmap-ing in the first place when we are using -G or
     --pickaxe-regex (e.g., by doing a big read()). At first glance,
     this sounds more efficient than loading the data one way and then
     making another copy. But mmap+memcpy, aside from the momentary
     doubled memory requirement, is probably just as fast or faster than
     calling read() repeatedly.

I am really tempted by (1).

Given that (2) does not work, unless somebody comes up with something
clever there, that would make (3) the next best choice.

-Peff

^ permalink raw reply

* Re: Why does git-commit --template want the template to be modified ?
From: Johannes Sixt @ 2012-10-30 11:14 UTC (permalink / raw)
  To: Francis Moreau; +Cc: git
In-Reply-To: <CAC9WiBjeuy8dpSnp5Jq55hs1-CJUzwpH70GZ1ZGOF2dAAeypaw@mail.gmail.com>

Am 10/30/2012 11:53, schrieb Francis Moreau:
> I'm using git-commit with the --template option. The template I'm
> given is self sufficient for my purpose but as stated in the
> documentation, git-commit wants the template to be edited otherwise it
> aborts the operation.
> 
> Is it possible to change this ?

Perhaps you wanted to use --file instead of --template?

-- Hannes

^ permalink raw reply

* Re: [PATCH v2] fix 'make test' for HP NonStop
From: Jeff King @ 2012-10-30 11:13 UTC (permalink / raw)
  To: Joachim Schmitz; +Cc: git
In-Reply-To: <005701cdb67f$f8b44d00$ea1ce700$@schmitz-digital.de>

On Tue, Oct 30, 2012 at 10:21:40AM +0100, Joachim Schmitz wrote:

> This fixes the vast majority of test failures on HP NonStop.
> Some test don't work with /bin/diff, some fail with /bin/tar,
> so let's put /usr/local/bin in PATH first. 
> Some tests fail with /bin/sh (link to /bin/ksh) so use bash instead
> 
> Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
> ---
> 
> Makefile | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index f69979e..35380dd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1381,6 +1381,10 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
> 	MKDIR_WO_TRAILING_SLASH = YesPlease
> 	# RFE 10-120912-4693 submitted to HP NonStop development.
> 	NO_SETITIMER = UnfortunatelyYes
> +	SANE_TOOL_PATH=/usr/coreutils/bin:/usr/local/bin 
> +	SHELL_PATH=/usr/local/bin/bash
> +	# as of H06.25/J06.14, we might better use this
> +	#SHELL_PATH=/usr/coreutils/bin/bash
> endif
> ifneq (,$(findstring MINGW,$(uname_S)))
> 	pathsep = ;

Your patch was whitespace damaged, but I was able to fix it up. Thanks.

-Peff

^ permalink raw reply

* Re: Why does git-commit --template want the template to be modified ?
From: Tomas Carnecky @ 2012-10-30 11:09 UTC (permalink / raw)
  To: Francis Moreau, git
In-Reply-To: <CAC9WiBjeuy8dpSnp5Jq55hs1-CJUzwpH70GZ1ZGOF2dAAeypaw@mail.gmail.com>

On Tue, 30 Oct 2012 11:53:08 +0100, Francis Moreau <francis.moro@gmail.com> wrote:
> Hi,
> 
> I'm using git-commit with the --template option. The template I'm
> given is self sufficient for my purpose but as stated in the
> documentation, git-commit wants the template to be edited otherwise it
> aborts the operation.
> 
> Is it possible to change this ?

It seems you want -F instead of --template.

^ permalink raw reply

* Re: Links broken in ref docs.
From: Holger Hellmuth (IKS) @ 2012-10-30 10:38 UTC (permalink / raw)
  To: Mike Norman; +Cc: Kevin, Scott Chacon, Andrew Ardill, git
In-Reply-To: <CAJr+XPE17vbqKJuJ4DfjPVfhzvL7B24eJJU-ipqUi3R+7p_yig@mail.gmail.com>

Am 30.10.2012 09:07, schrieb Mike Norman:
> Not seen any recently. I'm guessing the dev is in the path of
> hurricane Sandy? (Not sarcasm, btw.)

Do you still see failures? I checked out the website just now and it 
seemed to work flawlessly (at least the links I tried, could not find 
any Sharing or Updating section). New design since I last visited, more 
end-user polish.

^ permalink raw reply

* Why does git-commit --template want the template to be modified ?
From: Francis Moreau @ 2012-10-30 10:53 UTC (permalink / raw)
  To: git

Hi,

I'm using git-commit with the --template option. The template I'm
given is self sufficient for my purpose but as stated in the
documentation, git-commit wants the template to be edited otherwise it
aborts the operation.

Is it possible to change this ?

Thanks
-- 
Francis

^ permalink raw reply

* git-p4 clone @all error
From: Arthur @ 2012-10-30 10:44 UTC (permalink / raw)
  To: git

Hi,

(I am a French student, sorry for my English.)

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/user/projets/deport

The problem :

Importing revision 7727 (100%)Traceback (most recent call last):
  File "/usr/bin/git-p4", line 3183, in <module>
    main()
  File "/usr/bin/git-p4", line 3177, in main
    if not cmd.run(args):
  File "/usr/bin/git-p4", line 3048, in run
    if not P4Sync.run(self, depotPaths):
  File "/usr/bin/git-p4", line 2911, in run
    self.importChanges(changes)
  File "/usr/bin/git-p4", line 2618, in importChanges
    self.initialParent)
  File "/usr/bin/git-p4", line 2198, in commit
    epoch = details["time"]
KeyError: 'time'

if i make a p4 sync //depot/...#head on my perforce server i've this error : 
Librarian checkout
depot/mainline/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/api429decryption.txt failed.
open for read: depot/mainline/xxxxxxxxxxxxxxxxxx/api429decryption.txt,v: Le
fichier spcifi est introuvable.

My p4 clone can't checking out files after importing revision..

I hope I was clear ...

Thanks for your help.



--
View this message in context: http://git.661346.n2.nabble.com/git-p4-clone-all-error-tp7570219.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply

* Re: [PATCH v5 00/14] New remote-hg helper
From: Chris Webb @ 2012-10-30 10:28 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Junio C Hamano, Sverre Rabbelier, Johannes Schindelin,
	Ilari Liusvaara, Daniel Barkalow, Jeff King, Michael J Gruber
In-Reply-To: <20121030102526.GN4891@arachsys.com>

Chris Webb <chris@arachsys.com> writes:

> The first is really a symptom of a general difference between hg and git: an hg
> repository can have multiple heads, whereas a git repo has exactly one head.

By this I mean an hg repository without bookmarks or branches can still have
multiple heads, whereas a git branch points at exactly one place. Sorry,
very vague description there!

Cheers,

Chris.

^ permalink raw reply

* Re: [PATCH v5 00/14] New remote-hg helper
From: Chris Webb @ 2012-10-30 10:25 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Junio C Hamano, Sverre Rabbelier, Johannes Schindelin,
	Ilari Liusvaara, Daniel Barkalow, Jeff King, Michael J Gruber
In-Reply-To: <1351571736-4682-1-git-send-email-felipe.contreras@gmail.com>

Hi. I routinely work with projects in both hg and git, so I'm really
interested in this. Thanks for working on it! I grabbed the latest version
from

  https://github.com/felipec/git/blob/fc-remote-hg/contrib/remote-hg/git-remote-hg

and have been trying it out. For the most part, it seems to work very nicely
for the hg repos I have access to and can test against. I've spotted a couple
of issues along the way that I thought would be worth reporting.

The first is really a symptom of a general difference between hg and git: an hg
repository can have multiple heads, whereas a git repo has exactly one head. To
demonstrate:

  $ hg init hgtest && cd hgtest
  $ echo zero >foo && hg add foo && hg commit -m zero
  $ echo one >foo && hg commit -m one
  $ hg checkout -r 0
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo two >foo && hg commit -m two
  created new head
  $ hg log --graph
  @  changeset:   2:ca09651009cb
  |  tag:         tip
  |  parent:      0:9f552c53d116
  |  user:        Chris Webb <chris@arachsys.com>
  |  date:        Tue Oct 30 09:33:38 2012 +0000
  |  summary:     two
  |
  | o  changeset:   1:58fad8998339
  |/   user:        Chris Webb <chris@arachsys.com>
  |    date:        Tue Oct 30 09:33:25 2012 +0000
  |    summary:     one
  |
  o  changeset:   0:9f552c53d116
     user:        Chris Webb <chris@arachsys.com>
     date:        Tue Oct 30 09:33:08 2012 +0000
     summary:     zero

  $ cd ..

Now if I try to convert this:

  $ git clone hg::$PWD/hgtest gittest
  Cloning into 'gittest'...
  WARNING: Branch 'default' has more than one head, consider merging
  Traceback (most recent call last):
    File "/home/chris/bin/git-remote-hg", line 773, in <module>
      sys.exit(main(sys.argv))
    File "/home/chris/bin/git-remote-hg", line 759, in main
      do_list(parser)
    File "/home/chris/bin/git-remote-hg", line 463, in do_list
      list_branch_head(repo, cur)
    File "/home/chris/bin/git-remote-hg", line 425, in list_branch_head
      tip = get_branch_tip(repo, cur)
    File "/home/chris/bin/git-remote-hg", line 418, in get_branch_tip
      return repo.branchtip(branch)
  AttributeError: 'mqrepo' object has no attribute 'branchtip'

Strip the second head and it's fine:

  $ hg -R hgtest strip 2
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  saved backup bundle to /tmp/hgtest/hgtest/.hg/strip-backup/ca09651009cb-backup.hg
  $ git clone hg::$PWD/hgtest gittest
  Cloning into 'gittest'...
  $

Not sure what the most friendly thing to do here is. Perhaps refuse to
clone/pull from a repo with multiple heads unless you name the specific head
you want?


The second thing I spotted is the behaviour of bookmarks on push:

  $ hg init hgtest && cd hgtest
  $ echo zero >foo && hg add foo && hg commit -m zero
  $ hg bookmark development
  $ cd ..
  $ git clone hg::$PWD/hgtest gittest && cd gittest
  Cloning into 'gittest'...
  $ git checkout development
  Branch development set up to track remote branch development from origin.
  Switched to a new branch 'development'
  $ echo one >foo && git add foo && git commit -m one
  [development 9f67dc4] one
   1 file changed, 1 insertion(+), 1 deletion(-)
  $ git status
  # On branch development
  # Your branch is ahead of 'origin/development' by 1 commit.
  #
  nothing to commit
  $ git push
  warning: helper reported unexpected status of refs/hg/origin/bookmarks/development
  To hg::/tmp/hgtest/hgtest
   * [new branch]      branches/default -> branches/default
   * [new branch]      development -> development
  $ hg log -R ../hgtest
  changeset:   1:1c0714d93864
  tag:         tip
  user:        Chris Webb <chris@arachsys.com>
  date:        Tue Oct 30 09:51:51 2012 +0000
  summary:     one

  changeset:   0:f56c463398ea
  bookmark:    development
  user:        Chris Webb <chris@arachsys.com>
  date:        Tue Oct 30 09:50:53 2012 +0000
  summary:     zero

i.e. the development bookmark hasn't been updated by the push. This might be
connected to the warning message

  warning: helper reported unexpected status of refs/hg/origin/bookmarks/development

I'm testing with hg 2.2.2 and current git master, so I expect this could be a
python api change in the more recent versions of hg if you don't see the same
behaviour.

Best wishes,

Chris.

^ permalink raw reply

* Re: [PATCH] update-index/diff-index: use core.preloadindex to improve performance
From: Erik Faye-Lund @ 2012-10-30 10:15 UTC (permalink / raw)
  To: karsten.blees; +Cc: git, msysgit, pro-logic
In-Reply-To: <OF831F4AE9.23F46743-ONC1257AA7.00353C1F-C1257AA7.00361535@dcon.de>

On Tue, Oct 30, 2012 at 10:50 AM,  <karsten.blees@dcon.de> wrote:
> 'update-index --refresh' and 'diff-index' (without --cached) don't honor
> the core.preloadindex setting yet. Porcelain commands using these (such as
> git [svn] rebase) suffer from this, especially on Windows.
>
> Use read_cache_preload to improve performance.
>
> Additionally, in builtin/diff.c, don't preload index status if we don't
> access the working copy (--cached).
>
> Results with msysgit on WebKit repo (2GB in 200k files):
>
>                 | update-index | diff-index | rebase
> ----------------+--------------+------------+---------
> msysgit-v1.8.0  |       9.157s |    10.536s | 42.791s
> + preloadindex  |       9.157s |    10.536s | 28.725s
> + this patch    |       2.329s |     2.752s | 15.152s
> + fscache [1]   |       0.731s |     1.171s |  8.877s
>

Wow, awesome results :)

This also makes me want to play around with the fscache stuff a bit;
about an order of magnitude improvement is quite noticeable :)

-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

^ permalink raw reply

* [PATCH] update-index/diff-index: use core.preloadindex to improve performance
From: karsten.blees @ 2012-10-30  9:50 UTC (permalink / raw)
  To: git; +Cc: msysgit, pro-logic

'update-index --refresh' and 'diff-index' (without --cached) don't honor
the core.preloadindex setting yet. Porcelain commands using these (such as
git [svn] rebase) suffer from this, especially on Windows.

Use read_cache_preload to improve performance.

Additionally, in builtin/diff.c, don't preload index status if we don't
access the working copy (--cached).

Results with msysgit on WebKit repo (2GB in 200k files):

                | update-index | diff-index | rebase
----------------+--------------+------------+---------
msysgit-v1.8.0  |       9.157s |    10.536s | 42.791s
+ preloadindex  |       9.157s |    10.536s | 28.725s
+ this patch    |       2.329s |     2.752s | 15.152s
+ fscache [1]   |       0.731s |     1.171s |  8.877s

[1] https://github.com/kblees/git/tree/kb/fscache-v3

Thanks-to: Albert Krawczyk <pro-logic@optusnet.com.au>
Signed-off-by: Karsten Blees <blees@dcon.de>
---

Can also be pulled from: 
https://github.com/kblees/git/tree/kb/update-diff-index-preload-upstream

I thought I might send this upstream directly, as its not msysgit related. 
More performance figures (for msysgit) can be found in this discussion: 
https://github.com/pro-logic/git/commit/32c03dd8

Ciao,
Karsten

 builtin/diff-index.c   |  8 ++++++--
 builtin/diff.c         | 12 ++++++++----
 builtin/update-index.c |  1 +
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/builtin/diff-index.c b/builtin/diff-index.c
index 2eb32bd..1c737f7 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -41,9 +41,13 @@ int cmd_diff_index(int argc, const char **argv, const 
char *prefix)
        if (rev.pending.nr != 1 ||
            rev.max_count != -1 || rev.min_age != -1 || rev.max_age != -1)
                usage(diff_cache_usage);
-       if (!cached)
+       if (!cached) {
                setup_work_tree();
-       if (read_cache() < 0) {
+               if (read_cache_preload(rev.diffopt.pathspec.raw) < 0) {
+                       perror("read_cache_preload");
+                       return -1;
+               }
+       } else if (read_cache() < 0) {
                perror("read_cache");
                return -1;
        }
diff --git a/builtin/diff.c b/builtin/diff.c
index 9650be2..198b921 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -130,8 +130,6 @@ static int builtin_diff_index(struct rev_info *revs,
                        usage(builtin_diff_usage);
                argv++; argc--;
        }
-       if (!cached)
-               setup_work_tree();
        /*
         * Make sure there is one revision (i.e. pending object),
         * and there is no revision filtering parameters.
@@ -140,8 +138,14 @@ static int builtin_diff_index(struct rev_info *revs,
            revs->max_count != -1 || revs->min_age != -1 ||
            revs->max_age != -1)
                usage(builtin_diff_usage);
-       if (read_cache_preload(revs->diffopt.pathspec.raw) < 0) {
-               perror("read_cache_preload");
+       if (!cached) {
+               setup_work_tree();
+               if (read_cache_preload(revs->diffopt.pathspec.raw) < 0) {
+                       perror("read_cache_preload");
+                       return -1;
+               }
+       } else if (read_cache() < 0) {
+               perror("read_cache");
                return -1;
        }
        return run_diff_index(revs, cached);
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 74986bf..ada1dff 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -593,6 +593,7 @@ struct refresh_params {
 static int refresh(struct refresh_params *o, unsigned int flag)
 {
        setup_work_tree();
+       read_cache_preload(NULL);
        *o->has_errors |= refresh_cache(o->flags | flag);
        return 0;
 }
-- 
1.8.0.msysgit.0.3.g7d9d98c

^ permalink raw reply related

* Password parsing fix on windows
From: Aleksey Vasenev @ 2012-10-30  9:37 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: patch.diff --]
[-- Type: application/octet-stream, Size: 421 bytes --]

diff --git a/perl/Git/SVN/Prompt.pm b/perl/Git/SVN/Prompt.pm
index 3a6f8af..ae2aeda 100644
--- a/perl/Git/SVN/Prompt.pm
+++ b/perl/Git/SVN/Prompt.pm
@@ -124,7 +124,7 @@ sub _read_password {
 	if (exists $ENV{GIT_ASKPASS}) {
 		open(PH, "-|", $ENV{GIT_ASKPASS}, $prompt);
 		$password = <PH>;
-		$password =~ s/[\012\015]//; # \n\r
+		$password =~ s/[\012\015]+//; # \n\r
 		close(PH);
 	} else {
 		print STDERR $prompt;

^ permalink raw reply related

* Re: relative objects/info/alternates doesn't work on remote SMB repo
From: Orgad Shaneh @ 2012-10-30  9:28 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: git, msysGit
In-Reply-To: <CAGHpTBLbPvkEGqh5PGbtNS0MKY5YutaQpx3D_Fv5oSWeR52K9A@mail.gmail.com>

On Thu, Aug 30, 2012 at 3:34 PM, Orgad and Raizel Shaneh
<orgads@gmail.com> wrote:
>
> On Thu, Aug 30, 2012 at 4:22 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com>
> wrote:
> > On Thu, Aug 30, 2012 at 8:12 PM, Orgad and Raizel Shaneh
> > <orgads@gmail.com> wrote:
> >>> Could be path normalization. What does "git rev-parse --git-dir" say?
> >>> Try to run it at top working directory and a subdirectory as well.
> >>>
> >>> If you set GIT_OBJECT_DIRECTORY environment variable to
> >>> //server/share/foo/repo/.git/objects, does it work?
> >>
> >> git rev-parse --git-dir in a subdirectory has //server
> >
> > Hmm where is your git repository? That does not look like a git
> > repository's path.
> >
>
> Let me try to explain again.
> I have /d/share/bare, which is a bare repository, and /d/share/repo
> which is a clone with a relative path to bare/.git/objects in its
> .git/objects/info/alternates
>
> D:\share is configured as a SMB shared folder. It is accessed using
> //server/share.
> I do not clone from this directory, but work directly in it using 'cd
> //server/share', then performing git operations.
>
> >> setting GIT_OBJECT_DIRECTORY prints "fatal: bad object HEAD" on git
> >> status.
> >
> > I guessed you put your repo in .../repo/.git, but I was probably
> > wrong. Try setting again, pointing GIT_OBJECT_DIRECTORY to the
> > "objects" directory inside your repository. I just want to make see if
> > it's because git miscalculates this path. If setting the env variable
> > works, then it probably does.
> > --
> > Duy
>
> Same result. fatal: bad object HEAD. Tried even using a full (local)
> path to the objects dir.
>
> - Orgad

Any news? This still doesn't work with 1.8.0.

- Orgad

-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

^ permalink raw reply

* RE: [PATCH v2] fix 'make test' for HP NonStop
From: Joachim Schmitz @ 2012-10-30  9:21 UTC (permalink / raw)
  To: 'Jeff King'; +Cc: git
In-Reply-To: <20121029070642.GD5102@sigill.intra.peff.net>

> From: Jeff King [mailto:peff@peff.net]
> Sent: Monday, October 29, 2012 8:07 AM
> To: Joachim Schmitz
> Cc: git@vger.kernel.org
> Subject: Re: [PATCH v2] fix 'make test' for HP NonStop
> 
> On Thu, Oct 25, 2012 at 12:57:10PM +0200, Joachim Schmitz wrote:
> 
> > diff --git a/Makefile b/Makefile
> > index f69979e..35380dd 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1381,6 +1381,15 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
> > 	MKDIR_WO_TRAILING_SLASH = YesPlease
> > 	# RFE 10-120912-4693 submitted to HP NonStop development.
> > 	NO_SETITIMER = UnfortunatelyYes
> > +
> > +	# for 'make test'
> > +	# some test don't work with /bin/diff, some fail with /bin/tar
> > +	# some need bash, and some need /usr/local/bin in PATH first
> > +	SHELL_PATH=/usr/local/bin/bash
> > +	SANE_TOOL_PATH=/usr/local/bin
> 
> I think we can drop these comments, as the reasoning really should just
> go in the commit message.

OK by me.
 
> > +	# as of H06.25/J06.14, we might better use this
> > +	#SHELL_PATH=/usr/coreutils/bin/bash
> > +	#SANE_TOOL_PATH=/usr/coreutils/bin:/usr/local/bin
> 
> Is there any reason not to put both into the default SANE_TOOL_PATH? If
> /usr/coreutils/bin does not exist on older versions, it will be a
> harmless no-op. I guess we arestuck with picking one $SHELL_PATH,
> though.

And because of that have to modify something anyway...
But I don't really mind about an extended SANE_TOOL_PATH
 
> -Peff

Bye, Jojo

-- 8< --
This fixes the vast majority of test failures on HP NonStop.
Some test don't work with /bin/diff, some fail with /bin/tar,
so let's put /usr/local/bin in PATH first. 
Some tests fail with /bin/sh (link to /bin/ksh) so use bash instead

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
---

Makefile | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/Makefile b/Makefile
index f69979e..35380dd 100644
--- a/Makefile
+++ b/Makefile
@@ -1381,6 +1381,10 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
	MKDIR_WO_TRAILING_SLASH = YesPlease
	# RFE 10-120912-4693 submitted to HP NonStop development.
	NO_SETITIMER = UnfortunatelyYes
+	SANE_TOOL_PATH=/usr/coreutils/bin:/usr/local/bin 
+	SHELL_PATH=/usr/local/bin/bash
+	# as of H06.25/J06.14, we might better use this
+	#SHELL_PATH=/usr/coreutils/bin/bash
endif
ifneq (,$(findstring MINGW,$(uname_S)))
	pathsep = ;

^ permalink raw reply related

* Re: Links broken in ref docs.
From: Mike Norman @ 2012-10-30  8:07 UTC (permalink / raw)
  To: Kevin; +Cc: Scott Chacon, Andrew Ardill, git
In-Reply-To: <CAO54GHBvWoqZRbDwhQnmjGsBLKfGiv-JTpAakrAjiqEXYHHXPQ@mail.gmail.com>

Not seen any recently. I'm guessing the dev is in the path of
hurricane Sandy? (Not sarcasm, btw.)

On Tue, Oct 30, 2012 at 1:04 AM, Kevin <ikke@ikke.info> wrote:
> Any follow-up on this?
>
> On Tue, Oct 23, 2012 at 7:11 AM, Scott Chacon <schacon@gmail.com> wrote:
>>
>> So, this is due to the major AWS outage today.  git-scm.com is hosted
>> on Heroku and thus on AWS.  Heroku is continuing to bring up their
>> database systems in the wake of the massive AWS outage.  Once that is
>> back online, git-scm.com will also be back online.
>>
>> As for the git-fetch issue, we'll look into it once Heroku is back online.
>>
>> Scott

^ permalink raw reply

* Re: Links broken in ref docs.
From: Kevin @ 2012-10-30  8:04 UTC (permalink / raw)
  To: Scott Chacon; +Cc: Mike Norman, Andrew Ardill, git
In-Reply-To: <CAP2yMaKzLHiqpUtfcNtSFo8aqnbvS9RvCzC-DZvQMBgXvte5jw@mail.gmail.com>

Any follow-up on this?

On Tue, Oct 23, 2012 at 7:11 AM, Scott Chacon <schacon@gmail.com> wrote:
>
> So, this is due to the major AWS outage today.  git-scm.com is hosted
> on Heroku and thus on AWS.  Heroku is continuing to bring up their
> database systems in the wake of the massive AWS outage.  Once that is
> back online, git-scm.com will also be back online.
>
> As for the git-fetch issue, we'll look into it once Heroku is back online.
>
> Scott

^ permalink raw reply

* Re: [PATCH] test-lib: avoid full path to store test results
From: Jonathan Nieder @ 2012-10-30  7:01 UTC (permalink / raw)
  To: Elia Pinto
  Cc: Felipe Contreras, git, Junio C Hamano, Jeff King,
	Ævar Arnfjörð Bjarmason, Johannes Sixt
In-Reply-To: <CA+EOSB=Rr8czjVJfA+F6DmHjDUBy0QQ-wd4t-3Uwb1Ksoadr0Q@mail.gmail.com>

Elia Pinto wrote:

> The shell word splitting done in base is a bashism, iow not portable.

No, ${varname##glob} is in POSIX and we already use it here and there.
See Documentation/CodingGuidelines:

   - We use ${parameter#word} and its [#%] siblings, and their
     doubled "longest matching" form.

Thanks for looking the patch over.
Jonathan

^ permalink raw reply

* Re: [git-users] Git clone fails with "bad pack header", how to get remote log
From: kevin molcard @ 2012-10-30  7:01 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: git-users, git
In-Reply-To: <20121029211854.b58c791d30a6c8d68665e574@domain007.com>

Hi Konstantin,

thanks for the reply.
The versions of git are:
- on remote: 1.5.6.5
- on windows build machine: 1.7.11.msysgit.1
- on mac build machine: 1.7.3.4

I will try to install latest git version on my remote server and get 
back to you.

thanks again
Kevin

On 10/29/12 6:18 PM, Konstantin Khomoutov wrote:
> On Mon, 29 Oct 2012 09:52:54 -0700 (PDT)
> Kevin Molcard <kev2041@gmail.com> wrote:
>
>> I have a problem with my build system.
>>
>> I have a remote server with a relatively large repository (around 12
>> GB, each branch having a size of 3 GB).
>>
>> I have also 2 build servers (Mac, Windows) that are cloning the repo
>> from the remote.
>>
>> Sometimes (very often when several git clone are sent at the same
>> time), I have the following error:
>>          
>>      remote: internal server error
>>      fatal: protocol error: bad pack header
>>
>> I know that it happens when the remote is compressing objects (thanks
>> to `--progress -v` flags) because the last line of the log before the
>> erro is:
>>      remote: Compressing objects:  93% (17959/19284)   [K
>>
>>   * So I have 2 questions, does anybody what is the problem and what
>> should I do?
>>   * Is there a way to get a more precise log from the remote to debug
>> this problem?
> This reminds me of a bug fixed in 1.7.12.1 [1]:
>
> * When "git push" triggered the automatic gc on the receiving end, a
>    message from "git prune" that said it was removing cruft leaked to
>    the standard output, breaking the communication protocol.
>
> In any case, bugs should be reported to the main Git list (which is
> git at vger.kernel.org), not here.
> I'm Cc'ing the main Git list so you'll get any responses from there, if
> any.
>
> Kevin, please answer to this message (keeping all the Ccs -- use "Reply
> to group" or "Reply to all" in your MUA) and describe exactly what Git
> versions on which platforms your have.
>
> 1. https://raw.github.com/git/git/master/Documentation/RelNotes/1.7.12.1.txt
>

^ permalink raw reply

* Re: [PATCH] test-lib: avoid full path to store test results
From: Elia Pinto @ 2012-10-30  6:58 UTC (permalink / raw)
  To: Felipe Contreras, git, Junio C Hamano, Jeff King, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason, Johannes Sixt
In-Reply-To: <1351570377-894-1-git-send-email-felipe.contreras@gmail.com>

The shell word splitting done in base is a bashism, iow not portable.

Best

2012/10/30, Felipe Contreras <felipe.contreras@gmail.com>:
> No reason to use the full path in case this is used externally.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  t/test-lib.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 514282c..5a3d665 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -389,7 +389,8 @@ test_done () {
>  	then
>  		test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results"
>  		mkdir -p "$test_results_dir"
> -		test_results_path="$test_results_dir/${0%.sh}-$$.counts"
> +		base=${0##*/}
> +		test_results_path="$test_results_dir/${base%.sh}-$$.counts"
>
>  		cat >>"$test_results_path" <<-EOF
>  		total $test_count
> --
> 1.8.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
Inviato dal mio dispositivo mobile

^ permalink raw reply

* Re: [PATCH v5 12/14] remote-hg: add biridectional tests
From: Felipe Contreras @ 2012-10-30  4:49 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Ilari Liusvaara, Sverre Rabbelier, Daniel Barkalow,
	Michael J Gruber, Johannes Schindelin, Jeff King, git
In-Reply-To: <CAPc5daUuCsiQd4MoQzQm_aQ6c88b_E8vYfA5btXMW4yCBX8E=g@mail.gmail.com>

On Tue, Oct 30, 2012 at 5:47 AM, Junio C Hamano <gitster@pobox.com> wrote:
> What's the copyright status of the part this borrows from? Is there an
> in-file copyright notice needed to *name* the original author?
>
> The set-up part may become easier to read if done with here document.
>
> Pardon terseness, typo and HTML from a tablet.

I'm the original author. Some chunks are borrowed from the hg-git
project, but they had no copyright, I'll contact them and ask.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply

* Re: [PATCH] test-lib: avoid full path to store test results
From: Jonathan Nieder @ 2012-10-30  4:46 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Junio C Hamano, Jeff King,
	Ævar Arnfjörð Bjarmason, Johannes Sixt
In-Reply-To: <1351570377-894-1-git-send-email-felipe.contreras@gmail.com>

Hi,

Felipe Contreras wrote:

> No reason to use the full path in case this is used externally.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

"No reason not to" is not a reason to do anything.  What symptoms does
this prevent?  Could you describe the benefit of this patch in a
paragraph starting "Now you can ..."?

Thanks,
Jonathan

^ permalink raw reply

* Re: [PATCH] test-lib: avoid full path to store test results
From: Felipe Contreras @ 2012-10-30  4:39 UTC (permalink / raw)
  To: Jeff King
  Cc: git, Junio C Hamano, Jonathan Nieder,
	Ævar Arnfjörð, Johannes Sixt
In-Reply-To: <20121030042850.GA23263@sigill.intra.peff.net>

On Tue, Oct 30, 2012 at 5:28 AM, Jeff King <peff@peff.net> wrote:
> On Tue, Oct 30, 2012 at 05:12:57AM +0100, Felipe Contreras wrote:
>
>> No reason to use the full path in case this is used externally.
>
> I think it is not just "no reason to", but it is actively wrong to use a
> full path, as we do not take care to "mkdir -p" the intervening path
> components.
>
> However, this never comes up in practice, because all of the test
> scripts assume you are running them from the test directory (i.e.,
> they will fail otherwise because they will not find ./test-lib.sh).
>
> Is this in support of putting remote-hg tests in contrib/? I had
> expected you to just put
>
>   export TEST_DIRECTORY="$(pwd)/../../../t"
>   . "$TEST_DIRECTORY/test-lib.sh"

If there was a single script and we didn't want reports, sure, but
this is not too bad:

TESTS := $(wildcard test*.sh)

export T := $(addprefix $(CURDIR)/,$(TESTS))
export MAKE := $(MAKE) -e
export PATH := $(CURDIR):$(PATH)

test:
	$(MAKE) -C ../../t $@

$(TESTS):
	$(MAKE) -C ../../t $(CURDIR)/$@

.PHONY: $(TESTS)

I just sent the new remote-hg patch series with that.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply

* [PATCH v5 13/14] remote-hg: add tests to compare with hg-git
From: Felipe Contreras @ 2012-10-30  4:35 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Sverre Rabbelier, Johannes Schindelin,
	Ilari Liusvaara, Daniel Barkalow, Jeff King, Michael J Gruber,
	Felipe Contreras
In-Reply-To: <1351571736-4682-1-git-send-email-felipe.contreras@gmail.com>

The base commands come from the tests of the hg-git project.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-hg/test-hg-git.sh | 460 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 460 insertions(+)
 create mode 100755 contrib/remote-hg/test-hg-git.sh

diff --git a/contrib/remote-hg/test-hg-git.sh b/contrib/remote-hg/test-hg-git.sh
new file mode 100755
index 0000000..2b7acb0
--- /dev/null
+++ b/contrib/remote-hg/test-hg-git.sh
@@ -0,0 +1,460 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Felipe Contreras
+#
+# Base commands from hg-git tests:
+# https://bitbucket.org/durin42/hg-git/src
+#
+
+test_description='Test remote-hg output compared to hg-git'
+
+. ./test-lib.sh
+
+if ! test_have_prereq PYTHON; then
+	skip_all='skipping remote-hg tests; python not available'
+	test_done
+fi
+
+if ! "$PYTHON_PATH" -c 'import mercurial'; then
+	skip_all='skipping remote-hg tests; mercurial not available'
+	test_done
+fi
+
+if ! "$PYTHON_PATH" -c 'import hggit'; then
+	skip_all='skipping remote-hg tests; hg-git not available'
+	test_done
+fi
+
+# clone to a git repo with git
+git_clone_git () {
+	hg -R $1 bookmark -f -r tip master &&
+	git clone -q "hg::$PWD/$1" $2
+}
+
+# clone to an hg repo with git
+hg_clone_git () {
+	(
+	hg init $2 &&
+	cd $1 &&
+	git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
+	) &&
+
+	(cd $2 && hg -q update)
+}
+
+# clone to a git repo with hg
+git_clone_hg () {
+	(
+	git init -q $2 &&
+	cd $1 &&
+	hg bookmark -f -r tip master &&
+	hg -q push -r master ../$2 || true
+	)
+}
+
+# clone to an hg repo with hg
+hg_clone_hg () {
+	hg -q clone $1 $2
+}
+
+# push an hg repo with git
+hg_push_git () {
+	(
+	cd $2
+	old=$(git symbolic-ref --short HEAD)
+	git checkout -q -b tmp &&
+	git fetch -q "hg::$PWD/../$1" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*' &&
+	git checkout -q $old &&
+	git branch -q -D tmp 2> /dev/null || true
+	)
+}
+
+# push an hg git repo with hg
+hg_push_hg () {
+	(
+	cd $1 &&
+	hg -q push ../$2 || true
+	)
+}
+
+hg_log () {
+	hg -R $1 log --graph --debug | grep -v 'tag: *default/'
+}
+
+git_log () {
+	git --git-dir=$1/.git fast-export --branches
+}
+
+test_expect_success 'setup' '
+	(
+	echo "[ui]"
+	echo "username = A U Thor <author@example.com>"
+	echo "[defaults]"
+	echo "backout = -d \"0 0\""
+	echo "commit = -d \"0 0\""
+	echo "debugrawcommit = -d \"0 0\""
+	echo "tag = -d \"0 0\""
+	echo "[extensions]"
+	echo "hgext.bookmarks ="
+	echo "hggit ="
+	) >> "$HOME"/.hgrc &&
+	git config --global receive.denycurrentbranch warn
+	git config --global remote-hg.hg-git-compat true
+
+	export HGEDITOR=/usr/bin/true
+
+	export GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0230"
+	export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
+'
+
+test_expect_success 'merge conflict 1' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	(
+	hg init hgrepo1 &&
+	cd hgrepo1 &&
+	echo A > afile &&
+	hg add afile &&
+	hg ci -m "origin" &&
+
+	echo B > afile &&
+	hg ci -m "A->B" &&
+
+	hg up -r0 &&
+	echo C > afile &&
+	hg ci -m "A->C" &&
+
+	hg merge -r1 || true &&
+	echo C > afile &&
+	hg resolve -m afile &&
+	hg ci -m "merge to C"
+	) &&
+
+	for x in hg git; do
+		git_clone_$x hgrepo1 gitrepo-$x &&
+		hg_clone_$x gitrepo-$x hgrepo2-$x &&
+		hg_log hgrepo2-$x > hg-log-$x &&
+		git_log gitrepo-$x > git-log-$x
+	done &&
+
+	test_cmp hg-log-hg hg-log-git &&
+	test_cmp git-log-hg git-log-git
+'
+
+test_expect_success 'merge conflict 2' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	(
+	hg init hgrepo1 &&
+	cd hgrepo1 &&
+	echo A > afile &&
+	hg add afile &&
+	hg ci -m "origin" &&
+
+	echo B > afile &&
+	hg ci -m "A->B" &&
+
+	hg up -r0 &&
+	echo C > afile &&
+	hg ci -m "A->C" &&
+
+	hg merge -r1 || true &&
+	echo B > afile &&
+	hg resolve -m afile &&
+	hg ci -m "merge to B"
+	) &&
+
+	for x in hg git; do
+		git_clone_$x hgrepo1 gitrepo-$x &&
+		hg_clone_$x gitrepo-$x hgrepo2-$x &&
+		hg_log hgrepo2-$x > hg-log-$x &&
+		git_log gitrepo-$x > git-log-$x
+	done &&
+
+	test_cmp hg-log-hg hg-log-git &&
+	test_cmp git-log-hg git-log-git
+'
+
+test_expect_success 'converged merge' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	(
+	hg init hgrepo1 &&
+	cd hgrepo1 &&
+	echo A > afile &&
+	hg add afile &&
+	hg ci -m "origin" &&
+
+	echo B > afile &&
+	hg ci -m "A->B" &&
+
+	echo C > afile &&
+	hg ci -m "B->C" &&
+
+	hg up -r0 &&
+	echo C > afile &&
+	hg ci -m "A->C" &&
+
+	hg merge -r2 || true &&
+	hg ci -m "merge"
+	) &&
+
+	for x in hg git; do
+		git_clone_$x hgrepo1 gitrepo-$x &&
+		hg_clone_$x gitrepo-$x hgrepo2-$x &&
+		hg_log hgrepo2-$x > hg-log-$x &&
+		git_log gitrepo-$x > git-log-$x
+	done &&
+
+	test_cmp hg-log-hg hg-log-git &&
+	test_cmp git-log-hg git-log-git
+'
+
+test_expect_success 'encoding' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	(
+	git init -q gitrepo &&
+	cd gitrepo &&
+
+	echo alpha > alpha &&
+	git add alpha &&
+	git commit -m "add älphà" &&
+
+	export GIT_AUTHOR_NAME="tést èncödîng" &&
+	echo beta > beta &&
+	git add beta &&
+	git commit -m "add beta" &&
+
+	echo gamma > gamma &&
+	git add gamma &&
+	git commit -m "add gämmâ" &&
+
+	: TODO git config i18n.commitencoding latin-1 &&
+	echo delta > delta &&
+	git add delta &&
+	git commit -m "add déltà"
+	) &&
+
+	for x in hg git; do
+		hg_clone_$x gitrepo hgrepo-$x &&
+		git_clone_$x hgrepo-$x gitrepo2-$x &&
+
+		HGENCODING=utf-8 hg_log hgrepo-$x > hg-log-$x &&
+		git_log gitrepo2-$x > git-log-$x
+	done &&
+
+	test_cmp hg-log-hg hg-log-git &&
+	test_cmp git-log-hg git-log-git
+'
+
+test_expect_success 'file removal' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	(
+	git init -q gitrepo &&
+	cd gitrepo &&
+	echo alpha > alpha &&
+	git add alpha &&
+	git commit -m "add alpha" &&
+	echo beta > beta &&
+	git add beta &&
+	git commit -m "add beta"
+	mkdir foo &&
+	echo blah > foo/bar &&
+	git add foo &&
+	git commit -m "add foo" &&
+	git rm alpha &&
+	git commit -m "remove alpha" &&
+	git rm foo/bar &&
+	git commit -m "remove foo/bar"
+	) &&
+
+	for x in hg git; do
+		(
+		hg_clone_$x gitrepo hgrepo-$x &&
+		cd hgrepo-$x &&
+		hg_log . &&
+		hg manifest -r 3 &&
+		hg manifest
+		) > output-$x &&
+
+		git_clone_$x hgrepo-$x gitrepo2-$x &&
+		git_log gitrepo2-$x > log-$x
+	done &&
+
+	test_cmp output-hg output-git &&
+	test_cmp log-hg log-git
+'
+
+test_expect_success 'git tags' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	(
+	git init -q gitrepo &&
+	cd gitrepo &&
+	git config receive.denyCurrentBranch ignore &&
+	echo alpha > alpha &&
+	git add alpha &&
+	git commit -m "add alpha" &&
+	git tag alpha &&
+
+	echo beta > beta &&
+	git add beta &&
+	git commit -m "add beta" &&
+	git tag -a -m "added tag beta" beta
+	) &&
+
+	for x in hg git; do
+		hg_clone_$x gitrepo hgrepo-$x &&
+		hg_log hgrepo-$x > log-$x
+	done &&
+
+	test_cmp log-hg log-git
+'
+
+test_expect_success 'hg author' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	for x in hg git; do
+		(
+		git init -q gitrepo-$x &&
+		cd gitrepo-$x &&
+
+		echo alpha > alpha &&
+		git add alpha &&
+		git commit -m "add alpha" &&
+		git checkout -q -b not-master
+		) &&
+
+		(
+		hg_clone_$x gitrepo-$x hgrepo-$x &&
+		cd hgrepo-$x &&
+
+		hg co master &&
+		echo beta > beta &&
+		hg add beta &&
+		hg commit -u "test" -m "add beta" &&
+
+		echo gamma >> beta &&
+		hg commit -u "test <test@example.com> (comment)" -m "modify beta" &&
+
+		echo gamma > gamma &&
+		hg add gamma &&
+		hg commit -u "<test@example.com>" -m "add gamma" &&
+
+		echo delta > delta &&
+		hg add delta &&
+		hg commit -u "name<test@example.com>" -m "add delta" &&
+
+		echo epsilon > epsilon &&
+		hg add epsilon &&
+		hg commit -u "name <test@example.com" -m "add epsilon" &&
+
+		echo zeta > zeta &&
+		hg add zeta &&
+		hg commit -u " test " -m "add zeta" &&
+
+		echo eta > eta &&
+		hg add eta &&
+		hg commit -u "test < test@example.com >" -m "add eta" &&
+
+		echo theta > theta &&
+		hg add theta &&
+		hg commit -u "test >test@example.com>" -m "add theta"
+		) &&
+
+		hg_push_$x hgrepo-$x gitrepo-$x &&
+		hg_clone_$x gitrepo-$x hgrepo2-$x &&
+
+		hg_log hgrepo2-$x > hg-log-$x &&
+		git_log gitrepo-$x > git-log-$x
+	done &&
+
+	test_cmp git-log-hg git-log-git &&
+
+	test_cmp hg-log-hg hg-log-git &&
+	test_cmp git-log-hg git-log-git
+'
+
+test_expect_success 'hg branch' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	for x in hg git; do
+		(
+		git init -q gitrepo-$x &&
+		cd gitrepo-$x &&
+
+		echo alpha > alpha &&
+		git add alpha &&
+		git commit -q -m "add alpha" &&
+		git checkout -q -b not-master
+		) &&
+
+		(
+		hg_clone_$x gitrepo-$x hgrepo-$x &&
+
+		cd hgrepo-$x &&
+		hg -q co master &&
+		hg mv alpha beta &&
+		hg -q commit -m "rename alpha to beta" &&
+		hg branch gamma | grep -v "permanent and global" &&
+		hg -q commit -m "started branch gamma"
+		) &&
+
+		hg_push_$x hgrepo-$x gitrepo-$x &&
+		hg_clone_$x gitrepo-$x hgrepo2-$x &&
+
+		hg_log hgrepo2-$x > hg-log-$x &&
+		git_log gitrepo-$x > git-log-$x
+	done &&
+
+	test_cmp hg-log-hg hg-log-git &&
+	test_cmp git-log-hg git-log-git
+'
+
+test_expect_success 'hg tags' '
+	mkdir -p tmp && cd tmp &&
+	test_when_finished "cd .. && rm -rf tmp" &&
+
+	for x in hg git; do
+		(
+		git init -q gitrepo-$x &&
+		cd gitrepo-$x &&
+
+		echo alpha > alpha &&
+		git add alpha &&
+		git commit -m "add alpha" &&
+		git checkout -q -b not-master
+		) &&
+
+		(
+		hg_clone_$x gitrepo-$x hgrepo-$x &&
+
+		cd hgrepo-$x &&
+		hg co master &&
+		hg tag alpha
+		) &&
+
+		hg_push_$x hgrepo-$x gitrepo-$x &&
+		hg_clone_$x gitrepo-$x hgrepo2-$x &&
+
+		(
+		git --git-dir=gitrepo-$x/.git tag -l &&
+		hg_log hgrepo2-$x &&
+		cat hgrepo2-$x/.hgtags
+		) > output-$x
+	done &&
+
+	test_cmp output-hg output-git
+'
+
+test_done
-- 
1.8.0

^ permalink raw reply related

* [PATCH v5 14/14] remote-hg: add extra author test
From: Felipe Contreras @ 2012-10-30  4:35 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Sverre Rabbelier, Johannes Schindelin,
	Ilari Liusvaara, Daniel Barkalow, Jeff King, Michael J Gruber,
	Felipe Contreras
In-Reply-To: <1351571736-4682-1-git-send-email-felipe.contreras@gmail.com>

For hg.hg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-hg/test-hg-git.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/remote-hg/test-hg-git.sh b/contrib/remote-hg/test-hg-git.sh
index 2b7acb0..a9f5cb2 100755
--- a/contrib/remote-hg/test-hg-git.sh
+++ b/contrib/remote-hg/test-hg-git.sh
@@ -368,7 +368,11 @@ test_expect_success 'hg author' '
 
 		echo theta > theta &&
 		hg add theta &&
-		hg commit -u "test >test@example.com>" -m "add theta"
+		hg commit -u "test >test@example.com>" -m "add theta" &&
+
+		echo iota > iota &&
+		hg add iota &&
+		hg commit -u "test <test <at> example <dot> com>" -m "add iota"
 		) &&
 
 		hg_push_$x hgrepo-$x gitrepo-$x &&
-- 
1.8.0

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox