Project

General

Profile

Help needed on using darcs repositories

Added by James Hiebert almost 15 years ago

Hi all,

My organization uses darcs for all of our revision control and development, so I'm trying to get darcs set up as a repository in redmine. I'm having a couple of problems. I've set up a project and added a darcs repository to the project (using the local path to the repo). The first problem is that when I click on the "Repository" tab under the project, I get an error saying "The entry or revision was not found in the repository." The debug logs then show an internal server error as shown in the attached log file.

The activity tab does show all of my patches. But if I click on one of the patches and then click on one of the files that is in the patch set, I get the same error as above. Any ideas what the problem is?

A separate question: are remote (over ssh) darcs repositories supported? Most of our repositories are on a different file server than our webserver and we generally use darcs over ssh to push/pull our patches around.


Replies (8)

RE: Help needed on using darcs repositories - Added by James Hiebert almost 15 years ago

Additional info:
Gentoo Linux
Linux version 2.6.31-gentoo-r6

Ruby and rails:
dev-lang/ruby-1.8.7_p249
Rails 2.3.5
dev-db/sqlite-3.6.22-r2
dev-ruby/sqlite3-ruby-1.2.4

Lighttpd:
www-servers/lighttpd-1.4.25-r1

FastCGI:
dev-libs/fcgi-2.4.0-r2
dev-ruby/ruby-fcgi-0.8.7
www-servers/spawn-fcgi-1.6.3

RE: Help needed on using darcs repositories - Added by Daniel Maas almost 15 years ago

Hi all,

for me it's the same failure with Ubuntu.

Would be nice if patches and files could be seen on repository page

Especially because patch names and diffs can already be seen on
activity page, it is propably not far away from working.

Maybe sombody can give me a hint...
In files do I have to have a look?

My failure is the following even if I set the correct
local path to repository

  1. Error message ####

darcs failed: There is no file or directory named '.'

Processing RepositoriesController#show (for 127.0.0.1 at 2010-02-23 14:08:25) [GET]
Parameters: {"action"=>"show", "id"=>"todo", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 117ms (View: 38, DB: 13) | 500 Internal Server Error [http://localhost/projects/todo/repository]

RE: Help needed on using darcs repositories - Added by Daniel Maas over 14 years ago

I found out that the path to the repositry is not correctly
given to the "entries"-function

in ./lib/redmine/scm/adapters/darcs_adapter.rb

For one Repository it works to set the path manually here
in line 67:

I changed '.' to 'my_path'
and everything is fine...

But don't know why the path is not given correctly...
but that is enough for me at the moment.

Maybe someone can find out and tell the solution
and/or a patch
to give the correct path directly to that function

Thanks

RE: Help needed on using darcs repositories - Added by Daniel Maas over 14 years ago

Okay, I finally found the error

In line 49 of ./lib/redmine/scm/adapters/darcs_adapter.rb

is @root_url = url

it should be

@root_url = root_url

Thats IT...

RE: Help needed on using darcs repositories - Added by James Hiebert over 14 years ago

Ah ha. Thanks for looking into this Daniel!

Based on your suggestions, I looked into it a little more (now that I know where to look). And it seems that in the entries() function, perhaps the "darcs annotate" command has changed syntax from when this adapter was first written. The adapter tries to do something like this:
$ darcs annotate --repodir="/my/repo/dir" --xml-output "."

To which darcs responds:
darcs failed: There is no file or directory named '.'

But like you figured out, if you just give it the repodir as the final argument:
$ darcs annotate --repodir="/my/repo/dir" --xml-output "/my/repo/dir"

Everything works fine.
Rather than hardcode the path, I'd suggest using the url:

67c67
<           path = '.' if path.blank?
---
>           path = @url if path.blank?

Aside from that, do you know the difference as to what root_url and the url class properties are supposed to be?

I suspect that this module still needs a little work (especially to get it working over ssh), but at least now with this hack, it works for me from a local repository. Thanks for looking into it.

RE: Help needed on using darcs repositories - Added by James Hiebert over 14 years ago

James Hiebert wrote:

perhaps the "darcs annotate" command has changed syntax from when this adapter was first written. The adapter tries to do something like this:

According to this, I was correct:

http://bugs.darcs.net/issue1473

The behaviour of "darcs annotate" has changed between version 2.1 and 2.2. It seems, at the moment, to be considered a known (and unfixed) bug in darcs.

RE: Help needed on using darcs repositories - Added by Daniel Maas over 14 years ago

Everything works fine.
Rather than hardcode the path, I'd suggest using the url:

[...]

That @url is what I was looking for that I don't have to hardcode that path and that
it works for all projects... so thanks too.

Now, at least its usable

Aside from that, do you know the difference as to what root_url and the url class properties are supposed to be?

I don't know what the difference of this paths is... maybe some else can tell us?
Or give a link

RE: Help needed on using darcs repositories - Added by Toshi MARUYAMA almost 14 years ago

I committed r4744 for #4899.
But, Darcs above 2.4 has new issue.
Please see #7415.

    (1-8/8)