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.
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
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
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">
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
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
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
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/