views:

22

answers:

1

I have a website running locally on Drupal 6.14 and I need to upgrade it to drupal 6.19 The website is version controlled with BZR. I know the BZR basics but I don't know how to update my repository the "correct" way. I don't want to simply overwrite all drupal files and commit the changes. I want to compare my old version with the new version and create a patch to apply the new fixes.

Can anyone explain to me how I could do this?

Ps: I'm running bzr 1.17 on win

Thanks in advance. Kind regards, BBJ

A: 

There shouldn't be much to it, you should be fine by doing.

  1. Make a clone of your repo / use a local development version.
  2. Apply the changes by replaces the files.
  3. Review the changes.
  4. Commit changes to repo
  5. Push changes to VCS server
  6. Fetch the changes to the server/production site.

Alternative, if you don't have a place where you actually store the code, instead of step 4 you can.

  1. Create a patch using bzr diff > patch.diff
  2. Upload patch to server.
  3. Apply the patch: patch -p0 < patch.diff (need to be in the root of your repo). You apply patches with patch, there are guides on how to use it in different ways.

This can be done in one chunk, or step by step from 6.14 to 6.19.

Remember to update the db if needed.

googletorp
I was follwing until "step 5. Fetch the changes to the server/production site." Aren't you skipping a few steps there ... I don't see where a patch is created and applied?
BBJ
@BBJ Updated, with more details.
googletorp
@BBJ instead of `patch -p0 < patch.diff` you can use `bzr patch patch.diff` (if you have bzrtools plugin installed). On Windows you will also need GNU patch utility installed and be in the PATH.
bialix
Thank you very much for this extra info. I'll give it a shot!
BBJ

related questions