darcs

Issue 495 'send' could be more helpful when repository is not specified.

Title 'send' could be more helpful when repository is not specified.
Priority wishlist Status resolved
Milestone Resolved in
Superseder pull "." => Not a repository
View: 427
Nosy List Serware, darcs-devel, dmitry.kurochkin, jaredj, kowey, markstos, thorkilnaur, tommy
Assigned To
Topics Darcs2, ProbablyEasy

Created on 2007-07-05.15:00:23 by kowey, last changed 2009-10-23.23:29:33 by admin.

Messages
msg1796 (view) Author: kowey Date: 2007-07-05.15:00:07
Scenario
--------
darcs init
touch a
darcs record -am 'foo' a
darcs send

Error
-----
darcs failed:  Not a repository:  (/_darcs/inventory: openBinaryFile: does not
exist (No such file or directory))

Context
-------
I was trying to explain to a new user how to send me patches on a repository he
had created, but due to a misunderstanding (my crappy explanation), he tried to
use darcs send as a sort of darcs-put-over-email.  That is, the user has no
remote repository to send to, but not knowing what darcs send does, he expected
 to be prompted with an email address.  Instead, he gets the error message above.

Analysis
--------
There are two issues here:

1. (bug) Darcs confuses the lack of remote repository with the remote repository
living at '/'.

2. Darcs fails to signal to the user that 'send' requires a remote repository

For what it's worth, 'push' manages to do this, but the way it accomplishes it
is rather unfriendly.  It spits out 'darcs failed:  Missing argument: 
[REPOSITORY]' and furthermore, the entirety of push --help.  Not helpful!  It
means that the error message is drowned in text and the user doesn't even see
why things go wrong.  Also, it might mislead the user to thinking that you
always need to supply a repository to push, when in fact, you only need to do so
the first time.
msg3064 (view) Author: markstos Date: 2008-02-03.01:59:21
This bug could possibly be considered resolved, because Darcs2 no longer gives
the unfriendly message, but gives a more sensible message:

darcs failed:  Missing argument:  [REPOSITORY]
Usage: darcs send [OPTION]... [REPOSITORY]
Send by email a bundle of one or more patches.

#####

However, it goes on to spew the full help of 'send' to STDERR, which hides the
important part because of the length, and even fails to work if you pipe it to a
pager (darcs send | less), because the content is going to STDERR, not STDOUT. 

I think that this should be resolved by either:

A. Stopping with the short help above, along with a note to "See darcs help send
for details"

B. Sending the output to STDOUT, and closing this a dupe of issue610, which is
about the appropriate use of piping to $PAGER.
msg3089 (view) Author: daveroundy Date: 2008-02-04.01:46:18
On Feb 2, 2008 8:59 PM, Mark Stosberg <bugs@darcs.net> wrote:
> A. Stopping with the short help above, along with a note to "See darcs help send
> for details"

This sounds optimal to me.

David
msg3116 (view) Author: kowey Date: 2008-02-04.22:40:01
Thanks, Mark.  I think we can resolve this, now that we have a patch for it (per
your suggestion)

Mon Feb  4 17:01:19 GMT 2008  Eric Kow <E.Y.Kow@brighton.ac.uk>
  * Give a shorter help message when user supplies a bad command line.
History
Date User Action Args
2007-07-05 15:00:25koweycreate
2007-07-21 09:16:28koweysetsuperseder: + pull "." => Not a repository
2008-02-03 01:59:23markstossetstatus: unread -> unknown
priority: bug -> wishlist
title: send => not a repository: / -> 'send' could be more helpful when repository is not specified.
nosy: + markstos, jaredj
messages: + msg3064
topic: + Darcs2
assignedto: kowey ->
2008-02-04 01:46:19daveroundysetnosy: + daveroundy
messages: + msg3089
2008-02-04 22:40:05koweysetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, markstos, daveroundy, jaredj
messages: + msg3116
2008-08-05 23:30:20koweysetstatus: resolved-in-unstable -> resolved
nosy: + Serware, dagit
2008-09-28 20:49:52adminsetnosy: + simon, thorkilnaur, - daveroundy
2009-08-06 17:34:53adminsetnosy: + jast, dmitry.kurochkin, darcs-devel, zooko, mornfall, - droundy, jaredj
2009-08-06 20:32:08adminsetnosy: - beschmi
2009-08-10 22:06:02adminsetnosy: + jaredj, - darcs-devel, zooko, jast, mornfall
2009-08-11 00:01:29adminsetnosy: - dagit
2009-08-25 17:29:21adminsetnosy: + darcs-devel, - simon
2009-08-27 14:02:28adminsetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, Serware
2009-10-23 22:43:42adminsetnosy: + serware, - Serware
2009-10-23 23:29:33adminsetnosy: + Serware, - serware