แสดงบทความที่มีป้ายกำกับ subversion แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ subversion แสดงบทความทั้งหมด

วันอังคาร, ธันวาคม 24, 2556

OSX: Using Subversion 1.7 with OSX 10.9 Mavericks (use Wandisco distribution not port nor brew)

Thai: วิธีติดตั้ง subversion 1.7 ใน OSX 10.9 (Mavericks) ไม่ใช้ port หรือ brew

updated on 3 Jan 2014 : fix wrong path.

There's no Subversion package build for OSX 10.9 from the Wandisco website, and also else where.

I accidentally found this information, able to use 10.8's pkg to successfully install on 10.9.

1. Download vanilla Subversion from their website here.

2. Choose this link "Download Subversion 1.7.13 for OSX 10.8.x Client Only"

3. We will get a file, named look like this: Subversion-Client-1.7.13_10.8.x.pkg

4. Copy to home folder. Using Terminal
$cd 
$cp Subversion-Client-1.7.13_10.8.x.pkg ~/
(assume that we place the downloaded file in the home folder)

5. create a script on home folder
$cd ~/
use vi command or any familiar text editor
$vi svninstall.sh 

insert this code
#!/bin/sh -x

PKG_NAME=Subversion-Client-1.7.13_10.8.x.pkg

pkgutil --expand ${PKG_NAME} /tmp/${PKG_NAME}
/tmp/${PKG_NAME}/subversion.pkg/Scripts/preinstall
pushd /tmp/${PKG_NAME}/subversion.pkg
tar xf Payload
sudo mv opt/subversion /opt
popd
/tmp/${PKG_NAME}/subversion.pkg/Scripts/postinstall
rm -rf /tmp/${PKG_NAME}

use :wq save and quit the vi

6. make it executable
$chmod +x svninstall.sh

7. execute the script to install the subversion
$./svninstall.sh

The output look like this 
$./svninstall.sh

+ PKG_NAME=Subversion-Client-1.7.13_10.8.x.pkg
+ pkgutil --expand Subversion-Client-1.7.13_10.8.x.pkg /tmp/Subversion-Client-1.7.13_10.8.x.pkg
+ /tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg/Scripts/preinstall
+ pushd /tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg
/tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg ~/Temp
+ tar xf Payload
+ sudo mv opt/subversion /opt
+ popd
~/Temp
+ /tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg/Scripts/postinstall

+ rm -rf /tmp/Subversion-Client-1.7.13_10.8.x.pkg

$

8. check if we it's successfully installed
$ svn --version
svn, version 1.7.10 (r1485443)
   compiled Aug 13 2013, 15:31:22
...

from: wandisco's svnforum

วันจันทร์, สิงหาคม 19, 2556

OS X: Using (downgrade) Subversion 1.7 with macports on OS X 10.8

    With the latest update port 2.2.0 it came with subversion 1.8 which I don't need it right now. After googling for a while, here's how to downgrade.


$port installed subversionThe following ports are currently installed:
  subversion @1.7.8_1
  subversion @1.7.8_2
  subversion @1.7.9_1
  subversion @1.7.10_1
  subversion @1.8.1_3 (active)

$port installed subversion-*The following ports are currently installed:
  subversion-javahlbindings @1.7.9_0
  subversion-javahlbindings @1.7.10_0
  subversion-javahlbindings @1.8.1_2 (active)

$port installed serf*The following ports are currently installed:
  serf1 @1.1.1_0
  serf1 @1.2.0_0
  serf1 @1.2.0_0+universal
  serf1 @1.2.1_0+universal
  serf1 @1.3.1_0 (active)
  serf1 @1.3.1_0+universal


** If there's not serf1 installed, execute "sudo port install serf1" to install it.


Execute this command to downgrade to Subversion 1.7 with java-hl support
$sudo port activate subversion @1.7.10_1 subversion-javahlbindings @1.7.10_0 serf1 @1.2.0_0

note: the version number might different than mine.



