This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229555 - Patch for: [Switch to selected branch]: automatically fill in local branch name based on the remote branch name
Summary: Patch for: [Switch to selected branch]: automatically fill in local branch na...
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2013-05-09 18:18 UTC by markiewb
Modified: 2013-08-01 15:19 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Shows the dialog which needs the improvement (50.79 KB, image/png)
2013-05-09 18:18 UTC, markiewb
Details
Proposed patch (1.40 KB, patch)
2013-05-10 19:34 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-05-09 18:18:44 UTC
Created attachment 134271 [details]
Shows the dialog which needs the improvement

When selecting a remote branch AND checking it out as a new branch (by toggling the "checkout as new branch" checkbox) I want the textfield field of the local branchname filled-in automatically. Currently I have to type the branch name manually. The standard usecase in enterprises is to keep the same branch name (from the remote branch) - else the communication between the devs gets complicated.

EXPECTED: fill in the branch name automatically, the user can still edit it afterwards. 

For example: 
* By selecting "origin/branch-2_3" the "branch-2_3" is filled into the textfield 
* By selecting "mylocalbranch-2_5" the "mylocalbranch-2_5" is filled into the textfield (and of course there will be a warning, that would be OK)
Comment 1 markiewb 2013-05-10 19:34:33 UTC
Created attachment 134301 [details]
Proposed patch

I like to propose the following patch. It automatically fills-in the local branch name based on the remote branch name.

@Ondrej: Please review and commit if appropriate.
Comment 2 Ondrej Vrabec 2013-05-13 11:15:52 UTC
any reason the patch contained:
> final boolean localBranchExists = branches.containsKey(rev);
? IMO it should be:
> final boolean localBranchExists = branches.containsKey(localBranch);
Comment 3 Ondrej Vrabec 2013-05-13 11:17:09 UTC
pushed as core-main #85bdf99800ef
Comment 4 markiewb 2013-05-13 18:36:36 UTC
(In reply to comment #2)
> any reason the patch contained:
> > final boolean localBranchExists = branches.containsKey(rev);
> ? IMO it should be:
> > final boolean localBranchExists = branches.containsKey(localBranch);

Thanks for the review. It was NO intention.
Comment 5 Quality Engineering 2013-05-15 02:30:38 UTC
Integrated into 'main-golden', will be available in build *201305142300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/85bdf99800ef
User: Benno Markiewicz <markiewb@netbeans.org>
Log: Issue #229555 - [Switch to selected branch]: automatically fill in local branch name based on the remote branch name
Comment 6 markiewb 2013-08-01 15:19:20 UTC
Verified in 201307312300