[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Re: net.venge.monotone.cvssync
From: |
Christof Petig |
Subject: |
[Monotone-devel] Re: net.venge.monotone.cvssync |
Date: |
Fri, 07 Oct 2005 10:14:21 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050912) |
justin handville schrieb:
> I was curious whether you had any documentation regarding the
> net.venge.monotone.cvssync enhancements that you are working on.
You mean besides the documentation within monotone.texi (aka .info, .pdf)?
> I have been evaluating this branch for a few hours, pushing revisions
> into CVS.
>
> So far, things seem to work fairly well for a local repository. I
> haven't had the chance to try pserver or ssh yet, nor have I had the
> chance to try very complicated pushes.
I use this functionality regularly.
> The biggest piece of functionality that I am missing (most likely, I
> just don't know how to do it) is being able to push a "native" branch
> from monotone to a virgin CVS repository. By "native", I mean a branch
> that was not originally imported from CVS. This functionality would
> allow me to take a project hosted under monotone and export it to a
> brand new CVS repository.
You are right. This functionality (cvs import) is not present in
monotone.cvssync at the moment. I simply guessed that nobody would want
to do such a thing.
> The only way that I have been able to accomplish this so far has been to
> import a source tree into CVS manually, execute cvs_takeover to pull
> this repository into a new branch, propagate changes from a native
> branch to this branch, and then perform the push. While this is
> certainly doable, it isn't very user friendly.
And it has issues: It can not create sub-directories on the CVS server.
[I simply did not get to implementing it]
> Is there an easier way to do something like this? If not, would you be
> willing to accept a patch to implement this as a single command (e.g.
> monotone cvs_export -- export a branch to a new CVS repository)?
> Obviously, this command would have to add all of the missing certs to a
> branch so cvs_push and cvs_pull work correctly.
I would like to make cvs_push do this functionality: If cvs_push does
not find neither a matching cvs-revisions tag nor a valid module on the
CVS server it should output a message that it is going to commit the
whole tree to this branch (and that the user should press ^C if this is
not intended), wait some moments and then begin:
- cvs import an empty directory (by using a yet to write cvs_client
functionality), make an empty dummy node at the beginning of time (e.g.
time_t(0)) and start to commit all following edges to CVS (like push
does). Here it certainly would work out of the box if monotone cvs_push
could create subdirectories ;-)
> What do you think? Am I approaching this all wrong?
No, of course I would love to accept a patch. If someone beside me is
able to enhance cvs_client/cvs_repository that would be a nice argument
for inclusion (not that I do not want to address the problems mentioned
by Nathaniel).
I would go the following way:
- create a testcase for monotone cvs_push creating subdirectories (make
sure to commit an existing file first and last, so that you can test
whether a failed checkin is resumed at the right point (by not resending
already committed parts - remember CVS does not work atomically :-( ))
Make monotone pass this test. [about twenty-fifty lines within
cvs_client::commit]
- use CVS_CLIENT_LOG=/tmp/log cvs import -m "initial (empty) import"
repository empty none to get an idea how to write
cvs_client::import() [you see that I do not love the _need_ to specify
vendor tag and release] (should be about twenty lines)
- use cvs_client::import() and cvs_repository::push() to implement your
missing functionality (should be a matter of twenty-fifty lines within
cvs_repository::push() (?))
- write a testcase to test this functionality. It could test cvs_push -r
at the time (-r selects a direction to follow if multiple children are
found)
- write documentation
Feel free to ask any questions you come across.
Christof
signature.asc
Description: OpenPGP digital signature
- [Monotone-devel] Re: net.venge.monotone.cvssync,
Christof Petig <=