Welcome Guest, Not a member yet? Register   Sign In
CI 2.0, Mercurial, and renamed system folder
#1

[eluser]jppi_Stu[/eluser]
Yesterday I had my first exposure to Mercurial. I also had my first exposure to CodeIgniter 2.0. The latter led to the former, as you might guess.

Mercurial seems pretty handy, so I decided to throw caution to the wind and begin adopting it for an in-development CodeIgniter-based site that I also decided to upgrade to CI 2.0 at the same time. (Just reckless, I guess.) I had no version/source control for the site before, so it seemed like a good move.

I have renamed my system directory for security purposes. I don't want to make it too easy to exploit some future-found flaw in CI, so reducing the ability of an abusive person/script to guess the location of the core CI files seems sensible. I've also moved the application directory out of the root and renamed it as well.

Things are working fine at the moment, and this setup seems suitable for using Mercurial for the two separate goals of keeping my CI code up-to-date and of developing my site in the (renamed) application folder.

However... if I want to refresh my CI code from the tip on BitBucket, I have to temporarily rename my renamed system folder back to "system," do the pull/update, and then rename it again. Not terrible, but not great.

The question this all leads up to: Is there a way to "map" the system folder path so that Mercurial will understand that 'system' in the BitBucket source goes to the alternative name I've given that folder locally?

Sorry if there's too much preamble to that question. And hopefully it makes sense. :blank:
#2

[eluser]Phil Sturgeon[/eluser]
You really don't need to get it automated this much. I have a codeigniter clone on my development box. When I see an interesting change I pull that repo and drag the system folder over the top of my original one.

That takes all of about 10 seconds to do. Easy enough right?
#3

[eluser]gyo[/eluser]
I agree with Phil, updating the core files is very quick & easy like he described.

If you're concerned about the different core versions, you can keep the old 'system' folder renaming it to something else, and upload the new one into 'system'.

This way you can easily rollback if something breaks.
#4

[eluser]jppi_Stu[/eluser]
OK, that makes sense. Guess I'm over-thinking things. Still very new to Mercurial (experience measured in hours!).

Thanks for the input.




Theme © iAndrew 2016 - Forum software by © MyBB