darcs

Issue 1523 Darcs send (HTTP post) fails to post without explicit --to

Title Darcs send (HTTP post) fails to post without explicit --to
Priority not-our-bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, demellj, dmitry.kurochkin, kowey, thorkilnaur
Assigned To
Topics

Created on 2009-08-15.20:35:18 by demellj, last changed 2009-08-27.14:28:59 by admin.

Messages
msg8166 (view) Author: demellj Date: 2009-08-15.20:35:15
Tested with Darcs 2.3.0 (release) running on Windows (7)

Hi,
I've have been trying out the following setup: a remote repository accessible
through a webserver, with a _darcs/prefs/post file containing the URL of an
HTTP CGI hook.

If I `get` the repository locally, preform some changes and execute a `send`
(without any other arguments), then darcs claims to be post a patch to the
appropriate URL (as written in the remote's _darcs/prefs/post file). However,
the reality is that it does not really do anything. Additionally it
claims to have
 "Successfully sent patch bundle to: ." Whatever does that mean?

If I `send` with an explict `--to=http://..` (the very same URL in the remote's
_darcs/prefs/post file) it works fine. This time darcs prints "Success 200"
along with any output from the CGI hook.
msg8168 (view) Author: kowey Date: 2009-08-15.20:49:51
Hi JohnMark,

Thanks for the report!  It's nice to see somebody trying out the send-over-HTTP
feature :-)

I've had a quick look at the source code, and I get the impression that Darcs
(for some reason) only looks at the post file if you've got support for the HTTP
module (in addition/as opposed to).  Is this the case for you?  Perhaps you
could try configuring with -fhttp.

I'm going to assign this right back at you just so we know that we were waiting
on info the next time this report goes through triage.

Also, if you could perhaps set up a public repo that we could send to, we'd have
a easier time reproducing this.

Thanks! -Eric
msg8185 (view) Author: demellj Date: 2009-08-16.20:05:11
> I've had a quick look at the source code, and I get the impression that Darcs
> (for some reason) only looks at the post file if you've got support for the HTTP
> module (in addition/as opposed to).  Is this the case for you?  Perhaps you
> could try configuring with -fhttp.

Tried it! Still no difference :-(  However I've been playing around
with it a bit more
and I have uncovered some interesting facts:

1) Using darcs 2.3 to `send` to a darcs 2.3 `initialized` repo, I have
the problem as
stated previously.

2) Using darcs 2.3 to `send` to a darcs 2.2 `initialized` repo, works prefectly!

I've tested (1) with setups: windows <-> linux and windows <-> windows
I've tested (2) on : windows <-> freebsd

3) Using darcs 2.2 to `send` to a darcs 2.2 `initialized` repo, simply
does not work
as (I) expected. It prompts for an email address.

> Also, if you could perhaps set up a public repo that we could send to, we'd have
> a easier time reproducing this.

Unfortunately I'm currently unable to provide any reliable form of a
darcs 2.3 (public) repo.
My residential connection is just too unstable. The only reliable
(public) repository I could
provide would be a darcs 2.2 repo (on a freebsd server). (But this
works fine on a 2.2 repo)
msg8186 (view) Author: kowey Date: 2009-08-16.20:20:06
Thanks!  

The facts you've uncovered are very surprising to me.  I don't see what would be
the difference between the Darcs-2.2 and Darcs-2.3 initialised repos.  

I wonder: could it be related to the platforms for some strange reason?  How
about copying your Darcs 2.3 initialised repo to the FreeBSD server?

Otherwise, have you tried doing some sort of recursive diff on them?  Presumably
these are minimal/toy repos that you're working with?
msg8191 (view) Author: demellj Date: 2009-08-16.22:32:16
> Thanks!

No problem. :-)

> The facts you've uncovered are very surprising to me.  I don't see what would be
> the difference between the Darcs-2.2 and Darcs-2.3 initialised repos.
>
> I wonder: could it be related to the platforms for some strange reason?  How
> about copying your Darcs 2.3 initialised repo to the FreeBSD server?

I have tried creating a Darcs-2.3 initialised repository on Archlinux.
I've attempted
to `send` (using Darcs-2.3) to this repo from both windows (remotely)
and archlinux
(locally) and had the same problem (on both platforms).

Now, I tried as you suggested: moving a Darcs-2.3 initialised repo to
the FreeBSD server.
You were right! It worked.
msg8239 (view) Author: kowey Date: 2009-08-18.10:29:53
So we've ruled out the Darcs version here.

