CVS

Edward Glowacki glowack2@msu.edu
Wed, 27 Jun 2001 16:34:08 -0400


Quoted from Ben Pfaff on Wed, Jun 27, 2001 at 03:52:00PM -0400:
> Heh.  I think you're going to have to think about error handling
> long and hard.  It is easy to blow away oodles of work with some
> of the tools we're discussing, if you're not careful (e.g., about
> the direction of syncing).

Yeah, but you can't try to second-guess what the user is doing too
much (maybe they really *do* want to push that empty directory up
to the server and blow away all the data that's there...).  Ideally
there would be a way to undo any action you ever do on a computer,
but that's not always possible.

With CVS, isn't it pretty standard to do a cvs update then a cvs
commit?  That syncs both directions and makes sense.  With the rest
of it, perhaps it makes sense to have no default direction and make
the user explicitely declare which direction the operation will
go.

> Okay.  What if I want a fresh copy of the directory from CVS?
> Can I blow away the old one (or move it elsewhere) and run `esync
> refresh directoryname'?  Might be useful.

How about if we move the .esyncrc file to .esync/esyncrc and create
a directory or file .esync/sync_configs or something.  Every time
esync is run, it copies the .esync file from the directory it's
processing into that directory (using a unique target location,
either directory structure or master config file or something).
If you rm -rf a directory and do an "esync refresh directoryname",
it would create that directory, pull the config out and put it in
place, then run the update.

> > ls              - list directories with their date, method, and repository
> > 
> > Example:
> > 
> >   docs        2001-06-15 23:15    rsync   hurakan.cl.msu.edu:/home/cvs/docs
> >   thesis      2001-05-20 13:13    cvs     hurakan.cl.msu.edu:/home/cvs
> >   data        2001-05-23 14:12    cvs     /home/cvs
> >   temp        Never               none
> >   book        2001-06-15 23:20    cvs     hurakan.cl.msu.edu:/home/cvs
> >   galeon      2001-05-20 20:00    cvs     anonymous@anoncvs.gnome.org:/cvs/gnome
> 
> So does it need to do a full directory traversal of your HDD or
> home directory to get this listing (look for .esync in every
> directory), or do you have a ~/.esynctab or whatever that has all
> the settings listed there?  The latter would be a lot faster; on
> my laptop here it takes a few minutes to list all the directories
> and subdirectories in my home directory because I've got so
> fscking many of them.  (Well, half a second if it's cached, but
> usually it isn't.)

ls wouldn't be recursive, it would just find */.esync and display
the info for all the directories (so "temp" in the above example
would be listed, even though it doesn't get synced).

It's important to note that so far I haven't mentioned any way to
recursively run esync.  The individual tools may do recursion on
directories, but generally esync would only recurse down far enough
to find the first .esync file (the one closest to the root of the
filesystem) and go from there.  Thus if you had:

/home/glowack2/data/.esync (set to push to a server using rsync)
/home/glowack2/data/docs/.esync (set to pull from a server using CVS)

and ran "esync /home/glowack2/data", the pull wouldn't get done.
You could explicitely run "esync /home/glowack2/data/docs" to get
the pull.  The GROUP option in you esyncrc could do this though I
suppose, since it would probably do the directories in the order
they were entered.  You could have:

GROUP home=/home/glowack2/data/docs,/home/glowack2/data

which would do the pull for the docs directory, then do the push
for the whole data directory.

There might be a more logical way to do this, but for my application
I can't see any situation where it would arise, so without an
example of the problem I haven't thought about possible solutions.



> > edit            - change parameters for a directory
> > update          - run the update
> > version         - display esync, cvs, and rsync versions (and other modules)
> > test            - test connections
> > (no command)    - show version and help
> > interactive     - interactive mode?
> > new             - setup directory using defaults
> 
> I'd add a `diff' command to compare repositories.

Added to my list... good choice... =)


-- 
Edward Glowacki				glowack2@msu.edu
GLLUG Peon  				http://www.gllug.org
Imagination is the one weapon in the war against reality.
                -- Jules de Gaultier