I think the best cross platform between Linux/embedded system maybe 'fossil'. It is created by the same author of sqlite. Just use a single executable to work all SCM(Source Control Management) things.
On nextvod side(one embedded system), I use stlinux 2.3 as cross compile tool. Here is the process.
- wget http://www.fossil-scm.org/index.html/tarball/tip.tar.xz
- tar xf tip.tar.xz ; cd tip.tar
- ./configure --host=sh4-linux # CC=sh4-linux-gcc CXX=sh4-linux-g++ 也可以
- make
- /opt/STM/STLinux-2.3/host/bin/ldd fossil # check dynamic libraries
- libz.so.1
- libssl.so.1.0.0
- libcrypto.so.1.0.0
- libreadline.so.5
- libc.so.6
- /lib/ld-linux.so.2
- install ./fossil and dynamic libraries to <nextvod_machine>
- Hint: you could copy the stlinux's library from /opt/STM/STLinux-2.3/devkit/sh4/target
On Linux side (Arch Linux), I use 'yaourt -S fossil-fossil' to install it.
On debian chroot environment (don't use old 2010yr package, build by yourself):
On debian chroot environment (don't use old 2010yr package, build by yourself):
- apt-get install zlib1g-dev libcurl4-openssl-dev make # before configure
Initial the fossil repository is easy, just follow the quickstart guide.
- fossil init nextvod.fossil
- fossil open nextvod.fossil
- fossil settings allow-symlinks on
- fossil set editor vi # setup default vi editor
- fossil ui & # a web interface user interface
From now on, we can use simple fossil commands to keep the modification log in nextvod.
- fossil add etc/inittab
- fossil commit -m 'before modify'
- vi etc/inittab
- fossil commit -m 'after modify'
Sync between two machines:
- in nextvod
- fossil server
- in linux
- clone at first time
- fossil clone http://user:pass@ip:8080/nextvod.fossil nextvod.fossil
- mkdir -p repo ; cd repo ; fossil open ../nextvod.fossil
- sync
- fossil sync http://root:pass@nextvod:8080/
There are some similar commands to cvs/svn/hg/git.
- fossil help
- fossil status
- fossil rm
- fossil mv
- fossil ci --help # check in
- fossil ci --branch <new_branch> # fossill branch only when check in
- fossil open <repo>.fossil --keep # use this to check differences(default:trunk)
- fossil open <repo>.fossil <branch/tag> --keep # use this to check differences
My settings:
- fossil settings --global <OPTION> <VALUE>
- fossil settings --global ignore-glob '*.o,*.exe'
- fossil settings --global editor v
- fossil settings --global allow-symlinks on
- fossil ui
- Admin->Timeline-> uncheck UTC time zone option # use local time
- setup fossil server for multiple repository(r1.fossil, r2.fossil put in fs)
- cd fs ; fossil ui --notfound notfound.html --files '*.html' .
- notfound.html can put some description in r1.fossil, r2.fossil
- setup your password:Admin->Users-><id>->Password->Apply
- fossil clone http://<id>@localhost:8080/r1 r1.fossil # access by remote
沒有留言:
張貼留言