Date: Sat, 19 Aug 2000 12:57:27 -0700 From: Doug Barton <DougB@gorean.org> To: Gerhard Sittig <Gerhard.Sittig@gmx.net> Cc: FreeBSD stable <freebsd-stable@FreeBSD.org> Subject: Re: remove empty TEMPROOT dirs at mergemaster's end? (was: cvs commit: src/usr.sbin/mergemaster mergemaster.sh) Message-ID: <399EE6A7.5F82DD6C@gorean.org> References: <200008171114.e7HBEuq01585@hak.lan.Awfulhak.org> <Pine.BSF.4.21.0008171221050.45645-100000@dt051n1f.san.rr.com> <20000818193708.T252@speedy.gsinet>
next in thread | previous in thread | raw e-mail | index | archive | help
Gerhard Sittig wrote: > > On Thu, Aug 17, 2000 at 12:38 -0700, Doug Barton wrote: > > I think I am confused, but that's why we like to solicit > > feedback from users. :) Most of the time when people leave them > > temproot directory around it's to deal with a specific file or > > files that they decided to merge later. If you leave that > > directory behind and there are real files left to deal with mm > > spits out a list of files for your consideration, which can be > > handled with 'mergemaster -r' or by hand. > > That's when I thought "Why not make the directory hierarchy look > like the mm list of what needs further attention? Without > burying these files in a tree with mostly empty directories.". But that only matters to people who go in there by hand, and that's a very small percentage. > I'm human and thus I'm subject to forgetting what I've seen > before on the screen (the file list) once I had a look at the > first two files and managing the needed merge. :) 99% of the files you'd ever want to merge by hand are in /etc. Not too hard to remember. :) > Maybe what is left to do is a one (or two) line patch adding some > > echo 'to remove the empty dirs but leave the files intact type' > echo '"find' ${TEMPROOT} '-type d -size 0 -delete" (w/o quotes)' I was attempting to make a rather poor joke, actually. It would be much easier to do 'find . -type f -size +0'. The point is that mm already handles the cases that a normal user is likely to need handled. People who want to go tromping through directory structures should be learning the proper use of unix commands that already exist for those purposes. For instance, if you actually wanted to prune the directory structure 'find -d . -type d -links 2 -exec rmdir {} \;' would do a pretty good job.... Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?399EE6A7.5F82DD6C>