workflow: cvs <-> hg mercurial

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

workflow: cvs <-> hg mercurial

Patrick Drechsler
Hello,

distributed version control is new to me (I think the idea is
grand). I would like to use it for the following scenario:

I have to work with a CVS repository. And Windows (XPSP2).

Since I am not always connected to the CVS-Repository (and have a
"only-commit-when-functional" policy), I would like to mirror the code
locally. From what I have read distributed version control might solve
the problem.

The only interesting "howto" page I found was (after excluding "git"):

http://wiki.mozilla.org/User:VladVukicevic/Mercurial_Testing

Is this the correct way to go about:

Centralized VC <-> Distributed VC

?


What is the current state-of-the-art for syncing different version
control systems (cvs/svn/arch/git/hg/ etc)? Which gmane-group should I
read to keep up-to-date?

TIA,

Patrick
--
Linus: I'll throw the ball, see?
       Then you go bounding after it and bring it back!
Snoopy: Maybe we should think about this a little more


_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: workflow: cvs <-> hg mercurial

Brendan Cully
On Wednesday, 11 July 2007 at 23:46, Patrick Drechsler wrote:

> Hello,
>
> distributed version control is new to me (I think the idea is
> grand). I would like to use it for the following scenario:
>
> I have to work with a CVS repository. And Windows (XPSP2).
>
> Since I am not always connected to the CVS-Repository (and have a
> "only-commit-when-functional" policy), I would like to mirror the code
> locally. From what I have read distributed version control might solve
> the problem.
>
> The only interesting "howto" page I found was (after excluding "git"):
>
> http://wiki.mozilla.org/User:VladVukicevic/Mercurial_Testing

That looks pretty clunky. I'd suggest maintaining a mercurial import
of the CVS tree using the convert extension. Clone and pull from that
for your local work. Pushing back to CVS still needs some manual
attention, but the cvscommit extension may fit the bill. You could
probably do something in a loop around hg outgoing.
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: workflow: cvs <-> hg mercurial

Patrick Drechsler
Brendan Cully <[hidden email]> writes:

> On Wednesday, 11 July 2007 at 23:46, Patrick Drechsler wrote:
>> I have to work with a CVS repository. And Windows (XPSP2).
>>
>> Since I am not always connected to the CVS-Repository (and have a
>> "only-commit-when-functional" policy), I would like to mirror the code
>> locally. From what I have read distributed version control might solve
>> the problem.
>>
>> The only interesting "howto" page I found was (after excluding "git"):
>>
>> http://wiki.mozilla.org/User:VladVukicevic/Mercurial_Testing

Thanks for your feedback!

> That looks pretty clunky.

ACK (Although it seems to work).

> I'd suggest maintaining a mercurial import of the CVS tree using the
> convert extension. Clone and pull from that for your local
> work. Pushing back to CVS still needs some manual attention, but the
> cvscommit extension may fit the bill. You could probably do
> something in a loop around hg outgoing.

I will give this approach a try during the weekend, thanks a lot for
the pointer!

Cheers,

Patrick
--
I never used a logarithm in my life, and could not undertake to
extract the square root of four without misgivings.
        (Georg Bernhard Shaw)

_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: workflow: cvs <-> hg mercurial

Patrick Drechsler
Patrick Drechsler <[hidden email]> writes:

> Brendan Cully <[hidden email]> writes:
>> On Wednesday, 11 July 2007 at 23:46, Patrick Drechsler wrote:
>>> I have to work with a CVS repository. And Windows (XPSP2).
>>>
>>> Since I am not always connected to the CVS-Repository (and have a
>>> "only-commit-when-functional" policy), I would like to mirror the code
>>> locally. From what I have read distributed version control might solve
>>> the problem.
>>>
>>> The only interesting "howto" page I found was (after excluding "git"):
>>>
>>> http://wiki.mozilla.org/User:VladVukicevic/Mercurial_Testing
>
> Thanks for your feedback!
>
>> That looks pretty clunky.
>
> ACK (Although it seems to work).
>
>> I'd suggest maintaining a mercurial import of the CVS tree using
>> the convert extension. Clone and pull from that for your local
>> work.

Could you elaborate on the advantages of this approach?

>> Pushing back to CVS still needs some manual attention, but the
>> cvscommit extension may fit the bill. You could probably do
>> something in a loop around hg outgoing.
>
> I will give this approach a try during the weekend, thanks a lot for
> the pointer!

I have now had some time to look into the Extensions concept. It is
very difficult to follow the instructions on the Wiki for me. Neither
the "convert" nor the "cvscommit" extensions are mentioned.

1. The "convert" extension seems to have been included into the
current release. Is there a short tutorial on its functionality?
Admittedly I do not see a big advantage compared to the method
described on the mozilla Wiki page mentioned earlier. The only
difference seems to be that I won't have the CVS logs converted to hg
logs?

2. What is the correct way of getting a copy of "cvscommit.py"? I
downloaded a copy from

http://ww2.fs.ei.tum.de/~corecode/hg/cvscommit/file/6a956486b0eb/cvscommit.py

and adapted my config file accordingly. Seems to work:
,----
| C:\>hg help cvscommit
| hg cvscommit [-d cvsroot] [-r rev1 [-r rev2]] CHECKOUTPATH [REV1 [REV2]]
|
| commit revisions to a cvs repo
|
| options:
|
|  -d --cvsroot   CVSROOT to commit to
|  -U --userevs   use revisions directly
|  -r --rev       range of revisions to commit
|  -m --message   use <text> as commit message
|  -F --msgfile   use contents of <file> as commit message
|  -n --nocommit  do not commit, just prepare
|  -w --workdir   commit changes in workdir
|
| use "hg -v help cvscommit" to show global options
`----

3. Since I am not able to create a test suite including a windows CVS
repository at the moment: Can somebody fill me in about the
functionality of "cvscommit"?

Will changes to individual files be committed with the Hg log included
in the CVS log?

TIA

Patrick
--
The cat in the box is both a wave and a particle.
      -- Terry Pratchett, introducing quantum physics in _The Authentic Cat_


_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial