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 126357 - clone create hgrc [paths] default with password
Summary: clone create hgrc [paths] default with password
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 06:55 UTC by Nam Nguyen
Modified: 2008-02-13 16:00 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
mercurial-clonewizard-defaultpaths.jpg (64.38 KB, image/jpeg)
2008-02-13 15:13 UTC, John Rice
Details
main_work_66772_cf1fe73564b0-126357-cloneother-paths.patch (38.74 KB, text/plain)
2008-02-13 15:26 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2008-01-31 06:55:58 UTC
The mercurial clone wizard create hgrc entry:
[paths]
default = https://nnguyen:****@hg.netbeans.org/main/ 

instead of:

[paths]
default = http://hg.netbeans.org/main/
default-push = https://nnguyen:****@hg.netbeans.org/main/

This put authentication information into _pull_ path, whereas it should only be in _push_ path, and probably cause push
error:

abort: pretxnchangegroup.subject hook failed
Comment 1 Padraig Obriain 2008-01-31 09:06:43 UTC
Did you clone from http://hg.netbeans.org/main/?

My understanding is that is that it is mercurial itself, not the mercurial plugin which sets the hgrc entry.

I believe that the recommendation is that you clone from http://hg.netbeans.org/main/ and set default-push path manually
after the clone.
Comment 2 Padraig Obriain 2008-01-31 09:09:15 UTC
I thought that the error "abort: pretxnchangegroup.subject hook failed" is caused by not having username set to NetBeans
user.
Comment 3 Nam Nguyen 2008-01-31 14:28:10 UTC
I specified repository URL: https://nnguyen:****@hg.netbeans.org/main/ on the first page of the wizard.  So I get only
one paths entry 'default', no 'default-push'.  This causing the error when I push.  Correcting the entry by adding
'default-push' does not help because the repository is already populated with changesets with
https://nnguyen:****@hg.netbeans.org/main information.  To avoid this confusing situation, 

I guess we could improve the wizard by have separate fields for user, password and checkbox for whether to use them in
default path (default is false).  The plugin could add default-push entry after the hg clone command complete.




Comment 4 John Rice 2008-02-06 11:10:57 UTC
Proposal to sort this out:

Add a new step, Mercurial Paths:

1. Mercurial Repository
2. Mercurial Paths
3. Destination Directory

Mercurial Paths:
This will have two text fields:
Default Pull:
Default Push:

Initially they will be filled in with the url information entered in step 1. Mercurial Repository. If the user wishes to
modify them at this stage they can.
The paths will be stored in the <cloned project>/.hg/hgrc file and available from the Mercurial -> Properties menu for
this cloned project.
Comment 5 Nam Nguyen 2008-02-06 15:49:08 UTC
Agree.  This give users more control, seems like a better design.
Comment 6 John Rice 2008-02-13 15:13:33 UTC
Created attachment 56613 [details]
mercurial-clonewizard-defaultpaths.jpg
Comment 7 John Rice 2008-02-13 15:26:32 UTC
Created attachment 56614 [details]
main_work_66772_cf1fe73564b0-126357-cloneother-paths.patch
Comment 8 John Rice 2008-02-13 16:00:54 UTC
Created new Wizard step as described (see screenshot), Mercurial Paths, allows user to set default push and default pull
paths during Clone Other.

I am not validating the paths as its hard to tell what I should validate them against, they could be remote URI's, but
they could just as easily be local file paths to a local repo. If they mess up the paths subsequent actions on the repo
might fail, but the user will be told and they can always adjust the paths using the Mercurial->Properties dialog.


changeset:   67304:f768a5f59167
user:        jrice@netbeans.org
date:        Wed Feb 13 15:23:29 2008 +0000
files:       mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/Bundle.properties
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneDestinationDirectoryPanel.form
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneDestinationDirectoryPanel.java
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/ClonePathsPanel.form
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/ClonePathsPanel.java
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/ClonePathsWizardPanel.java
mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneWizardAction.java
description:
#126357: Clone Other - add support to specify the default push and pull paths as another Wizard step, defaults to
repository URI.