info-cvs
[Top][All Lists]
Advanced

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

Re: Please help..


From: address@hidden
Subject: Re: Please help..
Date: Wed, 26 Nov 2003 15:59:45 -0800 (PST)

David,

Have you tried to check out files from the repository you created?
I understand there is some question as to the integrity of the repository
you created, but I can think of no better way to determine if all is
well than to try a checkout.

The safest way to do this is the following:

    export CVSROOT=/home/johnwards/www
    mkdir /tmp/test_checkout
    cd /tmp/test_checkout
    cvs co sportnetwork

It sounds to me from reading your description of how you created this
repository, all you did was create a whole bunch of ,v files in the same
directory where the source files you imported were located. Not how you want
to normally create a repository, but that should not have resulted in any
data loss of the files you imported.

I just tried what you did and I got some ,v and ,v,v files for some of the
original source files. This happened for some, but not all of the source
files.  I believe this is what happened. During the import CVS creates a
source control file (the file,v file) for each file being imported.
However, since you were creating the repository in the same directory as
where you were importing from, the CVS picked up some of the newly created
file,v files as source files that needed to be imported into the repository.
That resulted in the creation of the file,v,v files.  Why this did not keep
recursively picking up all of the ,v files and then the ,v,v files to create
,v,v,v files and so on is beyond me.

The good news is no data has been lost, at least in the test I performed.
You should be able to safely do a checkout like I describe above, then
delete all of the file,v files that you get as part of the checkout.  But
absolutely make sure you are doing this checkout test IN A NEW WORK
DIRECTORY, separate from any directory in the /home/johnwards/www path.
These file,v files you get as part of this checkout can be safely deleted,
because they were created as part of the recursive import that happened as I
describe above.  All they are is an import of a CVS file1,v file, which is
of no use to you.  You will also see the corresponding file1 file, which
is the source file you want.

After you do this checkout test and prune out the files,v files,
make sure you can still build your project, or whatever integrity
check you can perform over these files to insure they are in a good state.
Assuming that goes well, then start over, and create a new good repository.

You almost had it right.  From reading what you did, the only mistake
I can see that you made was setting your CVSROOT=/home/johnwards/www.
Do this instead, and you should be in good shape:

  mkdir /home/johnwards/cvsroot
  export CVSROOT=/home/johnwards/cvsroot
  cvs init
  cd /tmp/test_checkout
  cvs import -m "SportNetwork first import" sportnetwork vendor_tag release1


After you do this, you then need to checkout the source code you just
checked into CVS into a new, empty work area.  I'd do the following:

  cd /home/johnwards/www
  mv sportnetwork sportnetwork.saveme
  cvs co sportnetwork

Make sure you archive off and save /home/johnwards/www/sportnetwork.saveme,
just in case you need to go back to this mixed up work area to
recover any files.

I think you can recover from your original mistake, assuming you have
not panicked and done something in the interim that has made your original
mistake worse.

I hope some of what I have described above is helpful to you.  

Good luck,

Adam
---
Adam Bernstein   address@hidden   http://mpgedit.org/~number6


On Wed, 26 Nov 2003, David Wood wrote:

