Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347892 - [client][git]Need a remote tracking branch picker
Summary: [client][git]Need a remote tracking branch picker
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 04:57 EDT by Malgorzata Janczarska CLA
Modified: 2011-09-01 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.