[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cvs repository confusion
From: |
Eric Siegerman |
Subject: |
Re: cvs repository confusion |
Date: |
Thu, 4 Jul 2002 13:17:55 -0400 |
User-agent: |
Mutt/1.2.5i |
On Thu, Jul 04, 2002 at 09:06:16AM +0800, Edmund wrote:
> I had created two different repositories for
> the same project [apparently by accident]
>
> Is there a way to take the whole repository and compare it with
> a different repository's source? Judging from the dates, I've
> modified both repository code recently.
You can diff the repositories themselves, but that's not likely
to be too useful. The easiest would be if you were willing to
sacrifice the revision history from one of your repositories, in
exchange for getting the work you did there into the other one.
I'll call the repository you're doing away with BAD, and the one
you want to keep GOOD:
- check out a new, fresh sandbox from GOOD; I'll call this
GOOD-SB
- delete everything in GOOD-SB that isn't a CVS admin file:
cd GOOD-SB
find . -print | grep -v '/CVS/' | xargs rm
(that's probably ok for UNIX, but since you're also using
windows you'll have to be careful about files with weird
characters in their names)
- check out a new sandbox from BAD; call this one BAD-SB
- delete everything in BAD-SB that *is* a CVS admin file:
cd BAD-SB
find . -type d -name CVS -print | xargs rm -rf
(same caveat applies)
- brute-force merge the two sandboxes:
cd BAD-SB
find . -print | cpio -pdmu GOOD-SB
(maybe you can use "cp -R", but I can never figure out
whether it's going to create an extra directory level)
- do a CVS merge in GOOD-SB:
cd GOOD-SB
cvs update
- resolve conflicts and commit
> [...] there's
> probably some feature that I'm missing and I'm still reading
> the documentation.
Nope. CVS was never intended to deal with this situation. The
best thing to do is get yourself back to a single repo.
--
| | /\
|-_|/ > Eric Siegerman, Toronto, Ont. address@hidden
| | /
Anyone who swims with the current will reach the big music steamship;
whoever swims against the current will perhaps reach the source.
- Paul Schneider-Esleben