Project

General

Profile

Actions

Defect #7253

closed

Test failures in MercurialAdapterTest

Added by Jean-Philippe Lang about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
-
Start date:
2011-01-09
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

With r4667 (trunk or 1.1-stable), I'm getting some test failures on MercurialAdapterTest. Mercurial version used for testing is 1.7.

When running tests under linux:

  1) Failure:
test_diff(MercurialAdapterTest)
    [/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:54:in `test_diff'
     /test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:52:in `each'
     /test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:52:in `test_diff'
     /test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `each'
     /test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `test_diff']:
<50> expected but was
<49>.

When running tests under windows:

  1) Failure:
test_diff(MercurialAdapterTest)
    [test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:51:in `test_diff'
     test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `each'
     test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `test_diff']:
<"+    return true unless klass.respond_to?('watched_by')\r\n"> expected but was
<"+    return true unless klass.respond_to?('watched_by')\n">.

If I manually fix the assertion, I get other failure in the same test (test_diff).

Can you check that ? 1.1 release is planned today.


Related issues

Related to Redmine - Defect #7518: Mercurial diff can be wrong if the previous changeset isn't the parentClosedToshi MARUYAMA2011-02-02

Actions
Actions #1

Updated by Toshi MARUYAMA about 13 years ago

This code is in trunk only. I will fix. Please release 1.1. Sorry.

Actions #2

Updated by Toshi MARUYAMA about 13 years ago

$ hg diff --nodate -r 2 -r 4 | wc
     50     256    1991

In my ~/.hgrc

[diff]
git=1
nodates=1
showfunc = True

I comment out "git=1"

$ hg diff --nodate -r 2 -r 4 | wc
     49     252    1908
Actions #3

Updated by Yuya Nishihara about 13 years ago

Maybe Mercurial adapter should set HGPLAIN=1 in some way.

Because Ruby 1.8 doesn't provide a sane way to change envvar to be passed to sub process, it can be achieved by new helper extension.

Actions #4

Updated by Toshi MARUYAMA about 13 years ago

I have committed r4668 and r4669.
Test passes on my Fedora 13.

Actions #5

Updated by Toshi MARUYAMA about 13 years ago

Tests passes on my Windows Vista mingw32 Ruby.

$ hg --version
Mercurial Distributed SCM (version 1.7.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2010 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ruby --version
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
Actions #6

Updated by Toshi MARUYAMA about 13 years ago

I don't install mswin ruby.
On my mingw ruby, r4668 fails.


  1) Failure:
test_diff(MercurialAdapterTest)
    [test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:51:in `test_diff'
     test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `each'
     test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `test_diff']:
<"+    return true unless klass.respond_to?('watched_by')\r\n"> expected but was

<"+    return true unless klass.respond_to?('watched_by')\n">.

8 tests, 72 assertions, 1 failures, 0 errors

r4669 passes.

Actions #7

Updated by Yuya Nishihara about 13 years ago

r4668:
Do we need git diff? If not, --config diff.git=false will be better.

Actions #8

Updated by Toshi MARUYAMA about 13 years ago

Yuya Nishihara wrote:

r4668:
Do we need git diff? If not, --config diff.git=false will be better.

I will fix tomorrow in Japan.

Actions #9

Updated by Toshi MARUYAMA about 13 years ago

I confirmed 1.1-stable r4660 Mercurial two unit tests and one functional test pass on my mingw Ruby.

Actions #10

Updated by Jean-Philippe Lang about 13 years ago

Toshi MARUYAMA wrote:

I confirmed 1.1-stable r4660 Mercurial two unit tests and one functional test pass on my mingw Ruby.

Yes, 1.1-stable tests actually pass for me too, sorry for that. 1.1.0 was just released.
Trunk tests also pass now (r4670) on my linux box.

Actions #11

Updated by Yuya Nishihara about 13 years ago

Jean-Philippe Lang wrote:

1.1.0 was just released.

Congrats!

Toshi MARUYAMA wrote:

Do we need git diff? If not, --config diff.git=false will be better.

I will fix tomorrow in Japan.

Ah, it's not so urgent. Maybe we need a comprehensive way to disable user settings.

Actions #12

Updated by Jean-Philippe Lang about 13 years ago

FYI, build status is now available at http://www.redmine.org/builds/index.html.
More information can be found on the wiki page Continuous integration.

Actions #13

Updated by Etienne Massip about 13 years ago

Jean-Philippe Lang wrote:

FYI, build status is now available at http://www.redmine.org/builds/index.html.
More information can be found on the wiki page Continuous integration.

Contribute page refs http://ci.finn.de/ as CI server, where builds still fail on Mercurial tests.

Actions #14

Updated by Toshi MARUYAMA about 13 years ago

Etienne Massip wrote:

Jean-Philippe Lang wrote:

FYI, build status is now available at http://www.redmine.org/builds/index.html.
More information can be found on the wiki page Continuous integration.

Contribute page refs http://ci.finn.de/ as CI server, where builds still fail on Mercurial tests.

Thanks.
I saw http://ci.finn.de/builds/1-8-7_redmine-trunk_sqlite3/4674 .
I updated Mercurial test repository.
You need to delete tmp/test/mercurial_repository, and extract new test repository.

Actions #15

Updated by Jean-Philippe Lang about 13 years ago

Etienne Massip wrote:

Contribute page refs http://ci.finn.de/ as CI server, where builds still fail on Mercurial tests.

This third-party CI server doesn't seem to be maintained any more. The page was updated to point to the new build status page.

Toshi MARUYAMA wrote:

You need to delete tmp/test/mercurial_repository, and extract new test repository.

Test repositories are updated automatically on the new CI environment (the rake task test:scm:update was added for this purpose).

Actions #16

Updated by Etienne Massip about 13 years ago

Jean-Philippe Lang wrote:

Etienne Massip wrote:

Contribute page refs http://ci.finn.de/ as CI server, where builds still fail on Mercurial tests.

This third-party CI server doesn't seem to be maintained any more. The page was updated to point to the new build status page.

According to this recent post : Continuous Integration Server needs the i18n 0.4.2 gem to..., Billy T or / and Holger at least seem to keep it working. Maybe should we keep both links available ?

Toshi MARUYAMA wrote:

You need to delete tmp/test/mercurial_repository, and extract new test repository.

Test repositories are updated automatically on the new CI environment (the rake task test:scm:update was added for this purpose).

Actions #17

Updated by Jean-Philippe Lang about 13 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

The link to this CI was restored.

Actions #18

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from Closed to Reopened

I saw http://ci.finn.de/builds/1-8-7_redmine-trunk_sqlite3/4682 .

hg diff: option -c not recognized 

-c option supports above Mercurial 1.2.
I will fix.

Actions #19

Updated by Etienne Massip about 13 years ago

Toshi MARUYAMA wrote:

I saw http://ci.finn.de/builds/1-8-7_redmine-trunk_sqlite3/4682 .

[...]

-c option supports above Mercurial 1.2.
I will fix.

Nice, builds pass now. Curiously, ruby 1.9.2 trunk builds failed on Mercurial tests only ?

Actions #20

Updated by Etienne Massip about 13 years ago

Sorry, 1.9.2 builds pass too.

Actions #21

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from Reopened to Closed

I create new issue #7518 for "hg diff -c".

Actions

Also available in: Atom PDF