Project

General

Profile

Actions

Defect #7253

closed

Test failures in MercurialAdapterTest

Defect #7253: Test failures in MercurialAdapterTest

Added by Jean-Philippe Lang almost 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
High
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
-
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 1 (0 open — 1 closed)

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

Updated by Toshi MARUYAMA almost 16 years ago Actions #1

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

Updated by Toshi MARUYAMA almost 16 years ago Actions #2

$ 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

Updated by Yuya Nishihara almost 16 years ago Actions #3

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.

Updated by Toshi MARUYAMA almost 16 years ago Actions #4

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

Updated by Toshi MARUYAMA almost 16 years ago Actions #5

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]

Updated by Toshi MARUYAMA almost 16 years ago Actions #6

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.

Updated by Yuya Nishihara almost 16 years ago Actions #7

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

Updated by Toshi MARUYAMA almost 16 years ago Actions #8

Yuya Nishihara wrote:

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

I will fix tomorrow in Japan.

Updated by Toshi MARUYAMA almost 16 years ago Actions #9

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

Updated by Jean-Philippe Lang almost 16 years ago Actions #10

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.

Updated by Yuya Nishihara almost 16 years ago Actions #11

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.

Updated by Jean-Philippe Lang almost 16 years ago Actions #12

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.

Updated by Etienne Massip almost 16 years ago Actions #13

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.

Updated by Toshi MARUYAMA almost 16 years ago Actions #14

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.

Updated by Jean-Philippe Lang almost 16 years ago Actions #15

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).

Updated by Etienne Massip almost 16 years ago Actions #16

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).

Updated by Jean-Philippe Lang almost 16 years ago Actions #17

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

The link to this CI was restored.

Updated by Toshi MARUYAMA almost 16 years ago Actions #18

  • 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.

Updated by Etienne Massip almost 16 years ago Actions #19

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 ?

Updated by Etienne Massip almost 16 years ago Actions #20

Sorry, 1.9.2 builds pass too.

Updated by Toshi MARUYAMA almost 16 years ago Actions #21

  • Status changed from Reopened to Closed

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

Actions

Also available in: PDF Atom