To check if we already able to use subversion 1.7 ; execute this command

$svn help | lessusage: svn <subcommand> [options] [args]
Subversion command-line client, version 1.7.10.

Type 'svn help <subcommand>' for help on a specific subcommand.

Reference: comment#1 in downgrading-subversion-from-1-8-to-1-7-in-macports

วันพฤหัสบดี, มีนาคม 07, 2556

HOWTO: Using Subversion 1.6 with OSX 10.8, downgrade svn 1.7 to 1.6

วิธีใช้งาน Subversion 1.6.x กับ OSX 10.x หรือลด version จาก 1.7 เป็น 1.6

(ทดสอบแล้วกับ OSX 10.8)

    ผมใช้ osx 10.8 และติดตั้ง macports หรือ port เอาไว้ด้วย ติดตั้ง nmap แล้วมันลง subversion 1.7 แถมมาให้ด้วย แต่ทีนี้ projects/source codes ทั้งหลายที่ทำงานอยู่ยังคงต้องใช้ svn 1.6; (ผมจะใช้ keyword svn แทน subversion มันสั้นกว่า ^^) เนื่องจากผมใช้ svnant ด้วย, ตัว svnClientAdapter เค้ายังไม่รองรับ svn 1.7 จึงยังคงต้องใช้ svn client 1.6 อยู่


   ขั้นแรก เราต้องมี svn client version 1.6 ซะก่อน ไปดาวโหลดได้จาก website ของ Wandisco เลยครับ Vanilla Subversion 1.6.20 & 1.7.8 certified by WANdisco มี certified แปะไว้ด้วย วิธีติดตั้งก็ง่ายๆ เค้าทำเป็น pkg ไว้แล้ว ทำเหมือนติดตั้ง package อื่นๆของ osx เลยครับ
   พอติดตั้งเสร็จเค้าจะบอกให้เราเพิ่ม path เข้าไปที่ .profile ของเราด้วย ประมาณนี้
...
export PATH=/opt/subversion/bin:$PATH
... 

   ถ้าเรียก terminal ขึ้นมาอีกครั้ง, หลังจากเพิ่ม PATH เข้าไปแล้ว เมื่อสั่ง svn help เราจะได้ประมาณนี้ 

$ svn --version
svn, version 1.6.18 (r1303927)
   compiled Nov  2 2012, 23:47:41

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
แสดงว่าเรามี svn version 1.6 ติดตั้งแล้ว 

  ถ้าคุณเหมือนผมคือติดตั้ง nmap ผ่านทาง macports หรือใช้ macports แล้วมันดันติดตั้ง svn 1.7 ให้ หากเรียกด้วยคำสั่งก่อนหน้านี้ มันจะแสดงเลข version เป็น 1.7 

ส่วนวิธีเอาออกก็ทำแบบนี้

ทดสอบดูก่อนว่ามี svn ทีถูกติดตั้งโดย port

$port installed subversion
The following ports are currently installed:
  subversion @1.7.8_1
  subversion @1.7.8_2 (active) 

สังเกตทีี (active) แสดงว่ามันถูกใช้งานอยู่ ปิดหรือ de-active ได้ด้วยคำสั่ง 

$ sudo port deactivate subversion @1.7.8_2
Password:
--->  Deactivating subversion @1.7.8_2
--->  Unable to deactivate subversion @1.7.8_2, the following ports depend on it:
--->   nmap @6.25_1
Error: org.macports.deactivate for port subversion returned: Please uninstall the ports that depend on subversion first.
Please see the log file for port subversion for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_subversion_1.7.8_2/subversion/main.log
Warning: Failed to execute portfile from registry for subversion @1.7.8_2
--->  Deactivating subversion @1.7.8_2
--->  Unable to deactivate subversion @1.7.8_2, the following ports depend on it:
--->   nmap @6.25_1
Error: port deactivate failed: Please uninstall the ports that depend on subversion first.

