Opened 3 years ago

Closed 3 years ago

#1864 closed help (answered)

importing patch from the met office

Reported by: simon.tett Owned by: ros
Component: FCM Keywords:
Cc: Platform: PUMA
UM Version: 8.5

Description

Hi,

I am importing a patch at vn8.5 from the Met Office and working on puma.

Following instructions at http://puma.nerc.ac.uk/trac/UM/wiki/FrequentlyAskedQuestions#how-do-i-apply-an-fcm-patch

I did:
fcm branch-create rad_solvar_v2_1850_2100 fcm:um@vn8.5
which created a new branch
svn://puma/UM_svn/UM/branches/dev/simon.tett/vn8.5_rad_solvar_v2_1850_2100

Untarred patch dir is ~simon.tett/vn8.5_solar_patch/

I do:
~/vn8.5_solar_patch/fcm-import-patch svn://puma/UM_svn/UM/branches/dev/simon.tett/vn8.5_rad_solvar_v2_1850_2100

and get an error:
apply-patch: Applying patch for changeset 64070.
can't find file to patch at input line 5
Perhaps you used the wrong -p or —strip option?
The text leading up to this was:


|Index: src/atmosphere/radiation_control/solvar2.F90
|===================================================================

src/atmosphere/radiation_control/solvar2.F90 (revision 64069)

|+++ src/atmosphere/radiation_control/solvar2.F90 (revision 64070)


The patch file seems to have a sensible root for the patch…

So how do I go on?
thanks
Simon

Change History (5)

comment:1 Changed 3 years ago by ros

  • Owner changed from um_support to ros
  • Status changed from new to accepted

Hi Simon,

The patch vn8.5_solar_path only contains one changeset (namely 64070) which is the last revision of the fcm:um-br/dev/hadmn/vn8.5_rad_solvar_v2_1850_2100. This branch contains more than one commit and indeed adds the src/atmosphere/radiation_control/solvar2.F90 file which is not present in the base UM8.5 code hence the failure above.

The patch needs to contain all the changesets not just the last one. So the command to create it needs to be something along the lines of:

fcm mkpatch --revision 63134:64070 --organisation Met_Office fcm:um_br/dev/hadmn/vn8.5_rad_solvar_v2_1850_2100 vn8.5_solar_patch

Regards,
Ros.

comment:2 Changed 3 years ago by simon.tett

Hi Roz,

thanks. I passed that back to Met Office and it worked. How did you extract the revision numbers? When I try another patch ~simon.tett/vn8.5_volc_patch/

I get an error..
simon.tett@puma:~> ~/vn8.5_volc_patch/fcm-import-patch svn://puma/UM_svn/UM/branches/dev/simon.tett/vn8.5_volcano_decadal
apply-patch: Applying patch for changeset 64075.
patching file src/atmosphere/radiation_control/r2_set_aero_clim_hadcm3.F90
Hunk #1 FAILED at 204.
Hunk #2 FAILED at 325.
2 out of 2 hunks FAILED — saving rejects to file src/atmosphere/radiation_control/r2_set_aero_clim_hadcm3.F90.rej

Would I be right in guessing that I want revisions 63134:64075???

thanks
Simon

comment:3 Changed 3 years ago by ros

Hi Simon,

I looked at the branch through trac at the Met Office to find the first changeset number that was committed to that branch. This will be a different number for the volcano_decadal branch.

I don't have access to the Met Office today, but could ask a colleague if necessary - do let me know if you want me to do this.

Whoever is creating the patches for you should be look at the branch history in the Trac system. They need to browse to the branch listing for dev/hadmn and then for vn8.5_volcano_decadal click on the number in the revision column (should be 64075).

Regards,
Ros.

comment:4 Changed 3 years ago by ros

I'm closing this ticket now. If you need anymore help with the patches please re-open this ticket.

Cheers,
Ros.

comment:5 Changed 3 years ago by ros

  • Resolution set to answered
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.