Jump to content

Upgrading Processwire 2.0 to 2.1 using git repo's


jose
 Share

Recommended Posts

Hello everyone,

I was wondering how divergent the two repositories for processwire are.  The reason being is that we use version control on all projects including processwire.  To explain a little of the workflow.

1)  We have our own fork of processwire which I pull the latest/safe changes from upstream/master(your repo).

2)  When we create a project I clone our processwire repo for the new project and then I create another repo for this client project.

3)  If we make custom changes to processwire we make them to our own repo, and we can also push/pull request from our processwire repo to send changes back to upstream.  When updates are made to processwire in upstream we pull to our repo then to our client projects.

That's basically how we keep everything tracked.  I want to move to version 2.1 of processwire, will adding the new repo to git config file and pulling changes from that repo allow me to update the main stable repo code.  Reason for this is that I want everything tracked and easy to manage, that is what version control systems are for, and also maintain a history between versions.  I also know there are database changes due to new user mechanism, is there a document explaining the upgrade to the database(IIRC you said you had been working on one)?

Another question is why you chose another repository instead of a branch?  Anyways thank you for your help and lets me know what you think. 

Thank you for your time.

-Jose Raffucci

Link to comment
Share on other sites

Jose, I do have an upgrade utility written, and have used it on a couple of my own sites. Though don't feel it's been tested enough to recommend using it on other sites yet. So I recommend waiting on upgrading existing sites to 2.1 until the upgrade utility is considered stable. Though feel free to try it out for fun if you want to:

https://github.com/ryancramerdesign/P21/blob/master/upgrade.php

You would comment out the first line (with the die function on it) so that it can run. To upgrade you would remove or rename your old /wire/ dir and replace it with the /wire/ dir from PW 2.1. You would also replace your /index.php and /.htaccess files with the new versions. Then you would load upgrade.php in your browser. I have been busy working on client projects and PW 2.1 main source, so this upgrade util hasn't been touched for a few weeks, but will be in August.

As for why it's put in P21 rather than as a branch of ProcessWire, that's due to me being a newbie with Git. I managed to screw things up pretty bad when trying to maintain a separate branch and eventually gave up and just put it in a separate repo. Most likely this will be bundled back into the main ProcessWire branch once it's final (assuming I can figure it out!) :)

Link to comment
Share on other sites

Thanks for your quick reply.  I hear you about being busy I don't remember summer being so busy.

Anyways I will test out the utility and give you feedback.  Please don't hesitate to ask for help from your community members, so we can pitch in.

I'm pretty well versed in git and mercurial and dvcs.  If you would like I could help you re-integrate the projects under one repository(a test private repo to make sure its all good).  Anyways help is here when you have time.

Link to comment
Share on other sites

Thanks for your offer to help. I'd run off my own silly version control (and occasionally, lack of it) for many years, and then experimented with SVN for awhile, before finally making the jump to Git. Git has changed my workflow quite a bit, and I occasionally find myself in trouble, but I'm getting the hang of it. I'm not using multiple branches as much as I should due to some early missteps that made me risk averse. But hope to be a seasoned pro with Git by the time PW 2.2 is out. :)

Link to comment
Share on other sites

  • 3 months later...

OK WTH?

I have pw 2.0 and it's been suggested I upgrade to 2.1 so I follow the instructions to replace /wire/, index.php and htaccess and now I get a blank screen with an error message. Then I see there's an upgrade.php so I try to download it and I get a 404 error page not found. I've already replaced the files so how do I get things running again?

I can't use the new upgrade module because the site is not working now so do I have to return to pw 2.0? Can I do that just by replacing the .htaccess, index and wire directory with the original ones from the zip?

----------------------- edit -----------------------

OK. I replaced the current files and directories with the originals and the site is back up and working.

I would suggest that it might not be a bad idea to update all of the forum threads dealing with upgrading with current info. Doing a search on the forum for "upgrade" yields many threads and posts with clearly outdated info. Anyone  new to processwire interested in upgrading will definitely be lead down the wrong path unless posts are updated with links to current instructions. I was.

I'm now going to go dl and install the upgrade module.

Link to comment
Share on other sites

Sorry about that Digitex, I should have thought to update that stuff before, so thank you for letting me know. I have added an Upgrading section to the README file, and have also updated this upgrade thread: http://processwire.com/talk/index.php/topic,58.0.html

Did you come across any other places I might have missed?

Thanks,

Ryan

Link to comment
Share on other sites

Sorry about that Digitex, I should have thought to update that stuff before, so thank you for letting me know. I have added an Upgrading section to the README file, and have also updated this upgrade thread: http://processwire.com/talk/index.php/topic,58.0.html

Did you come across any other places I might have missed?

Thanks,

Ryan

All's well Ryan. I initially followed the upgrade instructions detailed in thread: http://processwire.com/talk/index.php/topic,58.0.html which you've now updated.

I got an error so went to this thread: http://processwire.com/talk/index.php/topic,383.0.html since the error I got was identical and that's how I was lead here and where I learned of upgrade.php which is no longer available. Now that you've updated the info on topic,58.0 there should be no further confusion for anyone. Thanks for your diligence.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...