Ticket #6824 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

git test macro leaves section headers in config file

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: critical Milestone: Release 2.5
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

The git-test macro currently uses 'git config --unset' to remove a key value. This however leaves a [mantid "workflow"] section in the file each time.

It should use "git config --remove-section" instead to completely remove the section

Change History

comment:1 Changed 8 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:2 Changed 8 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:3 Changed 8 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:4 Changed 8 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:5 Changed 8 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:6 Changed 8 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

Branch: bugfix/6824_gittest_fix

Tester: If you use the git test macro to test this ticket you can verify it is okay by first running

  • git test start 6824
  • git test fail

Now open the file .git/config in the root of the source tree and verify that the empty [mantid "workflow"] sections are gone.

comment:7 Changed 8 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:8 Changed 8 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

This doesn't work for me (RHEL6, git 1.7.1). An extract of my config file after following the given steps:

[mantid "workflow"]
[mantid "workflow"]
[mantid "workflow"]
[mantid "workflow"]
[mantid "workflow"]
        mergebranch = feature/6785_hide_live_algorithms

N.B. I did definitely install the patch

comment:9 Changed 8 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:10 Changed 8 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:11 Changed 8 years ago by Martyn Gigg

  • Status changed from reopened to accepted

comment:12 Changed 8 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

So that key is from a "git checkbuild" when a merge gives a conflict. It records the branch name so that after the merge is resolved you can run checkbuild again straight from the develop branch and it will continue & put you back on the original branch.

I've updated it so that now when a checkbuild starts from a branch the key is wiped out at the start too so it should disappear the next time a git checkbuild is run.

comment:13 Changed 8 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:14 Changed 8 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:15 Changed 8 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:16 Changed 8 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:17 Changed 8 years ago by Russell Taylor

  • Status changed from verifying to closed

That did it.

comment:18 Changed 7 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:19 Changed 7 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:20 Changed 7 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:21 Changed 7 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:22 Changed 7 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:23 Changed 7 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:24 Changed 7 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:25 Changed 7 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:26 Changed 7 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:27 Changed 7 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:28 Changed 7 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:29 Changed 7 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:30 Changed 7 years ago by Martyn Gigg

Remove sections from git config when they are empty. Refs #6824

Changeset: a448c0194a31475bd74e124342cd4466a95a74d6

comment:31 Changed 7 years ago by Martyn Gigg

Allow for there to have been no key set. Refs #6824

Changeset: bdc5881069f90ceb0ce675b3dbfb0bebf49e7f8b

comment:32 Changed 7 years ago by Martyn Gigg

Remove config values when git-checkbuild starts on branch. Refs #6824

Changeset: 001be1d8773a74bd74b5c3628456c562dcd41460

comment:33 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7670

Note: See TracTickets for help on using tickets.