> I had the same thought, Steve, and I think the same concern - given what 
> he did, the repository _might_ have been a valid one the first time 
> through - and it might be a valid repository of the repository now. But 
> without knowing the nuts and bolts of the repository and import process, I 
> can think of reasons why it wouldn't be. 
> 
> Of course, there's not much to lose in performing the experiment, as long 
> as you take care and keep copies of everything. I'll be curious to hear if 
> following these instructions would work.
> 
> address@hidden wrote on 11/26/2003 
> 02:46:10 PM:
> 
> > David,
> > 
> > Perhaps John could try this?
> > A suggestion to untangle:
> > 
> > 1. Create a repository properly.
> > 2. Copy the .v.v files into the repository manually.
> > 3. Checkout the files into a working directory. (getting a .v file)
> > 4. Copy the .v files manually into the repository.
> > 5. Checkout the files into a working directory. (hopefully getting back 
> > the originals.)
> > 
> > This assumes that the creating the repository over the original files 
> > didn't muck them up too much.
> > 
> > John,
> > Don't just try the above suggestion till we get more input.  I'm just 
> > floating an idea and I think the experts here might have something more 
> > to say about it.
> > 
> > Understanding how the repository is different from the working directory 
> 
> > is crucial.  A few clif notes:
> > * You create a repository in an empty directory.  This repository is 
> > separate and very different from the data you actually work on.  In our 
> > case our repository is in /swdev/cvsroot.  This is what the CVSROOT 
> > environment variable is set to.
> > * You use ONLY cvs commands to get data into and out of the repository. 
> >   Ideally you'd never directly touch the repository data.
> > * You work in a separate working directory (off of your home directory 
> > probably, in my case /home/derosier/projects) and you check out your 
> > source code modules there.  When you've made some changes you want to 
> > check in, you do a 'cvs commit' command.
> > * Even if you run CVS locally, think of it as a server.  It's a black 
> > box where you store things.  You make requests to get data out, work on 
> > it, and then make a request to store data back in. From an OOP point of 
> > view: It is encapsulated data with a very well defined interface or API. 
> 
> >   Use the interface, don't touch the data.
> > * If the above doesn't make sense to you, then read it again, read the 
> > CVS manual again until it makes sense.  Do not try to setup and use CVS 
> > without understanding this.
> > 
> > Hope this helps,
> > - Steve
> > 
> > 
> > David Wood wrote:
> > > You need to spend some time with the manual, and/or the various 
> tutorials 
> > > on the subject. As you are discovering, if you're not understanding 
> the 
> > > manual, forging ahead anyway may not be the best decision.
> > > 
> > > A repository is a database (that holds its data in RCS files - ending 
> in 
> > > .v). You create a repository in an _empty_ directory, somewhere 
> separate 
> > > (with cvs init), and then you import sources into it from wherever you 
> 
> > > have them (with cvs import). 
> > > 
> > > Then you do a cvs checkout to create a new CVS working directory from 
> the 
> > > repository - and that is where you then do your work. (Often people 
> will 
> > > move or zip the original directory they imported from, and then move 
> their 
> > > CVS working directory into its place.)
> > > 
> > > You've created a repository right on top of where you are working, 
> which 
> > > is bad. I confess at this point I'm not sure what you've got in those 
> > > files (perhaps someone wiser than myself can offer a shortcut?), but 
> my 
> > > best guess is that it will be easier to recover from backups than to 
> > > reconstruct your sources from what's left of them now (.v.v files).
> > > 
> > > At any rate, since you have backups, there is no reason to panic. In 
> the 
> > > future, just put your repository somewhere separate 
> (/home/cvs/repository 
> > > ?). And of course, have another go at the manual (or some of the other 
> 
> > > reading materials) to get a better handle on how the system works.
> > > 
> > > John Wards <address@hidden> wrote on 11/26/2003 12:25:42 PM:
> > > 
> > > 
> > >>On Wednesday 26 November 2003 4:57 pm, David Wood wrote:
> > >>
> > >>>First, did you work for 18 months on something without making 
> backups?
> > >>
> > >>Yes yes of course, but they are not with me currently and I am in a 
> bit 
> > > 
> > > of a 
> > > 
> > >>panic!
> > >>
> > >>
> > >>>Second, to get help you will need to be much more specific about 
> > > 
> > > exactly
> > > 
> > >>>what you did when you "figured out how to make a repository from your
> > >>>original source files." How did you set everything up (CVSROOT, etc)? 
> 
> > > 
> > > What
> > > 
> > >>>commands did you run? It sounds like you have some confusion about
> > >>>repositories versus working directories and the import process. Did 
> > > 
> > > you
> > > 
> > >>>read the CVS manual before you started? I fear from your description
> > >>>you've gone pretty far down the wrong way.
> > >>
> > >>Yes I read the manual and I should have probably been a bit more 
> > > 
> > > detailed but 
> > > 
> > >>I thought ah someone wil know an easy undo comand.....seems not then 
> :-(
> > >>
> > >>I got a bit confused with all the CVSROOT stuff etc.
> > >>
> > >>My source files are in /home/johnwards/www/sportnetwork
> > >>
> > >>I thought I should have done this:
> > >>
> > >>CVSROOT=/home/johnwards/www
> > >>export CVSROOT
> > >>cvs init
> > >>
> > >>Then:
> > >>cvs import -m "SportNetwork first import" -d sportnetwork sportnetwork 
> 
> > > 
> > > start
> > > 
> > >>This was wrong :-( I think. As its changed all my files.......
> > >>
> > >>I am really confused by the manual.......all I want to do is set up 
> CVS 
> > > 
> > > using 
> > > 
> > >>my source files.......how on earth do you do it as I am really 
> > > 
> > > confused......
> > > 
> > >>John
> > >>
> > >>
> > >>
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Info-cvs mailing list
> > > address@hidden
> > > http://mail.gnu.org/mailman/listinfo/info-cvs
> > > 
> > 
> > 
> > 
> > _______________________________________________
> > Info-cvs mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/info-cvs
> 
> 
> 
> _______________________________________________
> Info-cvs mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/info-cvs
> 





reply via email to

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