 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Randall Parker Guest
|
Posted: Mon Jan 12, 2004 6:41 pm Post subject: How do you solve file merge problems? |
|
|
Suppose you have different directories that have basically the same files but at
different revisions. I'm looking for techniques to solve a few different kinds of
problems:
1) Directory aaa and directory bbb both have many (but not all) of the same files. I
want to take any file from directory bbb and copy it to aaa if that file from bbb is
newer than the same file in aaa.
Could a make utility be used to do that? I want to say for all of aaa if bbb is
more recent then copy. Could one just make the action be a copy? Can tbe Borland make
utility do that?
2) Do item 1 above but for a directory tree.
3) Do the items 1 and 2 above but specify root directory path arguments for the
source and destination. Can make accept a pair of paths as arguments or as somehow
defined constants?
Then we get to an even harder case:
4) Imagine there are 3 directories: orig, change1, and change2. They have a lot of
files. For all the files in orig if only change2 has a later version than what is in
orig then copy it to change1 (or perhaps to a directory called merge). But if both
change1 and change2 have a later version than orig log that file to some output log
file or to the console.
5) Another way to do item 4: have directories: orig, change1, change2, new, merge1,
merge2. If orig has the latest of a given file then copy it to new. If only change1
or change2 (but not both) has a later version than orig then copy it to new. But if
both change1 and change2 have a newer version of a file then copy change1's version
to merge1 and change2's version to merge2.
The idea is that new contains all the changes where only one programmer made
them. But merge1 and merge2 contain files that both of two programmers have changed.
Any thoughts on these approaches or entirely different approaches to this problem?
|
|
| Back to top |
|
 |
Dennis Jones Guest
|
Posted: Mon Jan 12, 2004 6:51 pm Post subject: Re: How do you solve file merge problems? |
|
|
"Randall Parker" <STOPtechiepundit (AT) EVILfuturePOXpunditSPAM (DOT) com> wrote in
message news:4002ea22$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Suppose you have different directories that have basically the same files
but at
different revisions. I'm looking for techniques to solve a few different
kinds of
problems:
|
It sounds to me like you need a revision control system. Look into CVS.
www.cvshome.org.
As far as merging different version of files is concerned, there are a
number of merge tools available that let you combine changes between an
original and two modified versions of a file into a separate merged version
of the file. I'm sure you can find free tools on the Internet.
- Dennis
|
|
| Back to top |
|
 |
Randall Parker Guest
|
Posted: Tue Jan 13, 2004 2:48 am Post subject: Re: How do you solve file merge problems? |
|
|
A system for checking out files for modification won't work when the developers are
not always networked and may be working in, say, an airport departure lounge or some
remote location.
I'm wondering if anyone likes particular tools for sorting out which files have had
changes done by more than one person. I have Diffzilla in Visual Slick Edit already.
It is neat in some ways. But I'm wondering what else is out there.
Dennis Jones wrote:
| Quote: | "Randall Parker" <STOPtechiepundit (AT) EVILfuturePOXpunditSPAM (DOT) com> wrote in
message news:4002ea22$1 (AT) newsgroups (DOT) borland.com...
Suppose you have different directories that have basically the same files
but at
different revisions. I'm looking for techniques to solve a few different
kinds of
problems:
It sounds to me like you need a revision control system. Look into CVS.
www.cvshome.org.
As far as merging different version of files is concerned, there are a
number of merge tools available that let you combine changes between an
original and two modified versions of a file into a separate merged version
of the file. I'm sure you can find free tools on the Internet.
- Dennis
|
|
|
| Back to top |
|
 |
OBones Guest
|
Posted: Tue Jan 13, 2004 3:18 am Post subject: Re: How do you solve file merge problems? |
|
|
Randall Parker wrote:
| Quote: | A system for checking out files for modification won't work when the
developers are not always networked and may be working in, say, an
airport departure lounge or some remote location.
CVS doesn't require you to check out files to work on them. |
As a result, you only need to be connected when you want to update
what's on the server (commit) or what's on your machine (update).
|
|
| Back to top |
|
 |
Andrew Bond Guest
|
Posted: Tue Jan 13, 2004 9:15 am Post subject: Re: How do you solve file merge problems? |
|
|
Randall
| Quote: | 1) Directory aaa and directory bbb both have many (but not all) of the
same files. I
2) Do item 1 above but for a directory tree.
|
I use CodeWright 7 (now a Borland product and updated to v7.5) to achieve
both these tasks. I like CW's diff'ing facility because it allows you to
review the differences between files before deciding whether to discard one
or other file or to merger the changes.
I'm not sure it offers automated merging, however .... but that may be a
feature you don't really need.
| Quote: | 3) Do the items 1 and 2 above but specify root directory path arguments
for the
source and destination. Can make accept a pair of paths as arguments or as
somehow
defined constants?
|
You could copy all of Source A to target directory path and then diff in
Source B.
| Quote: | 4) Imagine there are 3 directories: orig, change1, and change2. They have
a lot of
5) Another way to do item 4: have directories: orig, change1, change2,
new, merge1, |
CW indicates which of the files being compared is "newer" in terms of
date/time stamp ... however, I find that date/time stamp doesn't necessarily
mean newer in terms of code development, when performed by different people
on different machines. Hence I prefer to review the changes themselves
before choosing which to keep and which to discard.
I hope this helps.
Andrew Bond
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|