Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347892

Summary: [client][git]Need a remote tracking branch picker
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Malgorzata Janczarska CLA 2011-06-01 04:57:02 EDT
The similar picker as DirectoryPrompterDialog is needed for picking the remote branch. We will use it for instance for committing to a different branch.
Comment 1 Malgorzata Janczarska CLA 2011-06-01 05:17:19 EDT
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"}
Comment 2 Malgorzata Janczarska CLA 2011-06-01 05:23:55 EDT
For sample implementation go to gitCommands.js#pushToCommand, It's currently hidden and waiting for API implementation.