Model Review
The Model Review view lists every file a pull request changes - the same list Bitbucket shows - and opens a compare for each of them: the semantic Actifsource compare for model resources, the text compare for all other files. In Bitbucket, model changes appear only as XML line diffs of files named by GUID; in UPstudio you see them by project, package, name and type. You can also approve the pull request, comment on it (on a file or on a line) and merge it.
Opening the View
Open the view via Window → Show View → Other… → UP → Model Review. In the UP perspective it opens next to the Problems view.
At the top, select the Repository. The view offers every Git repository that holds an open workspace project with an asrc folder.
Bitbucket Credentials
To list pull requests, the view calls the Bitbucket Cloud REST API. It needs your Atlassian account e-mail and a Bitbucket API token. Create the token at id.atlassian.com → Security → API tokens. Bitbucket app passwords are deprecated and not supported.
The token needs these scopes (names as in the token dialog):
| Scope | Needed for |
|---|---|
read:pullrequest:bitbucket |
listing pull requests, approvals and comments |
read:repository:bitbucket |
fetching the pull request commits over HTTPS |
write:pullrequest:bitbucket |
approving, commenting and merging |
write:repository:bitbucket |
Git push with the same token (not needed by the view itself) |
The view asks for the credentials the first time and again when Bitbucket rejects them (HTTP 401), or when the token lacks a scope - the message names the missing scope. If Bitbucket refuses an approval, a comment or a merge for another reason (for example a branch permission), the view shows Bitbucket's reason instead. They are stored only in the Eclipse secure storage - never in the workspace, the project settings or the repository.
To remove them, use Forget provider credentials in the view menu.
PR view vs. Git: different user names
The same API token works for the PR view and for Git, but with a different user name:
- PR view (Bitbucket REST API): user = your Atlassian account e-mail, password = API token.
- Git fetch and push (EGit): user = your Bitbucket username (not the e-mail) or the fixed user
x-bitbucket-api-token-auth, password = API token.
Fetching the pull request commits uses the Git credentials EGit stores for the remote. They always take priority over the API token of the view: the view uses its token for Git only if EGit has nothing stored for https://bitbucket.org. An old Bitbucket app password stored in EGit makes the fetch fail (not authorized) - there is no fallback to the token. Replace it as described in Git Credentials for Fetch and Push. SSH remotes use your SSH setup, the same as a fetch in the Git Repositories view.
Git Credentials for Fetch and Push
Do this once when you switch from an app password to an API token, or when a fetch or push fails with not authorized:
-
Check the stored Git credentials: Window → Preferences → General → Security → Secure Storage, tab Contents. The node GIT →
https:\2f\2fbitbucket.org:443holds the user and password EGit uses for Bitbucket. To remove them, press Delete and confirm.Delete removes the whole secure storage
Delete does not remove only the selected node: it deletes the complete default secure storage. All passwords stored in UPstudio are lost, also the credentials of the PR view.
-
Restart UPstudio when the popup asks for it. Without the restart, the Git dialogs report an internal error.
- PR view: open the view and enter your e-mail and the API token when it asks for them (the secure storage was deleted in step 1).
-
Git: run a push on any repository (for example in the Git Repositories view). In the login dialog, enter:
- User: your Bitbucket username (Bitbucket → Account settings → Bitbucket profile settings → Username) or
x-bitbucket-api-token-auth, - Password: the API token,
- enable Store in Secure Store.
- User: your Bitbucket username (Bitbucket → Account settings → Bitbucket profile settings → Username) or
If you use the same token for the PR view and for Git push, it needs all four scopes.
Reviewing a Pull Request
- Select the mode Pull request. The table lists the open pull requests with number, title, author and source → destination branch.
- Select a pull request. The view fetches its source branch and destination branch into private refs (
refs/up-review/pr-<id>/headand/base), finds the merge base and lists every changed file. - The tree has two groups:
- Model - the
.asr/.asrjresources by project and package, with name, type, state (added, modified, deleted, moved) and file path. - Files - all other files by project, with their path, kind (text, binary, submodule) and state (added, modified, deleted, renamed). Renames are detected like Git and Bitbucket do.
- Model - the
- Double-click an entry to open the read-only compare: left the pull request head, right the merge base. Model resources open in the Actifsource compare, text files in the Eclipse text compare. For an added file the merge base side is empty, for a deleted file the pull request head side is empty; the label of the empty side says so. Binary files and submodules are not compared.
The comparison is always merge base vs. pull request head - exactly what Bitbucket shows. Changes merged into the destination branch after the branch point are not listed.
If the source branch moved since the list was loaded, the view shows a warning and uses the fetched tip. Open in Browser opens the selected pull request in Bitbucket.
Approving and Commenting
For a pull request, the Review panel below the tree shows the reviewers and participants with their approval state, and the comments.
- Approve / Remove Approval approves the pull request in Bitbucket, or removes your approval.
- Comments: with no file selected, the panel shows the general comments of the pull request; with a file selected, the comments on that file, including line comments. Answers are indented below the comment they answer. The Comments column of the tree shows how many comments each file has. Refresh reloads approvals and comments.
- Comment on Pull Request posts the text of the comment field as a general comment.
- Comment on Selected File (or Comment on File... in the context menu of an entry) posts a file comment without a line. This works for model resources and for all other files.
- Comment on a line: open the text compare of a file, click on the line in the PR head side (left) and press Comment on line in the tool bar. The comment goes on that line of the new file version.
Nothing is posted or merged automatically: every comment, approval and merge needs your click, and the text is always yours.
Merging
Merge... in the Review panel merges the selected pull request in Bitbucket. The view first reads the current state of the pull request from Bitbucket and asks for confirmation:
- Source and Destination branch, with the current commit of the source branch.
- Merge strategy: the strategies the repository allows for the destination branch, with its default preselected. If Bitbucket does not report them, the only entry is Repository default, and Bitbucket applies its default.
- Close source branch: preset as in the pull request.
If the source branch moved since you reviewed it, the dialog warns you: Bitbucket merges the current commit, not the reviewed one. Select the pull request again to review the new commits first. The dialog also warns if the pull request is a draft.
Bitbucket decides whether the pull request can be merged - approvals, builds, branch restrictions, conflicts. If it refuses, the view shows Bitbucket's reason and the pull request stays open. If Bitbucket merges in the background (long merge or merge queue), the view waits up to one minute; after that it reports that the merge is still running - refresh later.
After the merge, the view reloads the pull request list, so the merged pull request disappears, and the status line names the merge commit. Local branches (for example up-review/pr-<id>) and the review refs are not touched; Clean up review refs removes the refs of the merged pull request.
Mode "Refs"
The mode Refs compares two local refs (branch, tag or commit) without a provider, without credentials and without network access. Enter Base and Head (content assist lists the local branches, remote branches and tags) and press Compare. With Use merge base (default) the base is the merge base of both refs, as in a pull request.
Use this mode for repositories that are not hosted on Bitbucket Cloud, or when you already fetched the branches. Approval and comments are not available in this mode.
New Resources and "Check out PR branch"
Resources that exist only on the pull request branch are not in your workspace. Their own name is read from the file, but references to other new resources show as GUIDs. In this case the view shows a hint and the button Check out PR branch.
The checkout is never automatic. It:
- refuses when the working tree has uncommitted changes,
- creates or fast-forwards the local branch
up-review/pr-<id>and checks it out, - refuses when that local branch has commits that are not in the pull request,
- refreshes the affected projects, which triggers an Actifsource rebuild.
Cleaning Up
The fetched refs refs/up-review/* stay in the local repository. Clean up review refs (tool bar and view menu) deletes the refs of pull requests that are no longer open, or all review refs if no pull request list is loaded.

