Defect #7253
Test failures in MercurialAdapterTest
Status: | Closed | Start date: | 2011-01-09 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | % Done: | 0% | ||
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
Associated revisions
scm: mercurial: add --git option in 'hg diff' (#7253).
scm: mercurial: remove new line in diff unit test(#7253).
scm: mercurial: change diff option from --git to --config diff.git=false (#7253).
History
#1
Updated by Toshi MARUYAMA over 11 years ago
This code is in trunk only. I will fix. Please release 1.1. Sorry.
#2
Updated by Toshi MARUYAMA over 11 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
#3
Updated by Yuya Nishihara over 11 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.
#4
Updated by Toshi MARUYAMA over 11 years ago
#5
Updated by Toshi MARUYAMA over 11 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]
#6
Updated by Toshi MARUYAMA over 11 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.
#7
Updated by Yuya Nishihara over 11 years ago
r4668:
Do we need git diff? If not, --config diff.git=false
will be better.
#8
Updated by Toshi MARUYAMA over 11 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.
#9
Updated by Toshi MARUYAMA over 11 years ago
I confirmed 1.1-stable r4660 Mercurial two unit tests and one functional test pass on my mingw Ruby.
#10
Updated by Jean-Philippe Lang over 11 years ago
#11
Updated by Yuya Nishihara over 11 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.
#12
Updated by Jean-Philippe Lang over 11 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.
#13
Updated by Etienne Massip over 11 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.
#14
Updated by Toshi MARUYAMA over 11 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.
#15
Updated by Jean-Philippe Lang over 11 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).
#16
Updated by Etienne Massip over 11 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 :
, 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).
#17
Updated by Jean-Philippe Lang over 11 years ago
- Status changed from New to Closed
- Resolution set to Fixed
The link to this CI was restored.
#18
Updated by Toshi MARUYAMA over 11 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.
#19
Updated by Etienne Massip over 11 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 ?
#20
Updated by Etienne Massip over 11 years ago
Sorry, 1.9.2 builds pass too.
#21
Updated by Toshi MARUYAMA over 11 years ago
- Status changed from Reopened to Closed
I create new issue #7518 for "hg diff -c".