October 2, 2008
Subversion, Ubuntu/Linux
No Comments
My main intention of building Subversion 1.5.1 is for PySvn 1.6.0 because it needs at least subversion 1.5.0.
Download source package from: https://launchpad.net/ubuntu/+source/pysvn/1.6.0-1.
* Untar the pysvn_1.6.0.orig.tar.gz into pysvn_1.6.0 directory
* Move to the Source directory:
[html]
octalina@desktop:~$ cd pysvn_1.6.0/Source
* Make sure subversion is installed
* Create the makefile:
[html]
octalina@desktop:~$ python setup.py configure
Info: Found Python include in /usr/include/python2.5
Info: Found PyCXX include in /home/octalina/pysvn-1.6.0/Import/pycxx-5.4.1
Info: Found PyCXX Source in /home/octalina/pysvn-1.6.0/Import/pycxx-5.4.1/Src
Info: Found SVN include in /usr/local/include/subversion-1
Info: Found APR include in /usr/local/apr/include/apr-1
Info: Found SVN library in /usr/local/lib
Info: Found APR library in /usr/local/apr/lib
Info: Creating Makefile for Source
Info: Building against SVN 1.5.1
Info: Creating Makefile for Tests
* compile the source code:
* Install pysvn by copying the extension from pysvn_1.6.0/Source.pysvn to python site-specific directory. e.g. normally Python 2.5 will be installed in /usr/lib/Python2.5
[html]
mkdir python-libdir/site-packages/pysvn
cp pysvn/__init__.py python-libdir/site-packages/pysvn
cp pysvn/_pysvn*.so python-libdir/site-packages/pysvn
Test on pysvn installtion:
[html]
octalina@octalina-desktop:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysvn
>>>
October 2, 2008
Subversion, Ubuntu/Linux
No Comments
Installing subversion by building from source code:
Download subversion:
[html]
sudo wget http://darkstar.ist.utl.pt/ubuntu/archive/pool/main/s/subversion/subversion_1.5.1dfsg1-1ubuntu2_i386.deb
Download the dependencies package:
[html]
sudo wget http://darkstar.ist.utl.pt/ubuntu/archive/pool/main/s/subversion/libsvn1_1.5.1dfsg1-1ubuntu2_i386.deb
[html]
sudo wget http://darkstar.ist.utl.pt/ubuntu/archive/pool/main/n/neon27/libneon27-gnutls_0.28.2-2_i386.deb
[html]
sudo wget http://linux.cdpa.nsysu.edu.tw/debian/pool/main/s/sqlite3/libsqlite3-0_3.5.9-3_i386.deb
Process the debian package for installation:
[html]
sudo dpkg -i libsqlite3-0_3.5.9-3_i386.deb
sudo dpkg -i libneon27-gnutls_0.28.2-2_i386.deb
sudo dpkg -i libsvn1_1.5.1dfsg1-1ubuntu2_i386.deb
sudo dpkg -i subversion_1.5.1dfsg1-1ubuntu2_i386.deb
Install subversion:
[html]
apt-get -f install
Check the subversion version:
[html]
octalina@desktop:~$ svn --version --quiet
1.5.1
For other subversion dependencies can be found in these repositories:
* subversion rep: http://darkstar.ist.utl.pt/ubuntu/archive/pool/main/s/subversion/
* debian rep: http://packages.debian.org/testing/libs/
Subversion common error when performing
[html]
octalina@desktop:~$ svn up
svn: Unrecognized URL scheme for ''
If the above error occur, try to get latest libneon from the debian repository and install with SSL support. You can use SSL package from Ubuntu by typing:
[html]
sudo apt-get install openssl
and for neon installation add “–with-ssl” when you install neon package. Then re-install subversion with this new neon module.
February 15, 2008
Mac OS, Subversion, Ubuntu/Linux, Window
No Comments
Although I use subversion daily, I always forget how to add new project to current repository ‘cos I seldom do this. Scratch head and search internet again. Now, I just create new project for creating component for Joomla, before I forget I better post it to my blog so can be reviewed in the future without going through the hassle of search from google again.
Creating local repository:
- In Mac/Unix
[html]svnadmin create /full/path/to/repository
- In Window
[html]svnadmin create c:/full/path/to/repository
Add New Project to the repository:
- In Mac/Unix
[html]svn import new_project_name file:///full/repository/path/new_project_name -m "Initial Import"
- In Window
[html]svn import new_project_name file:///c:/full/repository/path/new_project_name -m "Initial Import"
- In Network
[html]svn import new_project_name http://hostname/svndirectory/repositoryname/new_project_name -m "Initial Import"
Check out project to working directory so you can start working on your new project with subversion features
. Upon checkout, content of new_project_name in the repository will be imported to working_directory_name.
- In Mac/Unix
[html]svn checkout file:///full/repository/path/new_project_name working_directory_name
- In Window
[html]svn checkout file:///c:/full/repository/path/new_project_name working_directory_name
- In Network
[html]svn checkout new_project_name http://hostname/svndirectory/repositoryname/new_project_name working_directory_name
Commonly used svn command:
- Add file to version control:
[html]svn add file_name_or_directory_name
- Delete file from version control:
[html]svn delete file_name_or_directory_name
- Delete file directly from repository:
[html]svn delete /full/path/of/repository/file_name_or_directory_name
- Commit all changes:
[html]svn commit -m "put useful message here, can add refs: #ticket_number is trac being used" file_name_or_directory_name_or_use_dot_for_current_directory
- Update local working file from repository
- When there is conflict: Easier way is to delete the conflict files (includes conflict log) from working directory and use `svn update` command to import the deleted files from repository. Another way is use below code to clean up the working directory after you managed to solve the conflict (always give me headache
)
- Check the status of local files:
- Check where is the the repository and the other status of current working directory (this is useful as I always forget which repository I used):
November 22, 2007
Eclipse, Python, Subversion
No Comments
Whenever I install eclipse, I always wasted my time searching for the update site. These are dependencies needed to install PyDev and Subsclipe in Eclipse (I assume that you know how to add the remote site and install those Eclipse packages):
- Mylar (Do not need anymore this since it’s com with pydev now)
Mylar is Subclipse dependencies. For Eclipse 3.3, Mylar had been changed to MyLyn, but when I “find and install” update for Subclipse, Eclipse still ask for Mylar package. Mylar update site is not available for Eclipse 3.3, so just use below update site, your Eclipse 3.3 will still work.
Update site:
http://downloads.open.collab.net/eclipse/update-site/e3.2/
- PyDev
Python 2.x must be installed in your system as PyDev will automatically configured to use Python 2.x in your system for interpreting and compiling your code.
Update site:
http://pydev.org/updates
or
http://pydev.sourceforge.net/updates/
- Subclipse
After you finish running Mylar package installation, restart your Eclipse and then add Subclipse update site.
Update site:
http://subclipse.tigris.org/update_1.6.x
- Maven
Update site:
http://m2eclipse.sonatype.org/update/
Have fun!