Fixing a bogus commit on a Fedora branch F21, that diverges from 'master' ================================================================ [9-JAN-2015] This is documentation of reverting an erroneous commit I made in a 'f21' branch for a package ('gerrymander'), and how I tried to manually fix the conflicts to merge the 'f21' branch with 'master'. Of course, this means, the 'f21' SPEC file will diverge from 'master' branch and I need to live with it till Fedora 21 reaches end of its life. On Fedora 21 branch ------------------- Revert the bogus commit: kashyap@f21$ git revert 3427d45feef402990dd92c30988647ae759ac2e3 kashyap@f21$ fedpkg push Now try to merge F21 with master: kashyap@f21$ git merge origin/master Auto-merging sources CONFLICT (content): Merge conflict in sources Auto-merging .gitignore CONFLICT (content): Merge conflict in .gitignore Automatic merge failed; fix conflicts and then commit the result. Check the current git status of 'f21' branch: kashyap@f21$ git status On branch f21 Your branch is up-to-date with 'origin/f21'. You have unmerged paths. (fix conflicts and run "git commit") Changes to be committed: new file: gerrymander.spec Unmerged paths: (use "git add ..." to mark resolution) both modified: .gitignore both modified: sources Enumerate the contents of 'sources' and '.gitignore' files on 'f21' branch: kashyap@f21$ cat sources <<<<<<< HEAD 4636d5c6d57b41513ed0485362e0a019 gerrymander-1.3.tar.gz 5cce3b2c8ed30132c69d144172e84afd gerrymander.spec ======= 00bdbd453789c645efc1c9dbdd8df333 gerrymander-1.4.tar.gz >>>>>>> origin/master kashyap@f21$ cat .gitignore <<<<<<< HEAD /gerrymander-1.3.tar.gz /gerrymander.spec ======= /v1.3.tar.gz /gerrymander-1.4.tar.gz >>>>>>> origin/master On 'master' branch ------------------ Contents of 'sources' and 'gitignore' files in 'master' branch: kashyap@master$ git branch * master kashyap@master$ cat sources 00bdbd453789c645efc1c9dbdd8df333 gerrymander-1.4.tar.gz kashyap@master$ cat .gitignore /v1.3.tar.gz /gerrymander-1.4.tar.gz kashyap@master$ Back on F21 branch ------------------ Edit the '.gitignore' and 'sources' file to match what is on the git 'master' branch. kashyap@f21$ vi sources [. . .] kashyap@f21$ vi .gitignore [. . .] Add them to Fedora git on 'f21' branch: kashyap@f21$ git add .gitignore sources Again, check the current git status of 'f21' branch: kashyap@f21$ git status On branch f21 Your branch is up-to-date with 'origin/f21'. All conflicts fixed but you are still merging. (use "git commit" to conclude merge) Changes to be committed: modified: .gitignore new file: gerrymander.spec modified: sources The diff for for 'gitignore' and 'sources' file on 'f21' branch: kashyap@f21$ git diff --cached .gitignore diff --git a/.gitignore b/.gitignore index 35de29e..54989be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/gerrymander-1.3.tar.gz -/gerrymander.spec +/v1.3.tar.gz +/gerrymander-1.4.tar.gz kashyap@f21$ git diff --cached sources diff --git a/sources b/sources index 099f2be..338dc7b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -4636d5c6d57b41513ed0485362e0a019 gerrymander-1.3.tar.gz -5cce3b2c8ed30132c69d144172e84afd gerrymander.spec +00bdbd453789c645efc1c9dbdd8df333 gerrymander-1.4.tar.gz kashyap@f21$ Commit the above changes: kashyap@f21$ git commit [f21 3de15f5] Merge remote-tracking branch 'origin/master' into f21 Test it and build a scratch build --------------------------------- $ fedpkg srpm Wrote: /home/kashyap/fedora-packaging/gerrymander/f21/gerrymander-1.4-1.fc21.src.rpm $ fedpkg scratch-build --srpm gerrymander-1.4-1.fc21.src.rpm [====================================] 100% 00:00:01 42.26 KiB 35.63 KiB/sec Building gerrymander-1.4-1.fc21.src.rpm for f21-candidate Created task: 8570456 Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=8570456 Watching tasks (this may be safely interrupted)... 8570456 build (f21-candidate, gerrymander-1.4-1.fc21.src.rpm): free 8570456 build (f21-candidate, gerrymander-1.4-1.fc21.src.rpm): free -> open (arm04-builder22.arm.fedoraproject.org) 8570462 buildArch (gerrymander-1.4-1.fc21.src.rpm, noarch): open (buildhw-07.phx2.fedoraproject.org) 8570462 buildArch (gerrymander-1.4-1.fc21.src.rpm, noarch): open (buildhw-07.phx2.fedoraproject.org) -> closed 0 free 1 open 1 done 0 failed 8570456 build (f21-candidate, gerrymander-1.4-1.fc21.src.rpm): open (arm04-builder22.arm.fedoraproject.org) -> closed 0 free 0 open 2 done 0 failed 8570456 build (f21-candidate, gerrymander-1.4-1.fc21.src.rpm) completed successfully Push, build and submit it as an update for F21 ----------------------------------------------- Push it to 'f21' branch: kashyap@f21$ fedpkg push Counting objects: 1, done. Writing objects: 100% (1/1), 279 bytes | 0 bytes/s, done. Total 1 (delta 0), reused 0 (delta 0) remote: Emitting a message to the fedmsg bus. To ssh://kashyapc@pkgs.fedoraproject.org/gerrymander 74bfd24..3de15f5 f21 -> f21 Build a new updated package: $ fedpkg build Building gerrymander-1.4-1.fc21 for f21-candidate Created task: 8570983 Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=8570983 Watching tasks (this may be safely interrupted)... 8570983 build (f21-candidate, /gerrymander:3de15f55d7415723e01986cb0968c8359242a49f): open (buildppc-02.phx2.fedoraproject.org) 8570984 buildSRPMFromSCM (/gerrymander:3de15f55d7415723e01986cb0968c8359242a49f): open (buildhw-04.phx2.fedoraproject.org) 8570984 buildSRPMFromSCM (/gerrymander:3de15f55d7415723e01986cb0968c8359242a49f): open (buildhw-04.phx2.fedoraproject.org) -> closed 0 free 1 open 1 done 0 failed 8571003 buildArch (gerrymander-1.4-1.fc21.src.rpm, noarch): open (buildvm-10.phx2.fedoraproject.org) 8571003 buildArch (gerrymander-1.4-1.fc21.src.rpm, noarch): open (buildvm-10.phx2.fedoraproject.org) -> closed 0 free 1 open 2 done 0 failed 8571028 tagBuild (noarch): open (buildvm-09.phx2.fedoraproject.org) 8571028 tagBuild (noarch): open (buildvm-09.phx2.fedoraproject.org) -> closed 0 free 1 open 3 done 0 failed 8570983 build (f21-candidate, /gerrymander:3de15f55d7415723e01986cb0968c8359242a49f): open (buildppc-02.phx2.fedoraproject.org) -> closed 0 free 0 open 4 done 0 failed 8570983 build (f21-candidate, /gerrymander:3de15f55d7415723e01986cb0968c8359242a49f) completed successfully Submit an update to Bodhi: $ fedpkg update Creating a new update for gerrymander-1.4-1.fc21 Password for kashyapc: Creating a new update for gerrymander-1.4-1.fc21 Update successfully created ================================================================================ gerrymander-1.4-1.fc21 ================================================================================ Release: Fedora 21 Status: pending Type: newpackage Karma: 0 Request: testing Bugs: 1128253 - Review Request: gerrymander - A client API and command : line tool for gerrit Notes: Update to new upstream release 1.4 Submitter: kashyapc Submitted: 2015-01-09 14:25:28 Comments: bodhi - 2015-01-09 14:25:34 (karma 0) This update has been submitted for testing by kashyapc. https://admin.fedoraproject.org/updates/gerrymander-1.4-1.fc21