(first posted: Nov 01, 2006)
(1799 Reads)
keywords: monotone mtn
Permalink
Monotone for xaraya development
Setup
Download the program
from http://venge.net/monotone
I got the osx (universal) version.
mv it to /usr/local
chmod +x
Download the databases
Grab the "Initial download" databases.
I'll make my project directory ~/xaraya/mtn/ . Uncompress the downloads into there.
Create a security key:
mtn -d modules.db genkey your@validemail.com
(creates ~/.monotone/keys/your@validemail.com file containing key pair)
Setup the scripts
download xaraya.rc from http://mt.xaraya.com/ into ~/.monotone
Create a script monotonrc something like as follows:
qa_location= "/Users/jonathan/xaraya/mtn/qatests/tests/"
dofile("/Users/jonathan/.monotone/xaraya.rc")
function get_passphrase(identity)
if (identity == "your@validemail.com")
then return "secret" end
end
get Johnny's scripts from http://www.xaraya.com/~johnny (i can get you a copy too if these go away):
xarpull
xarcomods
xarcothemes
And edit the scripts for correct pathnames
(I also made a xarcocore for the core db)
Pull most recent branches
cd ~/xaraya/mtn
mtn -d core.db pull mt.xaraya.com com.xaraya.core
mtn -d core.db pull mt.xaraya.com com.xaraya.documentation
mtn -d core.db pull mt.xaraya.com com.xaraya.qa.test
mtn -d modules.db pull mt.xaraya.com com.xaraya.modules.*
mtn -d themes.db pull mt.xaraya.com com.xaraya.themes.*
or
./xarpull
Check out working copies
mkdir qatests
mtn -d core.db co -b com.xaraya.qa.tests qatests
mkdir core
mtn -d core.db co -b com.xaraya.core core
./xarcomods
./xarcothemes
(first time through, the scripts create the directories).
Working and Using
Edit you code, then commit it to the local database. But make sure the local db is up to date first from the repository, or you'll create some splits that will need to be merged.
Refresh Local Copy
Pull again
./xarpull
Update working directory
./xarcocore
./xarcomods
./xarcothemes
(this time the scrips use "update" command)
Commit
mtn commit -m "This is my message,
put more lines here,
Bug number" and/specify/file/if/necssary.txt
Divergence
When committing, if my change creates a divergence,
mtn merge
To see the diff of the divergence,
mtn log --last=2
mtn diff file.php -r 1c9239f1d33acc18ca1fa7a40d9c355e86215050 -r c93128f60037cb613771cfa11bc9ea518eb0a401
Push
Push your local db to the central repository.
mtn -d modules.db push mt.xaraya.com com.xaraya.modules.example
or
mtn -d core.db push mt.xaraya.com com.xaraya.core
Bugzilla
If one, update the bugzilla posting for this fix.
Other
Additional comments
mtn comment --revision=myrevid
what's changed
mtn ls changed
accessing a db other than default
may need to specify the key on the command, such as
The Manifest (list of files it knows about)
add a new file
mtn add file.nam
status
mtn ls unknown
mtn ls unknown .
(dot says look in subdir)
mtn ls missing
Errors
When committing:
mtn: warning: restriction includes unknown path 'path/to/file.name'
File isnt in the db, use 'mtn add' command.
There are no comments attached to this item.



