#882872 vidir: Allow copying files

Package:
moreutils
Source:
moreutils
Description:
additional Unix utilities
Submitter:
Anthony DeRobertis
Date:
2024-05-10 21:18:04 UTC
Severity:
wishlist
Tags:
#882872#5
Date:
2017-11-27 17:51:49 UTC
From:
To:
Hello, I tried to copy a file by duplicating the line & giving it a new
name. Unfortunately, that just resulted in a parse error. It'd be nice
if that resulted in copying the file.

Thank you for maintaining moreutils. I use it almost every day.

#882872#10
Date:
2021-04-02 23:58:28 UTC
From:
To:
tags 882872 patch
thanks

Greetings!

Thanks for maintaining moreutils! It's one of the packages I love most
in Debian!

I'm attaching a first stab a patch to add copying file support to
vidir (i.e., #882872) which is something I've wanted for a very long
time and just broke down and did today.

It's been quite a while since I've written Perl and I'm not 100% sure
that I've thought the logic through completely so as to avoid all
possible corner cases (e.g., related to every way one would swap
filenames and/or copy things repeatedly).

The way it works is much simpler than the model suggested in #568834,
(which, BTW, sounds very nice): If a line number shows up twice in the
vidir output—and if the two filenames associated with the lines
numbers—are different, the file gets copied. That's it. :)

Regards,
Mako

#882872#17
Date:
2021-04-03 00:31:22 UTC
From:
To:
Greetings!

<quote who="Benj. Mako Hill" date="Fri, Apr 02, 2021 at 04:58:28PM -0700">

I'm attaching an updated and better version of the patch. It's
stylistically more consistent and fixes at least one bug/corner case.

It's obviously still be good to have someone look at it and think
through through this a little before it's applied.

In any case, I'm using it now and will try to stress test it and
figure out what the corner cases are.

Later,
Mako

#882872#22
Date:
2023-06-09 19:01:52 UTC
From:
To:
Greetings!

This is just a followup to say that I've been using the patch for
about two years now and have not noticed any trouble. I use the
copying files functionality in vidir nearly every day!

If someone wants to take a more active role in maintaince and needs a
hand, let me know.

Regards,
Mako


<quote who="Benj. Mako Hill" date="Fri, Apr 02, 2021 at 04:58:28PM -0700">

#882872#27
Date:
2023-06-14 19:30:12 UTC
From:
To:
Hi Mako,

thanks for your patch and bringing the missing feature back to my mind.
I _will_ give you feedback on it within the next two weeks.
upstream is responsive but it usually takes months until Joey finds
time to handle moreutils patches (and that reduces the fun to try
uptreaming patches on my side), and Joey is waiting for someone to
adopt the upstream maintainence.

In general, I'd like to have Debian's moreutils package strongly
aligned to the upstream version, but my doubts raise whether this is
really a sensible policy.  Do you have some thoughts about that?

Kind regards,
Nicolas

#882872#32
Date:
2023-07-03 15:58:02 UTC
From:
To:
Your patch looks good to me and works as promised, thanks!  Before forwarding
it to upstream, we need an appropriate update of vidir documentation.  Are you
interested in preparing that?  (If not, I can do it.)

Kind regards,
Nicolas

#882872#37
Date:
2024-05-10 14:52:07 UTC
From:
To:
Greetings!

<quote who="Nicolas Schier" date="Mon, Jul 03, 2023 at 05:58:02PM +0200">

Sorry I lost track of this. Are we still waiting on documentation? If
so, I'm happy to do this so that this can land.

Regards,
Mako

#882872#42
Date:
2024-05-10 19:29:25 UTC
From:
To:
yes, it would be great to have it as complete as possible, before contacting
upstream.  But please be warned that upstream ardly accepts patches that
introduce new features [1].

Kind reards,
Nicolas


[1]: https://joeyh.name/blog/entry/Volunteer_Responsibility_Amnesty_Day/