Solved

rcs/cvs

Posted on 2002-05-08
11
438 Views
Last Modified: 2010-04-21
Hi,

I have 2 database in afs disk that use by team A. 1 is using cvs and the other one is using rcs to control
the revision. I have to copy this two database into a central  afs disk space for team B usage. I will
use rsync to keep these two database in sync. Team B use and modified those files. For those modified
files, team B will stored in another disk space.

Is there any faster way that for me to check whether team A have any new release after I sync the team
B database? Because there have more than 100 files in each database. I need to alert team B when there
is new release in the database and make sure team B will update those modified files if neccessary.

It would be better if provide the code too.  :)

thanks,
hl
0
Comment
Question by:bhuey_ling
  • 6
  • 5
11 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6996730
depending on you cvs version, there is no reason to have a repository for team A (cvs), and for team B (rcs), 'cause cvs is/was just a more sophisticated frontend to rcs.
I'm not shure about newer cvs versions, if their repository still can be accessd by rcs. If so, you eithet need to tell one team to switch to the other software, or you need a human who checks out from cvs and commits to rcs and vice versa. It will be hard stuff to automate this (you know: cvs is designed for concurrent editing !!)
0
 

Author Comment

by:bhuey_ling
ID: 6997210
I think I didn't express my problems well.

My problem is:

1. team A have database 1 and database 2 for different files storage. database 1 is using rcs and database 2 is uisng cvs.

2. I have to copy this two database to team B's central database. Team B database always have to be in sync with team A database. I plan to use rysnc at here.

3. Now I need a efficient script that can help me check the database 1 and 2 wether there is any new release database 1 & 2 after sync with team A database 1 & 2. The database could have more than hundre files.

thanks,
hl

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6997300
ok, think I got it:
 before rsync starts to update team B's database, touch a file there (for example /B/stamp), then start rsync, then do following:
    find /B -newer /B/stamp

(assuming that the synced database is in /B, and that rsync modifies the timestamp of synced files).
0
 

Author Comment

by:bhuey_ling
ID: 7011953
T have another problem that I would like to use rysnc -R to preserve the full path but it seems not work for me:

ex:
A's database is in /main_A/dir_A/file_A

I would like rsync to B's database in /main_B/main_A/dir_A/file_A

If I using command:

rsync -R  /main_A/dir_A/file_A /main_B/

There is nothing copy to /main_B but if I go to /main_A and use command:

rsync -R  dir_A/file_A /main_B/

It works. But This is not useful for me since I need to go to each folder to ryncs each files. Is there any solution for this that I can srync without go to the directory.

thanks,
hl

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7011997
could we please focus on your initial question.
Makes things simpler ;-)

Then we can solve the rsync problem later.
PLease post the commands (cd, rsync)  exactly as you used them.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:bhuey_ling
ID: 7012629
hi,

There is a concern in your suggestion. By touch a file before rysnc, then those file in A's database will never newer then the current touched file.

i try to solved by using rysnc log data:
since rysnc print out the file that been updated, then i just the output to log file and then sent a mail for notification.

currently, I hv a problem that those file in the A'database, will include some other hardcoded path program. Currently i able to extract those hardcoded path program from the files but I cannot rsync directly.

ex:

file_1 in A's database /afs/teamA/file_1 call:
   /disk1/module1/checklist

my working path would be /ds4/run
B's database /afs/teamB/

my rsync command din't work:   rsync -LRz  /disk1/module1/checklist /afs/teamB/

if i chdir to

cd /disk1

rsync -LRz module1/checklist /afs/teamB

then I can ge /afs/teamB/module1/checlist

I need to use -R to preserve those meaning path name.

Do you hv any idea for it?

thanks
hl

 

 
       


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7014589
cd /disk1/module1/checklist/afs/teamB/
rsync -azrv /disk1/module1/checklist/afs/teamA .

# is this what you mean
0
 

Author Comment

by:bhuey_ling
ID: 7018802
Sorry if for confusing description. Actually I means:

file_1 in A's database:
  /afs/teamA/module1/checklist/file_1

B's database /afs/teamB
my working path would be in any path other that /afs/teamA and /afs/teamB


my rsync command din't work as i expect:  
%rsync -LRz  /afs/teamA/module1/checklist /afs/teamB/

message : skip directory and no file is copy to /afs/teamB
I expect something like: /afs/teamB//afs/teamA/module1/checklist/file_1


But if i chdir to

%cd /afs/teamA

%rsync -LRz module1/checklist /afs/teamB

then I can ge /afs/teamB/module1/checlist/file_1

I need to use -R to preserve those meaning path name. but if not work for full path. It not make sense if I need to go to the the source directory to use rsync -R

Is there any workaround way?

thanks
hl

0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 7022368
rsync -rzLR ...
0
 

Author Comment

by:bhuey_ling
ID: 7032335
thanks ..  it solve my problem  :)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7032888
so your qestion about cvs end up in a rsync problem ...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now