Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-02-26 00:09:13

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Subversion FAQ

Warning: Textpattern-current is the developers’ working copy of the Textpattern source code. It includes the latest bugfixes and features, but the most recent updates have usually received only light testing. It is not recommended for use on a live site. Use at your own risk, make backups first, etc.

The following assumes you have a properly installed copy of subversion, and a working knowledge of the command line.

How do I fetch the current version of Textpattern?

> cd /path/to/txp
> svn co http://svn.textpattern.com/development/4.0/
A 4.0/textpattern
A 4.0/textpattern/license.txt
A 4.0/textpattern/tmp
[..etc..]

How do I find out which subversion revision I have?

> cd /path/to/txp/4.0
> svn log -q -r BASE
------------------------------------------------------------------------
r105 | zem | 2005-02-25 11:17:30 +1100 (Fri, 25 Feb 2005)
------------------------------------------------------------------------

How do I find out what the latest available revision is?

> cd /path/to/txp/4.0
> svn log -q -r HEAD
------------------------------------------------------------------------
r108 | zem | 2005-02-26 10:41:17 +1100 (Sat, 26 Feb 2005)
------------------------------------------------------------------------

How do I update to the latest revision?

> cd /path/to/txp/4.0
> svn update
U textpattern/include/txp_prefs.php
U textpattern/lib/txplib_misc.php
U textpattern/_update.php
Updated to revision 108.

How do I see what’s changed between my last update and the latest revision?

> cd /path/to/txp/4.0
> svn log -r BASE:HEAD
------------------------------------------------------------------------
r105 | zem | 2005-02-25 11:17:30 +1100 (Fri, 25 Feb 2005) | 1 line
fix date permlinks in recent_articles and some other tags
------------------------------------------------------------------------
r106 | zem | 2005-02-25 14:34:22 +1100 (Fri, 25 Feb 2005) | 1 line
fix typo in get_uploaded_file() (thanks Manfre)
------------------------------------------------------------------------
r107 | zem | 2005-02-26 10:33:18 +1100 (Sat, 26 Feb 2005) | 1 line
remove extra stripslashes
------------------------------------------------------------------------
r108 | zem | 2005-02-26 10:41:17 +1100 (Sat, 26 Feb 2005) | 1 line
fix handling of Windows tempdir paths
------------------------------------------------------------------------

How do I update to a specific revision, or revert to a previous revision?
> cd /path/to/txp/4.0
> svn update -r 105
U textpattern/include/txp_prefs.php
U textpattern/lib/txplib_misc.php
U textpattern/_update.php
Updated to revision 105.

What’s the best way to upload a copy of Textpattern-current to my web site?

> cd /path/to/txp
> svn export 4.0 test

Then zip or tar the contents of /path/to/txp/test, upload it to your web site, and unzip/untar in the appropriate place.

Subversion export won’t overwrite an existing directory, so you’ll need to erase or rename /path/to/txp/test before each subsequent export, or use svn export --force 4.0 test.

How do I submit a patch to the developers?

After editing files in /path/to/txp/4.0:

> cd /path/to/txp/4.0
> svn update
> svn diff > /path/to/txp/myfile.patch

..then email /path/to/txp/myfile.patch to the developers. Use a descriptive filename, including the current revision number (i.e. fix_category_bug_r108.patch). If your update includes new files, use svn add path/to/myfile.php to make sure they’re included in the patch.

Make sure you examine the patch file to ensure it doesn’t include any unintentional changes. In particular, whitespace differences (typically caused by a text editor converting tabs to spaces) can inflate the size of a patch. If that seems to be the case, try this instead:

> svn diff --diff-cmd diff -x -w > /path/to/txp/myfile.patch

NB: while a patch may include changes to multiple files, each patch should include only one thing – one bugfix, or one new feature. If you have more than one independent bugfix or feature to submit, you should break them up and send them as separate patches. Make sure each patch is against a clean coppy of the current revision, i.e. it doesn’t include the changes submitted in previous patches. svn revert -R will restore a pristine working copy from the repository (this will overwrite your local changes, so back them up elsewhere first).

Last edited by zem (2005-02-26 01:02:28)


Alex

Offline

#2 2005-03-01 15:43:31

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

Re: Subversion FAQ

Nice explanation, Alex.

For those of you who use windows, there is a nice GUI client called TortoiseSVN – with a good user manual too. It’s a right-click menu integrated tool which makes your life easy if you don’t know too much about SVN.

Just install it, create an empty folder, and right click>Checkout… on the new SVN menú.

Point there to the URL of the repo you want to browse contents from, and that’s all!, you’ve got the repo contents on your directory.

You can do all things Alex explains on the above post with TortoiseSVN too but… Read the manual first! ;-).

Offline

#3 2005-03-01 16:28:51

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Subversion FAQ

> How do I submit a patch to the developers?

My question would be: When (i.e. under what circumstances) do I submit a patch? Or is it currently free for all, and you will yell, in case you’re flooded? ;)

Offline

#4 2005-03-01 22:51:41

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

Re: Subversion FAQ

Well, I think that grumption is enough criteria to judge yourself when to submit a patch.

Obvious reasons are bugfixes and I think that new features should be treated apart and discuss deeply.

We will yell if we’re flooded, of course.

Offline

#5 2005-03-25 21:01:49

Matt
Member
Registered: 2004-02-28
Posts: 92
Website

Re: Subversion FAQ

NB: Updating via svn restores the setup.php and _update.php files, which ought to be promptly deleted.

Offline

#6 2005-03-30 15:00:45

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Subversion FAQ

I have slight little problem with Turtoise SVN,when I want to access my local installs using XAMPP.Details here


⌃ ⇧ < ⌃ ⇧ >

Offline

#7 2005-03-30 15:02:22

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Subversion FAQ

I have s slight little problem with Turtoise SVN accessing folders on local install in combination with XAMPP.
Details here


⌃ ⇧ < ⌃ ⇧ >

Offline

#8 2005-04-01 05:58:52

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Subversion FAQ

I have double checked the click ‘n go instructions at TEXTBOOK
wheather it was like I did,but it doesn’t seem to work.The folder is there in the root,it’s exported correctly without the layover icon,but appache can not see it.
Is there any body who has the same result
(platform win2k/sp4/all security updates/Net framwork latest with all updates XAMPP with patch and update)
??????
Or better is there anybody who got it to work on windows(right click method)

regards


⌃ ⇧ < ⌃ ⇧ >

Offline

#9 2005-04-03 21:14:51

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Subversion FAQ

Sorry,I take everything back I had forgotten that mod_rewrite is switched off by default

thanks,and my appologies


⌃ ⇧ < ⌃ ⇧ >

Offline

#10 2005-04-19 01:30:02

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Subversion FAQ

“then email …patch to the developers”

And uh, how do we do that? Email form doesn’t allow attachments. :)

Offline

#11 2005-04-21 01:08:56

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Subversion FAQ

bump ?

Offline

#12 2005-04-21 01:18:45

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: Subversion FAQ

The original post needs to be edited. SVN is now found at http://svn.textpattern.com


bludrop studios .::. Creative Expression

Offline

Board footer

Powered by FluxBB