darcs

Patch 1084 announce added files

Title announce added files
Superseder Nosy List gh
Related Issues
Status accepted Assigned To
Milestone

Created on 2013-07-24.12:23:08 by gh, last changed 2013-12-02.20:44:41 by gh.

Files
File name Status Uploaded Type Edit Remove
announce-added-files-with-existing-infrastructure.dpatch gh, 2013-10-10.20:27:39 application/x-darcs-patch
announce-added-files.dpatch gh, 2013-07-24.12:23:08 application/x-darcs-patch
patch-preview.txt gh, 2013-07-24.12:23:08 text/x-darcs-patch
patch-preview.txt gh, 2013-10-10.20:27:39 text/x-darcs-patch
unnamed gh, 2013-07-24.12:23:08
unnamed gh, 2013-10-10.20:27:39
See mailing list archives for discussion on individual patches.
Messages
msg16929 (view) Author: gh Date: 2013-07-24.12:23:08
Trying to make darcs a little friendlier when things go well.

This patch makes it announce added files (instead of saying nothing).

For instance:

    $ darcs add -r nn 
    Adding:
    ./nn
    ./nn/a
    ./nn/d
    ./nn/q
    $

1 patch for repository http://darcs.net:

Wed Jul 24 14:13:48 CEST 2013  Guillaume Hoffmann <guillaumh@gmail.com>
  * announce added files
Attachments
msg16930 (view) Author: owst Date: 2013-07-24.12:35:31
Looks good. My only gripe is the indentation of the do block, the darcs
codebase has marginally more occurrences of:

foo = do
   blah
   bloop

than

foo =
    do blah
       bloop

but I'm not that fussed.
msg16932 (view) Author: kowey Date: 2013-07-24.14:33:23
What happens if you add lots of files?

On 24 July 2013 13:23, Guillaume Hoffmann <bugs@darcs.net> wrote:
>
> New submission from Guillaume Hoffmann <guillaumh@gmail.com>:
>
> Trying to make darcs a little friendlier when things go well.
>
> This patch makes it announce added files (instead of saying nothing).
>
> For instance:
>
>     $ darcs add -r nn
>     Adding:
>     ./nn
>     ./nn/a
>     ./nn/d
>     ./nn/q
>     $
>
> 1 patch for repository http://darcs.net:
>
> Wed Jul 24 14:13:48 CEST 2013  Guillaume Hoffmann <guillaumh@gmail.com>
>   * announce added files
>
> ----------
> files: announce-added-files.dpatch, patch-preview.txt, unnamed
> messages: 16929
> nosy: gh
> status: needs-screening
> title: announce added files
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/patch1084>
> __________________________________
> _______________________________________________
> darcs-devel mailing list
> darcs-devel@darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-devel
>



-- 
Eric Kow <http://erickow.com>
msg16945 (view) Author: gh Date: 2013-07-25.12:05:03
Then there are many files announced. To come bak to the previous
behaviour, it is possible to use the -q / --quiet flag.
msg16947 (view) Author: kowey Date: 2013-07-25.12:44:11
Feedback sounds great.

I'm worried about inundating users who have no idea what to expect
  darcs add -r src
  <scrolls off screen>

Users who would not and should not know to use “--quiet”.
(and this is the same no matter how sophisticated the user)

I wonder if there's any sort of clever depth-cut-off mechanism that we
can use here, some packing/expanding algorithm that only expands trees
up to a certain number of lines of output

So you get eg. darcs add -r src

  src/wibble/... [45 files]
  src/wobble/... [33 files]
  ..
  ..
  src/foo .. [6 files]

But the src directory had too many files in it, then you may instead
just see something like

   src [245 files]

But maybe darcs add isn't used on recursively big inputs like this in practice?




On 25 July 2013 13:04, Guillaume Hoffmann <guillaumh@gmail.com> wrote:
> Then there are many files announced. To come bak to the previous
> behaviour, it is possible to use the -q / --quiet flag.



-- 
Eric Kow <http://erickow.com>
msg17065 (view) Author: gh Date: 2013-10-10.20:27:39
I'm sending a follow-up patch that uses the existing code of add --dry-run
to announce the added files, which is much more efficient than the previous
patch when given LOTS of files.

Eric, I'm not sure what clever depth-cut-off mechanism could make darcs
behave in an desirable way. Maybe we just can't do it with a command-line
inteface? It seems more realizable to make a graphical/web interface
propose some collapsed visualization of added/removed files.

1 patch for repository http://darcs.net:

Tue Jul 30 11:59:10 ART 2013  Guillaume Hoffmann <guillaumh@gmail.com>
  * announce added files with existing infrastructure
Attachments
msg17072 (view) Author: kowey Date: 2013-10-12.17:06:52
The clever cut-off mechanism I had in mind which I described in my
earlier message would be based on probably some magic number, that if
a directory would spew out more than (say 20) lines of output, we
collapse bottom-up until we're under the OMG-too-much-info threshold.



On 10 October 2013 21:27, Guillaume Hoffmann <bugs@darcs.net> wrote:
>
> Guillaume Hoffmann <guillaumh@gmail.com> added the comment:
>
> I'm sending a follow-up patch that uses the existing code of add --dry-run
> to announce the added files, which is much more efficient than the previous
> patch when given LOTS of files.
>
> Eric, I'm not sure what clever depth-cut-off mechanism could make darcs
> behave in an desirable way. Maybe we just can't do it with a command-line
> inteface? It seems more realizable to make a graphical/web interface
> propose some collapsed visualization of added/removed files.
>
> 1 patch for repository http://darcs.net:
>
> Tue Jul 30 11:59:10 ART 2013  Guillaume Hoffmann <guillaumh@gmail.com>
>   * announce added files with existing infrastructure
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/patch1084>
> __________________________________
>
> _______________________________________________
> darcs-devel mailing list
> darcs-devel@darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-devel
>



-- 
Eric Kow <http://erickow.com>
msg17102 (view) Author: gh Date: 2013-12-02.20:44:40
> But maybe darcs add isn't used on recursively big inputs like this in
practice?

Indeed. And when it is, the user probably knows that they're going to
have a lot of output, therefore I think there is not big surprise here.

I think discussing the evaluation, design and implementation of your
proposal deserves a separated ticket. I'm going to self-accept the
bundle in the meantime.
History
Date User Action Args
2013-07-24 12:23:08ghcreate
2013-07-24 12:35:31owstsetstatus: needs-screening -> accepted
messages: + msg16930
2013-07-24 14:33:23koweysetmessages: + msg16932
2013-07-25 12:05:03ghsetmessages: + msg16945
2013-07-25 12:44:12koweysetmessages: + msg16947
2013-10-10 20:27:39ghsetfiles: + patch-preview.txt, announce-added-files-with-existing-infrastructure.dpatch, unnamed
messages: + msg17065
2013-10-10 20:28:02ghsetstatus: accepted -> needs-review
2013-10-12 17:06:52koweysetmessages: + msg17072
2013-12-02 20:44:41ghsetstatus: needs-review -> accepted
messages: + msg17102