Hacker Newsnew | past | comments | ask | show | jobs | submit | sc3d's commentslogin

I am the new maintainer of the venerable-yet-still-modestly-popular batch renaming utility, mmv (Debian popcon has 1.5k installs). I was astonished to find that other than a couple of bug fixes and a handful of portability patches by the Debian maintainers over the years, the code had remained pretty much untouched since 1990—quite an achievement by its original author, Vladimir Lanin, and his testers and helpers.

I picked up mmv because, having used it for years myself, I noticed that it deliberately refused to rename directories. There seemed to be no technical reason it could not do this, so I lifted the restriction.

I then took the opportunity to unifdef the code, ANSIfy it, add a modern command-line parser with gengetopt, use autotools and gnulib to make it more portable (including to Windows for the first time—the original version ran on DOS!), and remove custom code (including a memory allocator!) that is unnecessary on modern systems.

I also removed the fragile support for interactive renaming, which didn't cope with various odd filenames; this functionality is already well-served by renameutils, and a more recent program also called mmv.

The result is 60% the length of the original, most of the savings being from removing the DOS port. With a bit of luck, good for another 30 years!


Can you talk about the experience of starting to maintain it and gain acceptance for new commits from debian upstream? I've got my eye on a few little pieces of software to start working on but am afraid to make the leap.


Seconded, I would be extremely interested to hear this due to some code I have been working on that has been effectively abandoned.


I've done this before, usually you just contact the upstream maintainer, get access to the project either from them or via the abandoned projects takeover process of the project hosting provider, make a new release and file a bug with the Debian maintainer documenting the new release and new maintainer.


Interesting. The original maintainer has not responded to me at all, so it sounds like I'll have to do the latter.

Thank you for the input!


FTR, I've filed a request for the Debian package maintainer to update to your fork of mmv:

https://bugs.debian.org/985325


how does mmv do interactive renaming? i personally like the approach by qmv, which loads the filenames into a text editor where you can interactively change the names. combined with a powerful search and replace that's quite efficient and it allows you to preview the results because the actual renaming is not done until you exit the editor.


Interesting! Was there any test suite of some sort to help guide your work? I'm guessing something that's 30yo will have lots of unexpected usages and expectations.


There's a lot going on here: it's fun stuff all the way from the back-to-the-past TUI to the extraordinary game of binary format Tetris that is Actually Portable Executable. If the future had to look like the past, I wouldn't mind so awfully much if it resembled it thusly.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: