HowToUseSvn: Contents
  Introduction
  Details
    Checkout the code
    Fetch the newest version
    Make changes
      See what changed
      Write a patch
      Commit

How To Use Svn

How to use Subversion.

Introduction

Subversion is An open-source revision control system, which aims to be a compelling replacement for CVS. The main repository of the MicroLua project is hosted here at GoogleCode and is a Subversion one.

If you know what we are talking about and don't need details:
svn checkout http://microlua.googlecode.com/svn/ .
# or better if you have the `Commit` permission
svn checkout https://microlua.googlecode.com/svn/ .
svn checkout http://microlua.googlecode.com/svn/ . # or better if you have the CommitCommit permission svn checkout https://microlua.googlecode.com/svn/ . }}} = Details = This page will give you the basic commands to interact with our repository. If you want to use Subversion with a graphical interface, have a look at HowToUseSvnGui. The common graphical client is [http://tortoisesvn.tigris.org/ TortoiseSVN]. The recommended way to use the command line interface on a Windows machine is to install [http://www.cygwin.com/ Cygwin]. See HowToUseCygwin for more details. == Checkout the code == See [http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.checkout.html svn checkout] for more details. {{{ cd /where/I/usually/work/with/microlua mkdir my_working_copy # or anything else cd my_working_copy svn checkout http://microlua.googlecode.com/svn/ . # shortcut: svn co ... # or better if you have the permission svn checkout https://microlua.googlecode.com/svn/ . }}}

Details

This page will give you the basic commands to interact with our repository. If you want to use Subversion with a graphical interface, have a look at HowToUseSvnGui. The common graphical client is TortoiseSVN.

The recommended way to use the command line interface on a Windows machine is to install Cygwin. See HowToUseCygwin for more details.

Checkout the code

See svn checkout for more details.
cd /where/I/usually/work/with/microlua
mkdir my_working_copy  # or anything else
cd my_working_copy
svn checkout http://microlua.googlecode.com/svn/ .  # shortcut: svn co ...
# or better if you have the `Commit` permission:
svn checkout https://microlua.googlecode.com/svn/ .
# wait a bit for the code to be downloaded
cd /where/I/usually/work/with/microlua mkdir my_working_copy # or anything else cd my_working_copy svn checkout http://microlua.googlecode.com/svn/ . # shortcut: svn co ... # or better if you have the CommitCommit permission: svn checkout https://microlua.googlecode.com/svn/ . # wait a bit for the code to be downloaded }}} == Fetch the newest version == See [http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.update.html svn update] for more details. {{{ cd my_working_copy svn update # shortcut: svn up ... # wait a bit for the code to be updated }}} If you changed things in your working copy, you may end with conflicts. == Make changes == Edit the code as you usually do, test it. If you ever add a new page, don't forget to [http://svnbook.red-bean.com/en/1.0/re01.html svn add] it. === See what changed === To see what files were changed, use [http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.status.html svn status]: {{{ cd my_working_copy svn status # shortcut: svn st... }}} To see what changed in the files, use [http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.diff.html svn diff]: {{{ cd my_working_copy svn diff }}} To see what changed in a particular file: {{{ cd my_working_copy svn diff path/to/the/file }}} === Write a patch === If you don't have commit access, you can publish your changes pasting a patch somewhere or attaching a patch to an issue. {{{ svn diff (path/to/the/file) > path/where/to/store/the/patch/reason_for_the_changes.diff }}} === Commit === To commit code, use [http://svnbook.red-bean.com/en/1.1/re06.html svn commit]. You'll need the Commit permission, ask Grahack if you want it. Then please read the CommitMessage page. Here we feel the superiority of [HowToUseGit Git] which can commit only some changes among others, but in the same file. You'll have real pleasure using permission: svn checkout https://microlua.googlecode.com/svn/ . # wait a bit for the code to be downloaded }}}

Fetch the newest version

See svn update for more details.
cd my_working_copy
svn update  # shortcut: svn up ...
# wait a bit for the code to be updated
cd my_working_copy svn update # shortcut: svn up ... # wait a bit for the code to be updated }}}

If you changed things in your working copy, you may end with conflicts.

Make changes

Edit the code as you usually do, test it. If you ever add a new page, don't forget to svn add it.

See what changed

To see what files were changed, use svn status:
cd my_working_copy
svn status  # shortcut: svn st...
cd my_working_copy svn status # shortcut: svn st... }}}

To see what changed in the files, use svn diff:
cd my_working_copy
svn diff
cd my_working_copy svn diff }}}

To see what changed in a particular file:
cd my_working_copy
svn diff path/to/the/file
cd my_working_copy svn diff path/to/the/file }}}

Write a patch

If you don't have commit access, you can publish your changes pasting a patch somewhere or attaching a patch to an issue.

svn diff (path/to/the/file) > path/where/to/store/the/patch/reason_for_the_changes.diff
svn diff (path/to/the/file) > path/where/to/store/the/patch/reason_for_the_changes.diff }}}

Commit

To commit code, use svn commit.

You'll need the Commit permission, ask Grahack if you want it. Then please read the CommitMessage page.

Here we feel the superiority of Git which can commit only some changes among others, but in the same file. You'll have real pleasure using git add -pgit add -p for this. Subversion cannot differentiate multiple changes in one same file. *NOTE*: Even if you have the Commit permission and typed the right password, you won't be able to authenticate if you checked out from for this. Subversion cannot differentiate multiple changes in one same file.

NOTE: Even if you have the Commit permission and typed the right password, you won't be able to authenticate if you checked out from httphttp and not and not httpshttps.