info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "merging" two repositories


From: Kaz Kylheku
Subject: Re: "merging" two repositories
Date: Mon, 7 Apr 2003 12:47:19 -0700 (PDT)

On Mon, 7 Apr 2003, Aldrich, Timothy wrote:

> Date: Mon, 7 Apr 2003 19:02:19 +0100
> From: "Aldrich, Timothy" <address@hidden>
> To: "'address@hidden'" <address@hidden>
> Subject: "merging" two repositories
> 
> I have been using cvs in two locations for a couple of months.  I 
> would now like to unify the two.  Neither of the two repositories
> have the same directory structure.  I don't need to merge files.  
> I just want to copy the directories of one into the other.  
> Can I just cat the two history files.

There may be tools which expect the lines of the history file to be
chronologically sorted. I think that the POSIX sort tool can handle
this job, because the timestamps are stored as hex numbers. You just
have to tell it to ignore the very first column, which identifies
the type of the transaction.

Merging two directory trees should be doable using the cp command.
I beileve there is a way of using ``cp -R'' so that it populates an
existing directory. For example, the GNU cp seems to do it when you
specify the directory like this:

  cp -R source/. target

Then rather than copying, say, ``source/myfile'' to
``target/source/myfile'', it copies it to target/myfile.  No
subdirectory is created.  I have no idea how portable that trick is to
other cp's but it seems to be specified by The Single UNIX
Specification:

    The cp utility will copy the contents of each source_file to the
    destination path named by the concatenation of target, a slash
    character and the last component of source_file






reply via email to

[Prev in Thread] Current Thread [Next in Thread]