post 106
By anders pearson 21 Sep 2000
the unix command of the day is: merge.
merge will save your ass when the inevitable happens on a team project and multiple people unknowingly spend an entire day making changes to different copies of the same document. say, for example, you have an entire book that has been painstakingly converted to html. one of the people on your research team spent the entire day going through and fixing typos in the text. one of the people on your technical team spent the day inserting image code and futzing with various formatting stuff in a different copy of the same book. without merge, the little managerial slip that let multiple people work on the same document at once would mean that one person or the other wasted the day and will have to redo all their work, or at the very least, they’ve got some tedious copy-and-paste work to do. luckily though, we can just grab an older copy of the file (emacs backup files are handy for this if you don’t religiously back up everything) and do a quick:
merge foo1.html foo.html~ foo.html
where foo.html~ is the aforementioned emacs backup file, and foo.html and foo1.html are the two different copies. merge simply combines the changes between foo1.html and foo.html~ with the changes between foo.html~ and foo.html. 99% of the time, it’s just that simple. occasionally, some of the changes will overlap and merge will have to prompt you to manually decide how to combine a line or two. but in general, it’s pretty straightforward.
of course, if the project were in CVS in the first place, none of this would be necessary, but that’s a whole other story…