The International Simutrans Forum

 

Author Topic: Assistance sought with Gitk and merge  (Read 1804 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Assistance sought with Gitk and merge
« on: January 29, 2010, 11:56:31 PM »
I should be very helpful for assistance with anyone familiar with GIT GUI (and Gitk) in relation to the following: some of the latest changes to Simutrans-Standard are quite fundamental (to accommodate networking) and do not merge easily with Simutrans-Experimental, so a great deal of manual editing is required. In order to merge the code effectively, I need to see what the intention of the changes were, so I use Gitk to visualise the changes. I leave the window open when I am editing.

However, I turn my computer off every night to save electricity. When I do that, there is no way of restoring the same Gitk session from before. I cannot find a way of saving the information effectively, which makes it enormously difficult to merge in the latest changes from Standard, since the changes are so complicated that it is unlikely that I shall have enough time to do them all in one day any time soon.

Can anyone suggest any workarounds to this rather tricky issue? Any assistance or suggestions would be very much appreciated.

knightly

  • Guest
Re: Assistance sought with Gitk and merge
« Reply #1 on: January 30, 2010, 08:02:34 AM »
As far as I understand, the Gitk that you are talking about is the repository browser which shows branches and their commits in tree structure and displays the code changes in a certain commit. If you haven't made any changes to the repository, each time starting the repository browser will show the same results. I think there is no such thing as a Gitk session (as it always just shows what is currently in the repository), so what are you actually looking for, and what session info do you want to save?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Assistance sought with Gitk and merge
« Reply #2 on: January 30, 2010, 09:42:00 PM »
Knightly,

ahh, I think that I see what you mean - I can access the Gitk view from the "repository" menu. I had been using the version that I find when I go to merge>local merge>visualize, which shows only the changes in the latest merge, but it is not too hard, I suppose, to remember which is the beginning and which the end. Thank you for your help!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Assistance sought with Gitk and merge
« Reply #3 on: January 31, 2010, 03:01:36 PM »
On further investigation, unfortunately, it seems that this approach does not work after all. When I open Git and go to "Repository>Visualize all branch history", GitK only shows me those changes that have successfully merged without conflict. Those files with conflicting changes - the very ones that I need - are not shown: a label "unmerged path: [filename]" is shown instead. The only way to view the relevant changes is to abort the merge, discarding all the conflict resolution work that I have done so far, and select "visualise" from the merge window once again, which, of course, is useless.

Does anyone have any idea how to get this display back after merging, or how to preserve it?

knightly

  • Guest
Re: Assistance sought with Gitk and merge
« Reply #4 on: January 31, 2010, 04:01:05 PM »
James,

I just want to clarify that, I had not proposed any solution to your problem in my post above, so I am surprised that you said it "does not work after all". I merely stated what you will get by opening the repository browser, that's all.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: Assistance sought with Gitk and merge
« Reply #5 on: January 31, 2010, 04:28:39 PM »
maybe this helps?

http://kernel.org/pub/software/scm/git/docs/git-status.html

It seems to me, that the git gui does not cover most of the features of the command line git. If you use the same git installation that I have, then you have a git bash somewhere, where you could use the git command line tools.

I move the topic back to Development board.

knightly

  • Guest
Re: Assistance sought with Gitk and merge
« Reply #6 on: January 31, 2010, 04:55:17 PM »
As far as I can remember (as I only encountered merge conflicts once or twice), after merging a branch, files which can be automatically merged without conflict are placed in the staged changes list; other files which have conflicts and require manual resolution are placed in the unstaged changes list. By clicking on the names of those files in conflict in the unstaged changes list, you can already see the conflicts and their context in the upper right window. I think that is already very convenient for code review and conflict resolution, so I fail to understand what you want here.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Assistance sought with Gitk and merge
« Reply #7 on: January 31, 2010, 08:17:53 PM »
I have managed to find a workaround by pulling Simutrans-Standard from the Github mirror and looking back through the changes there, using tags to mark the points where the code was previously merged. Thank you all for your help!