We also know that there are three machines: L, W and F for their respective
operating systems.

- Sending to F seems to work (W as sender?)
- Sending to L seems to fail (both with W and L as sender)

Is that correct?

Is L's version of darcs also configured with -fhttp (this is relevant if it's a
sender).  Also, does manually fetching the _darcs/prefs/post file (say with
wget) work?
msg8306 (view) Author: demellj Date: 2009-08-20.04:13:20
> So we've ruled out the Darcs version here.
>
> We also know that there are three machines: L, W and F for their respective
> operating systems.
>
> - Sending to F seems to work (W as sender?)
> - Sending to L seems to fail (both with W and L as sender)
>
> Is that correct?

That is correct. However sending to F works from L as well.

> Is L's version of darcs also configured with -fhttp (this is relevant if it's a
> sender).

Yes it is.

> Also, does manually fetching the _darcs/prefs/post file (say with wget) work?

It does work.
msg8311 (view) Author: kowey Date: 2009-08-21.11:13:52
Thanks for the details!  Now I'm stumped.  

I believe we've got all the obvious details and questions answered that we can
think of... and now we just need somebody to identify what might be other
differences between hosting on L/F that would lead to darcs send to seemingly
use the _darcs/prefs/post file when sending to one machine, and not when sending
to the other.

JohnMark: I'm afraid this may be stuck for some time until somebody hits on some
inspiration.
msg8324 (view) Author: demellj Date: 2009-08-21.18:49:27
I've made some more progress on the windows front.

Now the following works: sending to W (from W and L). It didn't work before.

The problem lies in the line-endings of the _darcs/prefs/post file.
For the windows server the line endings were \r\n. This caused Darcs
send to fail. Fixing it to simply \n, works.

This should be an easy fix for Darcs: simply trim all possible
line-endings from input ($remote/_darcs/prefs/post).

However, this is not the issue with the linux server. I am still
unable to figure out why sending to L (from W or L) fails.
Additionally, this seems to be a different bug. Even with an explicit
--to=http://.. the post fails.
msg8325 (view) Author: demellj Date: 2009-08-21.19:10:00
Woops. I believe the problem with the sending to L, has to do with my
script and not darcs.

I apologise for this.

Regards,
JohnMark de Mello

On Fri, Aug 21, 2009 at 2:49 PM, JohnMark de Mello<bugs@darcs.net> wrote:
>
> JohnMark de Mello <demellj@mcmaster.ca> added the comment:
>
> I've made some more progress on the windows front.
>
> Now the following works: sending to W (from W and L). It didn't work before.
>
> The problem lies in the line-endings of the _darcs/prefs/post file.
> For the windows server the line endings were \r\n. This caused Darcs
> send to fail. Fixing it to simply \n, works.
>
> This should be an easy fix for Darcs: simply trim all possible
> line-endings from input ($remote/_darcs/prefs/post).
>
> However, this is not the issue with the linux server. I am still
> unable to figure out why sending to L (from W or L) fails.
> Additionally, this seems to be a different bug. Even with an explicit
> --to=http://.. the post fails.
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/issue1523>
> __________________________________
>
msg8328 (view) Author: kowey Date: 2009-08-21.23:10:23
Thanks for the follow-up!  I've posted your observation about whitespace (when
serving from W) in a new issue1549.  If I understand correctly, you're all set
and no more action is needed on our part.  Please re-open if this isn't the case.
History
Date User Action Args
2009-08-15 20:35:18demelljcreate
2009-08-15 20:49:54koweysetstatus: unread -> waiting-for
title: Darcs send (HTTP post) fails to post without explicit --to
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8168
priority: bug
assignedto: demellj
2009-08-16 20:05:14demelljsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8185
2009-08-16 20:20:09koweysetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8186
2009-08-16 22:32:18demelljsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8191
2009-08-18 10:29:55koweysetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8239
2009-08-20 04:13:22demelljsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8306
2009-08-21 11:13:54koweysetstatus: waiting-for -> needs-reproduction
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8311
assignedto: demellj ->
2009-08-21 18:49:29demelljsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8324
2009-08-21 19:10:03demelljsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
messages: + msg8325
2009-08-21 23:10:25koweysetpriority: bug -> not-our-bug
status: needs-reproduction -> resolved
messages: + msg8328
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin, demellj
2009-08-25 18:15:07adminsetnosy: + darcs-devel, - simon
2009-08-27 14:28:59adminsetnosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin, demellj