NYCPHP Meetup

NYPHP.org

[nycphp-talk] Any Subversion and/or Tortoise SVN experts out there?

Dan Cech dcech at phpwerx.net
Mon Aug 13 09:39:40 EDT 2007


Cliff Hirsch wrote:
> So I need to apply an upgrade, but have no idea what changes I¹ve made to
> the original software. Paranoia keeps me from applying the patch ‹ don¹t
> want to lose any of my changes. I¹d like to have a complete printout of my
> changed files before I apply the upgrade patch so I know where to look when
> the inevitable problems crop up.
> 
> But hey, I use Subversion, so I¹m doing something right. This is what I have
> done as a start:

Subversion is great, and can help you with this task (and many others).

I would first suggest that you read the svn book:

http://svnbook.red-bean.com/

Basically, you're trying to solve a non-problem.

Because you're using svn, you can retrieve any revision of your code at
any time, so you can always pull the latest revision before you apply
the patches from upstream.

If you have any problems you can a) revert your working copy and try
again (if you haven't committed anything yet), or b) roll back the
repository to the latest un-broken revision (if you committed broken code).

You may also want to check out vendor branches:

http://svnbook.red-bean.com/en/1.2/svn.advanced.vendorbr.html

I have used this strategy in the past to maintain codebases coming from
upstream authors, and it works very well.

Basically you create a branch with the upstream release you are
currently using, then apply patches from upstream to that branch to keep
it in sync with the upstream version.

At any time you can then merge those changes into your development
branch, taking advantage of svn's built-in conflict resolution system to
handle any issues, rather than just getting stuck with patches that
won't apply cleanly.

Dan



More information about the talk mailing list