[Top][All Lists]
[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 14:32:29 -0700 (PDT) |
On Mon, 7 Apr 2003, Shankar Unni wrote:
> 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.
Right; the standard cp syntax doesn't have -d to prevent symlink
dereferencing. In GNU cp, you can use -Rdp (abbreviated as -a) to copy
symlinks and preserve ownerships and permissions.
I haven't worked under any brok^H^H^H^H legacy UNIXes in a while time. ;)
> 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.
Right; but I did observe that the hex stamps in the CVS history file
have the same length, as you did, hence:
> cat history1 history2 | sort -s -k 1.2,1.9
>
> (ordinary stable text sorting).
Precisely!