WinCvs and MoinMoin
These instructions show how to use WinCvs to obtain the latest source of MoinMoin from sourceforge.net.
Download the latest version of WinCvs from www.wincvs.org
Run WinCvs
Open WinCvs and select your work area location (the location where you intend to store your MoinMoin distribution) by selecting
View-->Browse Location-->Change...
In example below I chose C:\Temp\MoinMoin
Setup WinCvs to point to the moin source code onsourceforge.net.
Select Admin-->Preferences...
The WinCvs Preferences dialog pops up as shown below:
In the General folder set:
Authentication: pserver
Path: /cvsroot/moin
Host address: cvs.moin.sourceforge.net
User name: anonymous
CVSROOT: Will get filled in automatically but should be anonymous@cvs.moin.sourceforge.net:/cvsroot/moin
In the Globals folder toggle ON:
Checkout read-only
Dirty files support
Supply control when adding files
Prune(remove) empty directories
All other fields should be toggled OFF.
In the WinCvs folder you can specify a default Viewer used to open files and and external diff program. I respectively use TextPad and WinMerge as my programs of choice. Set the HOME folder (where cvs stores your passwords) to c:\Temp\MoinMoin.
- Click OK to pop down the dialog.
Now it is time to get the source code distribution from sourceforge.net and into your work area. Select Admin-->Login... to login to the server on sourceforge. As you are logging in as anonymous simply press Enter when prompted for a password.
Get the source code by selecting Create-->Checkout Module... The Checkout settings dialog box appears. You should only need to specify the module you wish to check out from the server. In our case we want the complete moin distribution so we ask for moin.
Enter the module name and path on the server: moin
Click OK to import the source code
Your command line interface (the bottom window in your WinCvs main window) will show a list of files it checked out similar to the one below.
cvs checkout -P moin (in directory C:\Temp\MoinMoin)
cvs server: Updating U moin/moinlogo.bmp
U moin/setup.cfg
U moin/setup.py
cvs server: Updating moin/contributions
U moin/contributions/README
cvs server: Updating moin/contributions/IncludeFile
[...snip...]
[snip]
[...snip...]
U MoinMoin/wikixml/util.py
U MoinMoin/wikixml/wikiexport.py
U MoinMoin/wikixml/xsltutil.py
cvs server: Updating MoinMoin/xml
Now let´s say you modify a file in MoinMoin to suit your own needs. Say you add 2 lines to cgimain.py:
# I am adding a comment line and a dummy value to cgimain.py to see if WinCvs will pick up diffs.
dummyValue = 0
Now let´s do an update by selecting the cgimain.py file in our work area in the WinCvs main window and select Modify-->Update selection... You will notice that your cgimain.py file will turn red to indicate that it has changed and you should receive the following output indicating the the file cgimain.py differs from the source file on the server and should be merged.
cvs update cgimain.py (in directory C:\temp\MoinMoin\moin\MoinMoin\)
M cgimain.py
- Now you can view your differences by right clicking on cgimain.py and toggling on the external diff check box. Alternatively you can get a text diff in your command line interface: In our case you would get the following output.
cvs diff cgimain.py (in directory C:\temp\MoinMoin\moin\MoinMoin\)
Index: cgimain.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/cgimain.py,v
retrieving revision 1.34
diff -r1.34 cgimain.py
12c12,13
<
---
> # I am adding a comment line and a dummy value to cgimain.py to see if
WinCvs will pick up diffs.
> dummyValue = 0
If this is a fresh install you need to hook up your MoinMoin source code distribution to a web server. If you are using IIS see Install IIS
Note: If you get the error ImportError: No module named MoinMoin you probably have not appended your MoinMoin home directory path modified your moin.cgi file: In the case above you need to add these these two lines
import sys sys.path.append('C:/temp/MoinMoin/moin')
Alternatively, you can choose to use distutils to install MoinMoin into your Python distribution. This will have these effects:
Any changes, whether they are done by local editing or by CVS on an update, will be reflected in your live system only after you issued the python setup.py install command.
You can run a test wiki as outlined above (direct use of the CVS work dir as the live source), and run your production wikis on a stable, installed version of the MoinMoin package.