Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orion/Manual Test Cases

This page contains some complex test cases that needs manual steps in Orion.

Resolve merge conflicts

The section describes how to resolve conflicts resulted from git merge , by using Orion git status and writable compare editor pages. Please note that the expected result from the test cases only applies in Orion M7. A better solution(possibly 3-way compare) will be addressed after M7 and the same steps will apply. There are 3 test cases in this section. The test cases assume that you have a remote Git repository and a cloned local Git repository. When both of the repositories modify the same file at the same places , conflicts may happen during merge and manual modification is needed to resolve them. Before executing the test cases you want to simulate a remote Git repository and prepare a local clone from it:

  • In your server's local drive , find a folder and use Git Bash there.
  • In Git bash , use "git init remote". This will create an empty git repository called remote.
  • In git bash , use "git clone remote local".This will clone a git repository called local. As an alternative ,You can also clone the local in Orion.
  • In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.
  • In Orion , create two folders and link the full path of "remote" and "local" , respectively.

Both repository modified the same file

  • In Orion navigator at the remote folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)
line1
line2
line3
line4
line5
line6
line7
  • In Orion navigator at the remote folder, click on [more]->[git status] action. This brings up the git status page on remote.
  • In git status page , stage file1.txt and commit it.
  • Come back to navigator page at the local folder, click on [more]->[git remote] action. This brings up the git remote page on local.
  • In git remote page ,click on Fetch action at the top left corner of the page. You will see file1.txt is fetched.
  • Click on Merge action , file1.txt is pulled into local folder.
  • Come back to navigator page at remote folder , click on file1.txt. This brings up the Orion editor.
  • In the editor , change the file1.txt to something like below , and save.
line1
line2 changed by remote
line3
line4 changed by remote
line5
line6
line7
  • Go to git status page and commit the change.
  • Come back to navigator page at local folder, click on file1.txt. This brings up the Orion editor.
  • In the editor , change the file1.txt to something like below , and save.
line1
line2 
line3
line4 changed by local
line5
line6 changed by local
line7
  • Go to git status page and commit the change.
  • Come back to navigator page at local folder again, click on [more]->[git remote] action.
  • Fetch and merge again.
  • Go to git status page again on the local folder.File1.txt is marked as conflicted.
  • Click on the "side by side compare" action on file1.txt , this will bring up the compare editor as below:

Orion-conflict-test1.png

  • You can now modify the red block on the left side of the compare editor and change it to some thing like below and save it.
line 4 changed by both remote and local
  • Go back to git status page on the local folder, click on the "resolve conflict" action (equals to stage action for the normal case)
  • Commit the change.
  • Now you are able to push the change back to remote and the conflicts are resolved.(One thing needs to mention : as the remote is not a real remote but a simple repository , after push the working directory on remote still remains the old version. You have to replace the working directory by checking out from the index.)

Remote deleted and local modified the same file

  • In Orion navigator at the remote folder , create file2.txt and put content like below , save the content and commit it.
line1
line2
line3
  • In Orion navigator at the local folder, go to [more]->[git remote ] page and pull file2.txt from remote.
  • In Orion navigator at the remote folder , delete file2.txt and commit the change.
  • In Orion navigator at the local folder, modified file2.txt as below , save and commit the change.
line1
line2 changed by local
line3
  • In Orion navigator at the local folder, go to [more]->[git remote ] page and pull from remote again.
  • In Orion navigator at the local folder, go to [more]->[git status ] , file2.txt is marked as conflicted as below.

Orion-conflict-test2-status.png

  • Variation 1: you can resolve the conflict without changing any thing by clicking on Resolve Conflict button. This will stage and commit file2.txt. Later you just push your change back to remote.The commit message is automatically generated as resolved deletion conflicts on file file2.txt. If you go to git log page from local folder you will see

Orion-conflict-test2-log.png

  • Variation 2: you can also modify file2.txt in the compare editor and come back to the git status page to resolve the conflict.

Orion-conflict-test2-compare.png

In this case file2.txt will be staged and you need to commit the change manually .

Orion-conflict-test2-staged.png

  • Now you are able to push the change back to remote and the conflicts are resolved.

Remote modified and local deleted the same file

  • In Orion navigator at the remote folder , create file3.txt and put content like below , save the content and commit it.
line1
line2
line3
  • In Orion navigator at the local folder, go to [more]->[git remote ] page and pull file3.txt from remote.
  • In Orion navigator at the local folder , delete file3.txt and commit the change.
  • In Orion navigator at the remote folder, modified file3.txt as below , save and commit the change.
line1
line2 changed by remote
line3
  • In Git Bash command at local folder, use git pull. Please note that currently there are issues with Orion git fetch and merge in this case , which is under investigation.
  • In Orion navigator at the local folder, go to [more]->[git status ] , file3.txt is marked as conflicted.
  • If you go to compare editor , please note that due to some JGit limitaions , the diff does not tell much about how the conflict is but you can still use the compare editor to merge the solution.

Orion-conflict-test3-compare.png

  • Come back to git status page , you can stage and commit the change.
  • If you still want to delete file3.txt , you will need to use Orion navigator to delete it and commit the change again before push.

Orion-conflict-test3-commit.png

  • Now you are able to push the change back to remote and the conflicts are resolved.

Future Test Cases...

Back to the top