Skip to content

Commit

Permalink
[FIXED JENKINS-12598] migrate settings between plugin versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mc1arke committed May 31, 2012
1 parent cd691b3 commit 1db398a
Showing 1 changed file with 264 additions and 223 deletions.

6 comments on commit 1db398a

@fredg02
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this diff is completely useless. :(
I'll test it tomorrow.

@slide
Copy link
Member

@slide slide commented on 1db398a May 31, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably has different space vs. tab settings.

@fredg02
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github definitely needs an option to ignore whitespaces.

@slide
Copy link
Member

@slide slide commented on 1db398a May 31, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or the person developing the patch should check that they aren't issuing a pull request like this. I've generally gone back and asked the person to fix the spacing difference so the diff is useful.

@mc1arke
Copy link
Member Author

@mc1arke mc1arke commented on 1db398a Jun 1, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why the diff is so bad - Intellij IDEA highlighted the correct lines prior to my commit so I wonder if it's done something with line endings (it's not spaces vs tabs as it's even highlighted the import statements as modified and they're not indented). The change here is the addition of the readResolve() method for automatic modification during de-serialisation, and the reinstatement of the modules field (although marked as transient and deprecated) so we can read the legacy config structure.

I'll see if I can roll-back this commit and re-apply if once I'm back at my normal computer tonight.

@fredg02
Copy link
Member

@fredg02 fredg02 commented on 1db398a Jun 1, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the added NPE check described above I successfully converted a 2.3-style module config into a 2.4-style module config!
Thanks Michael for adding the readResolve() method. This will save a lot of time and pain.

Please sign in to comment.