Welcome Guest, Not a member yet? Register   Sign In
Upgrading with Subversion
#1

[eluser]adamfairholm[/eluser]
Like many of you, I've got a lot of CodeIgniter projects on SVN. When it comes time to upgrade that project to a new version of CodeIgniter, its a lot of replacing folders and things, which of course makes SVN go on a hissy fit, flailing arms and all.

I only use the very basic features of SVN, so I'm not sure if there is a better way than going through and copy/pasting in file data one by one. Is there a better way?
#2

[eluser]jedd[/eluser]
Would only tracking your ./application/ directory - and not ./system/ - with svn, possibly help here? It might require shuffling the layout of your directories around a tad. Depends if you get much benefit, normally, from having the CI core tracked by your cvs.

Alternatively, get a better [url="http://git-scm.com/"]version control system[/url] system. Wink
#3

[eluser]adamfairholm[/eluser]
Hey Jedd,

That's a good idea! Yeah I have my applications folder separated from the CI core, so that would work well.

Yeah, I keep hearing about GIT, and I keep pulling my hair out and crying myself to sleep with SVN. I'm going to get to it eventually.
#4

[eluser]jedd[/eluser]
git is beautiful. I'd encourage you to spend an hour or two playing with it, in parallel with reading some tutorials - such as the [url="http://spheredev.org/wiki/Git_for_the_lazy"]Git For The Lazy[/url] (but there are plenty out there) and maybe having a read of the [url="http://progit.org/"]Pro git[/url] online book (but it's a bit more of a time commitment, of course). [url="http://www.github.com"]github[/url] pulls in more converts than any other site, I'd imagine.

Anyhoo .. I meant to point out that my suggestion wouldn't work too well if you were using svn to push out the new core CI changes to your production sites - but this doesn't sound like something you're doing now anyway, so that's all good.

I keep my system and application directories next to each other, and have my git repository tracking the parent directory. I don't recall any major problems during the 1.7.2 upgrade recently. Surely there's a way with svn to say 'hey, look, a lot of things have just changed - get over it'...?
#5

[eluser]wwwald[/eluser]
Git is definitely great for versioning (I'm using it on personal projects), but SVN isn't very bad either. Actually, SVN has got just the mechanism for your problem: svn:externals.

See http://svnbook.red-bean.com/en/1.0/ch07s03.html for the practical details.

Basic thought behind it is that your working copy consists of checkouts of several repositories. So you can have your application code in your project's SVN repository, and get the system/ directory from another repository containing CodeIgniter system code. This is also a great way to keep CodeIgniter up-to-date in multiple projects: you only need to update your CodeIgniter "system" repository, and all projects will be upgraded as soon as the working copies are updated.

Git can do this too, using the
Code:
submodules
command... in fact, I think Git's submodules command was heavily inspired by svn:externals.

Regards,
wwwald
#6

[eluser]WanWizard[/eluser]
[quote author="frogmoves" date="1255498067"]I only use the very basic features of SVN, so I'm not sure if there is a better way than going through and copy/pasting in file data one by one. Is there a better way?[/quote]
We have a directory '3rdparty' in the root of our repositories. In there you will find all 3rdparty products we use in our development, including CI.

For CI, we have checked-in the complete distribution, as you can download it. When it is time for an upgrade, we check this directory out, copy the new download into it, remove files that are no longer part of the distribution, and check it in again. This way you can easily generate a diff between the two versions, which we can apply to the system directory which is in the trunk.

This preserves any changes we have made to the CI core code, and any conflicts between new code and our changes are easily spotted.




Theme © iAndrew 2016 - Forum software by © MyBB