issue-#100 Controls documentation

User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#100 Controls documentation

Post by Josef Templ »

Doug, you did not push anything so far as far as I can see on github.
What you probably did is you committed the changes.

For your understanding:
The changes are still on your local machine.
You have to 'push' them in order to copy them to our github repository.

You can use 'Show Log', one of the few important commands of Tortoise Git,
for checking the state of your local repository.
You can click on 'Working dir changes' to see the uncommitted changes.
You can click on a commit message to see the selected commit.

When you are done with your changes (you can also make several commits)
you have to 'Push...' the changes to the origin.
You should see 'issue-#100' in the fields for 'Local:' and 'Remote:'.
This would be OK. Always push back to the related topic branch only.
Never to master or to any other branch or to all branches.

If anybody has pushed other changes in the meantime you will get an error message.
If not, the push will succeed and the changes are on our github repository.

For the diff viewer I have updated the wiki page with a version for BlackBox 1.7.

- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#100 Controls documentation

Post by DGDanforth »

Josef Templ wrote:Doug, you did not push anything so far as far as I can see on github.
What you probably did is you committed the changes.

For your understanding:
The changes are still on your local machine.
You have to 'push' them in order to copy them to our github repository.
I committed and pushed. When I pushed I was asked to login to GitHub which I did and
it then said everything was fine.
Should I push again or will that corrupt things?
-Doug
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#100 Controls documentation

Post by DGDanforth »

Josef Templ wrote: For the diff viewer I have updated the wiki page with a version for BlackBox 1.7.
Wow! There are so many assumption implicit in that wiki.
(1) For example, I needed to create a shortcut pointing to \Program Files\DiffConfig so that I could bring up BlackBox using that directory so I could THEN compile the config file and have it placed into the DifConfig/Code directory.
(2) Does the extension really and a dot in it (.odc)? I tried it that way but Git complained that it could not find the file specified. I was in my BB#100/System/Docu/ with Controls.odc highlighted at which point I right clicked on the Diff menu item.
GitDiff.JPG
and here is my diff extension settings.
GitExtension.JPG
Now what?
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#100 Controls documentation

Post by Josef Templ »

DGDanforth wrote: I committed and pushed. When I pushed I was asked to login to GitHub which I did and
it then said everything was fine.
Should I push again or will that corrupt things?
-Doug
I cannot see any changes in the github repository.
Are you sure that you committed something into your cloned branch issue-#100?
Use 'Show log' to check that.
Don't mix it up with the 'Working dir changes'. Those are uncommitted changes.

If you have committed something (you should know that because you filled out the commit dialog
if you really did a commit), then Push again.

Let us see a screenshot from the log, the push dialog, and the push result.
Check if you are still on the right branch (issue-#100).

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#100 Controls documentation

Post by Josef Templ »

DGDanforth wrote: Wow! There are so many assumption implicit in that wiki.
There is no need to recompile the 1.7 version. It is already compiled for BB 1.7.
Otherwise there would not be any need for the 1.7 version.
The source code is identical to the 1.6 version.

Check your path. It seems that git cannot find your BlackBox.exe file.
Check the double quotes. They look wrong.

- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#100 Controls documentation

Post by DGDanforth »

Josef Templ wrote: Check your path. It seems that git cannot find your BlackBox.exe file.
Check the double quotes. They look wrong.

- Josef
You are correct I was missing an initial quote mark.
(I have also cleaned up my files so that I am now operating out of "C:\Program Files\BlackBox Component Builder 1.7")

DiffConfig now works. However, that doesn't look like a redmine diff. How does one generate a redmine diff that can be sent as a zip file?

I just recommitted issue-#100 and then did a push (again). The only difference is I added a comment in the comment field.
Here is a screenshot of the push results.
GitPush-issue-#100.JPG
-Doug
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#100 Controls documentation

Post by Josef Templ »

The changes are in github but the commit message does not follow the conventions.
Please read the wiki on http://wiki.blackboxframework.org/index ... aceability. I don't want to type it again and again.
In particular please read the section on Bi-Directional Traceability.
It is important to understand the meaning of this term.

Fix the commit message in your local clone's working dir by the following steps and nothing else:
1. activate the commit command (mouse right on the clone folder and select commit from context menu)
2. select option "Amend Last Commit" in the commit dialog
3. edit the commit message in the commit message field such that it follows the conventions.
Although not strictly a convention right now but it seems to be common practice to also "Add signed-off-by",
which adds a line with the author id.
4. press OK
5. Push with option 'Force overwrite existing branch'

Note that the option 'Force overwrite existing branch' must only be used if you know that nobody else has pushed to issue-#100 on github in the meantime. Otherwise we would loose commits. We know that we don't loose commits and therefore you can specify this option. In general, before using this option, you should check on github if there was any commit pushed by somebody else. This option is intended to be used for fixing typos in the commit message, not for general use.

- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#100 Controls documentation

Post by DGDanforth »

Josef Templ wrote:also "Add signed-off-by",
which adds a line with the author id.
4. press OK
5. Push with option 'Force overwrite existing branch'
I placed a line with "Add signed-off-by" in the commit message. Is that what you meant?

I see no option with 'Force overwrite existing branch'. Here is what I see:
Git Force overwrite.JPG
-Doug
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#100 Controls documentation

Post by Josef Templ »

Doug, did you read the section on Bi-directional traceability?
Obviously not, why not?

Code: Select all

The general rule with respect to committing changes to Git is to always refer to an issue in the commit message.
The format of the first line of a commit message that refers to issue number N is
<commit message text>. Refs: #N.
- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#100 Controls documentation

Post by DGDanforth »

Josef Templ wrote:Doug, did you read the section on Bi-directional traceability?
Obviously not, why not?

Code: Select all

The general rule with respect to committing changes to Git is to always refer to an issue in the commit message.
The format of the first line of a commit message that refers to issue number N is
<commit message text>. Refs: #N.
- Josef
Josef,
I did read the section and I did change the message to <commit message text>. Refs: #N.
Docu for Controls updated. Refs: #100.
Add signed-off-by
I just tried another commit and saw the []Message only box and this time checked it.
That did not help for the push which failed. Here is the message I got
git.exe push --progress "origin" issue-#100:issue-#100

To https://github.com/BlackBoxCenter/blackbox.git
! [rejected] issue-#100 -> issue-#100 (non-fast-forward)
error: failed to push some refs to 'https://github.com/BlackBoxCenter/blackbox.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Should I really do a "pull" before doing another commit and push?
I just tried to do a pull (it failed). His is the message I got.
git.exe pull -v --progress "origin"

From https://github.com/BlackBoxCenter/blackbox
= [up to date] issue-#100 -> origin/issue-#100
= [up to date] issue-#106 -> origin/issue-#106
= [up to date] issue-#116 -> origin/issue-#116
= [up to date] issue-#118 -> origin/issue-#118
= [up to date] issue-#49 -> origin/issue-#49
= [up to date] issue-#88 -> origin/issue-#88
= [up to date] master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
System/Docu/Controls.odc
Please, commit your changes or stash them before you can merge.
Aborting


git did not exit cleanly (exit code 128) (2344 ms @ 7/24/2016 3:57:57 PM)
That looks like a "catch-22" to me.
-Doug
Post Reply