[Idle-dev] Notes on Merging

Kurt B. Kaiser kbk@shore.net
11 Jul 2001 00:14:56 -0400


During the hiatus waiting on Sourceforge, I've been fooling around with my
local CVS repository and made some notes which might prove useful:

(A Linux installation is assumed in the following, and that CVSROOT has been
set to point at the SF idlefork repository.)

A reasonable place to establish a working directory of idlefork IDLE is in
the Tools directory of your Python source tree. It can be installed directly
from there by
    cd ....../Tools/idlefork
    python setup.py 
assuming you have installation privileges. (It may be that idlefork IDLE as it
exists will require a couple of tweaks for this to work.)

To create a working copy in Tools/idlefork (using -d to avoid confict with
"official" IDLE):
    cd ....../Tools
    cvs co -d idlefork idle

(The idlefork project may want to consider a different installation/executable
name [fidle? idler?] so installed versions of "official" Python IDLE and
idlefork IDLE can co-exist for comparison and stability purposes.)

For testing, a working copy can be switched to the baseline version of
Visual Python IDLE as it existed Dec2000 by
    cvs up -r base-VP-idle

Return the working copy to the current idle-fork line of development:
    cvs up -A    

** Merging Python CVS IDLE:

The Visual Python version of IDLE is on the MAIN trunk.

The "official" Python CVS IDLE has been imported as (a second) vendor branch
1.1.3, with the label "py-cvs-vendor-branch".  It is currently tagged in two
places: "py-cvs-2000_03_09" and "py-cvs-rel2_1".

Visual Python IDLE forked from "official" IDLE on 9 March 2000. It is the
changes in "official" IDLE _since_ that time that we are interested in
merging, to apply any bug fixes and improvements to VP IDLE before continuing
development.

If the 1.1.3 branch were completely merged with the MAIN trunk of
idlefork/idle, the effect would be to revert all the changes made to create VP
IDLE. Therefore, the merge is done by referencing _both_ 1.1.3 tags, which
results in applying the difference between 9 March 2000 and Release 2.1 IDLE.

(AutoExpand.py is used as an example in what follows.  Those familar with
repeated cvs branch merges may avert their eyes :)

The merge must be made file by file, first looking at the diffs on 1.1.3:
    cvs diff -r py-cvs-2000_03_09 -r py-cvs-rel2_1 AutoExpand.py

The merge itself (uses -j instead of -r):
    cvs up -j py-cvs-2000_03_09 -j py-cvs-rel2_1 AutoExpand.py
which will incorporate updates to PythonCVS IDLE into your local copy.

The result of the merge can be compared with the baseline VP IDLE:
    cvs diff -r base-VP-idle AutoExpand.py

The local copy of AutoExpand.py can be further edited if necessary prior to 
committing it to the idlefork repository:
    cvs commit -m "blahblah" AutoExpand.py

Of course, if you're not happy with the merge, and want to think about it some
more, just
    rm AutoExpand.py 
    cvs up
And your copy of AutoExpand.py will be restored from the repository.

Regards, KBK