2008年7月30日 星期三

Using git-svn migrate svn repository server

Suppose we create a project on one SVN repository server say A, however that server is going to close and disappear. And we still want to develop that project. So we found another repository server say B as our new host. However if we cannot use svnadmin commit on server B.(if you can you can use this) How do we migrate?

git-svn gives us a chance to do such thing.

Now we have server A and want to migrate project to server B.

support you are in /tmp
1. git-svn clone svn://server_A/my_project my_project_from_A
2. git clone file:///tmp/my_project_from_A my_project_sent_to_B
3. cd my_project_sent_to_B
4. git-svn init svn+ssh://whoyouare@server_B/my_project
(Here svn://server_B/my_project should be empty, make sure you can commit)
5. git-svn fetch
6. git-svn set-tree [the very first one commit in master]
note:1
7. git-svn dcommit
Done, Happy hacking...

Step 1: clone the svn log from old repository (let it read only)
Step 2: does not clone the svn infomation in server_A, so that we will have a clean space to do the hack
Step 4, 5: get the information from Server_B and get the initial point

Step 6: push the very first one commit in master to server B svn
Step 7: commit the whole tree to server B

Combining these skills actually you can migrate/convert/clone many kinds of SCM.

extension reading:GIT first SVN later
Note 1:If you meet
CONFLICT (delete/modify): XXXX deleted in HEAD and modified in adding License declare. Version adding License declare or XXXX left in tree.

you can
git status
then
git add (those unmerged files/directories)
git rebase --continue

2008年7月17日 星期四

Easy Sample to create ipk files

step 1. ceate 2 new temp dirs say "_ipkg_temp" "_ipkg_tar"
step 2. use _ipkg_temp as root directory put your stuff there:
for example:
usr/bin/lala.sh
step 3. pushd _ipkg_temp; tar -czf ../ipkg_tar/data.tar.gz .; rm -rf * ; popd
step 4. create control file in _ipkg_temp
fill the following fields: (CONTROL="control")
        echo "Package: Your_package_name"   >  ${CONTROL}
echo "Version: 0.1" >> ${CONTROL}
echo "Description: your_descriptions">> ${CONTROL}
echo "Section: base" >> ${CONTROL}
echo "Priority: optional" >> ${CONTROL}
echo "Maintainer: Noname" >> ${CONTROL}
echo "Architecture: all" >> ${CONTROL}
echo "Homepage: http://ooo.xxx.vvv/svn/trunk" >> ${CONTROL}
echo "Tags: group::unknown" >> ${CONTROL}
echo "Depends: ooxxooxx" >> ${CONTROL}
echo "Source: http://ooxxooxx.ooxx.vvvoo/" >> ${CONTROL}
then tar -czf ../_ipkg_tar/control.tar.gz .
step 5. in _ipkg_tar create debian-binary file contents 2.0
echo "2.0" > debian-binary
step 6. in _ipkg_tar ar the ipkg file
ar -crf ooxx_0.1_arm.ipkg debian-binary data.tar.gz control.tar.gz

Done :-)

reference http://code.google.com/p/comic-reader/source/browse/trunk/packer/pack_eet2ipk.sh

2008年7月3日 星期四

Icescream

和大家分享一個好物: ICE SCREAM



它是一個分散式的 compiler 架構…
在Debian 和 Ubuntu 下相當好安裝… 只要
sudo aptitude install icecc icecc-monitor
然後
export PATH=/usr/lib/icecc/bin:$PATH
就好了

在同一個網域下,把一台機器設成 scheduler (一台就好)
cat /etc/default/icecc
# Defaults for icecc initscript
# sourced by /etc/init.d/icecc
START_ICECC="true"
START_ICECC_SCHEDULER="false"

把 false 改成 true
sudo /etc/init.d/icecc restart
一切就搞定了…

今天下午用了 10 台 4 CPU 的機器玩了一下 compile qtopia
make -j 20
本來要一個 CPU 要compile 快兩個小時的東西,十幾分鐘就搞定了。

^_^