จะเห็นว่าครั้งแรกมันจะไม่ยอมปิดให้เรา เพราะ nmap ต้องใช้ ผมเลยตัดใจไม่ใช้ nmap ด้วยสั่งใหม่ดังนี้ 

$ sudo port deactivate nmap @6.25_1 subversion @1.7.8_2
--->  Deactivating nmap @6.25_1
--->  Cleaning nmap
--->  Deactivating subversion @1.7.8_2
--->  Cleaning subversion

ทดสอบดูอีกว่ามี svn ทีถูกติดตั้งโดย port? จะเห็นว่ามันไม่(มี) active แล้ว
$ port installed subversion
The following ports are currently installed:
  subversion @1.7.8_1
  subversion @1.7.8_2

สบายใจ เมื่อสั่ง svn ทีนี้จะเป็นคำสั่งของ version 1.6 แล้วหล่ะครับ 



วันพุธ, พฤศจิกายน 21, 2555

Fixed : Jenkins SVN plugin always throw No credential to try. Authentication failed

I'm Using Jenkins 1.466.2 with Subversion plugins. Config it to always checkout the source code to build every day. One day it cannot build and show this error in the Source Code Management session.

ERROR: Failed to tag org.tmatesoft.svn.core.SVNCancelException: svn: No credential to try. Authentication failed

No matter how I try to enter the correct credential, by click the follow suggest link "Maybe you need to enter credential?" 

 Solution: 

    Got a clue from these post 

  1. http://stackoverflow.com/a/4652362.
  2. http://blog.vinodsingh.com/2009/08/hudson-svn-authentication-cancelled.html 


    I dig in to my .subversion folder; it's in your home directory. 
1.
This is my ~/.subversion/servers file; the configuration that different than the default one is this line.

...
store-plaintext-passwords = yes
...
2.

I found a file 550564593bc22e0166f1d522f51755cc under ~/.subversion/auth/svn.simple/
   I look into its content
$cat ~/.subversion/auth/svn.simple/550564593bc22e0166f1d522f51755cc
K 15
svn:realmstring
V 103
<http://filexchange.{cannot exposed}.com:80> {cannot exposed} System 2.0 Repository Login
K 8
username
V 6
dahoba
END

There's password missing?, I thought. So, I try remove the file 550564593bc22e0166f1d522f51755cc and then try to checkout by command line again
$svn --username dahoba co http://filexchange.cannot-exposed.com/svn/2.0/main/program/trunk/app.web .

It will ask for password again, input the correct password and I choose to kept plain password. If we check the content of a file again, the file 550564593bc22e0166f1d522f51755cc was re-generated.
$cat ~/.subversion/auth/svn.simple/550564593bc22e0166f1d522f51755cc
K 8
passtype
V 6
simple
K 8
password
V 9
rm$pdc124
K 15
svn:realmstring
V 103
<http://filexchange.{cannot exposed}.com:80> {cannot exposed} System 2.0 Repository Login
K 8
username
V 6
dahoba
END

    Now, back to Jenkins web console, navigate to jobs configuration, the problem should now gone.

PS: Jenkins deployed on a Ubuntu server
PS: username, servername, repository name was changed, I cannot expose those information to public.

วันอาทิตย์, มกราคม 22, 2555

Ubuntu: Android development setup resources

To setup Ubuntu desktop ready for Android development


Eclipse SDK  

    Eclipse Classic 3.7.1 http://www.eclipse.org/downloads/

Android SDK

    Download http://developer.android.com/sdk/index.html

    Installing http://developer.android.com/sdk/installing.html

Android ADT
    http://developer.android.com/sdk/eclipse-adt.html

Optional

Subclipse (Subversion plugin for eclipse)http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

    Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x

Ubuntu: Install javaHL for Subclipse, Eclipse plugin

When starting eclipse after install subclipse plugin. Got an error like this
 
Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path no svnjavahl in java.library.path

means that we did not install some library files for subversion plugin yet.
Execute this command:

sudo  apt-get install subversion libsvn1 libsvn-java

(re)Start the eclipse there's (should) no such an error occurred.