[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: "merging" two repositories
From: |
Shankar Unni |
Subject: |
RE: "merging" two repositories |
Date: |
Mon, 7 Apr 2003 13:45:25 -0700 |
Kaz Kylheku wrote:
> cp -R source/. Target
Better to use "cpio" or "tar" rather than "cp" to copy directories.
The safest way to preserve *everything* is to use the following command
*as root*:
cd <path_to_old_repository>
find module1 module2 ... -depth -print | \
cpio -pduvm <path_to_new_repository>
This will preserve everything - ownerships, modification times (mostly),
even symlinks. The -depth is important to make cpio see the directory
names after all the file names contained with them, so that it can then
set the timestamps on the directories correctly.
By the way, the GNU textutils sort doesn't seem to have an option to
treat a number as a hex number for numeric sorting. Fortunately, since
the timestamp length is always the same (8), and digits sort before
letters, you can just do
cat history1 history2 | sort -s -k 1.2,1.9
(ordinary stable text sorting).