Community
Participate
Working Groups
The similar picker as DirectoryPrompterDialog is needed for picking the remote branch. We will use it for instance for committing to a different branch.
Widget usage: var dialog = new widgets.RemotePrompterDialog({ title: "Choose Branch", serviceRegistry: serviceRegistry, gitClient: gitService, treeRoot: remotes, //see (*) hideNewBranch: false, //set this value to "true" if you don't want to allow creating new branches func: dojo.hitch(this, function(targetBranch, remote, newBranch) { //perform your action here console.info("Branch " + targetBranch + " remote " + remote + " new branch " + newBranch); // targetBranch & remote in the "item" format (use for instance item.Location) }) }); dialog.startup(); dialog.show(); (*) treeRoot format like in GitClonesModel in git-clones-explorer.js, I tested in only for the Remote as root, format: {GroupNode : "true", Location : <RemoteLocation>, Name : "Remote"}
For sample implementation go to gitCommands.js#pushToCommand, It's currently hidden and waiting for API implementation.