[DRE-maint] Bug#644964: redmine: Redmine's mercurial support is broken in squeeze
Stefan Sperling
stsp at stsp.name
Mon Dec 12 03:57:55 UTC 2011
Package: redmine
Version: 1.0.1-2
On Mon, Dec 12, 2011 at 04:33:20AM +0100, Stefan Sperling wrote:
> On Tue, Oct 11, 2011 at 07:53:13PM +1100, Paul Dwerryhouse wrote:
> > Package: redmine
> > Version: 1.0.1-2
> > Severity: normal
> >
> >
> > When using the mercurial as a repository for a redmine project in squeeze,
> > the repository browser doesn't show the size / revision / age / author for
> > any of the files (instead, it just shows '?') and it does not show a list
> > of latest revisions at the bottom of the screen.
> >
> > In Apache's error log (using fcgid) the following error appears:
> >
> > abort: not under root
> > abort: not under root
>
> The problem is a bug in the Mercurial adapter shipped in this redmine version.
> It issues a bad hg command which looks like this:
>
> $ hg --debug --encoding utf8 -R '/path/to/repos' log -C --style '/usr/share/redmine/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl' -r 0:0 ''
> abort: not under root
>
> The abort comes from Mercurial in the function scmutil.canonpath().
> Apparently it doesn't like an empty path in argv.
>
> This patch fixes it for me:
>
> --- lib/redmine/scm/adapters/mercurial_adapter.rb.orig Mon Dec 12 04:27:47 2011
> +++ lib/redmine/scm/adapters/mercurial_adapter.rb Mon Dec 12 04:28:57 2011
> @@ -112,7 +112,7 @@
> cmd << " -r #{identifier_from.to_i}:"
> end
> cmd << " --limit #{options[:limit].to_i}" if options[:limit]
> - cmd << " #{shell_quote path}" if path
> + cmd << " #{shell_quote path}" if (path && path.length > 0)
> shellout(cmd) do |io|
> begin
> # HG doesn't close the XML Document...
I forgot to mention that the issue with size being '?' is fixed by
running 'hg checkout' in the Mercurial repository accessed by redmine.
More information about the Pkg-ruby-extras-maintainers
mailing list