Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 122107 - Initialize repository does not work
Initialize repository does not work
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
All All
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-16 10:54 UTC by ehucka
Modified: 2008-01-03 09:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2007-11-16 10:54:40 UTC
I tried to call Versioning > Mercurial > Initialize Repository with a selected folder in favorites view and nothing
happened.
I assume it should call 'hg init' on the folder. Is it correct?
Comment 1 Peter Pis 2007-11-16 11:15:12 UTC
I guess that Hg init should work from within NB correctly if it's invoked on NB project root directory or if the
directory contains NB project inside.
Comment 2 Padraig Obriain 2007-11-16 11:18:54 UTC
What we do is look for a NetBeans project corresponding to the context. If we do not find one we do nothing.

I think we should display an error rather than failing silently.

As to whether we should call "hg init" on the folder that sounds like an RFE.
Comment 3 John Rice 2007-11-16 11:28:01 UTC
Yep that's correct - the Hg initialization code tries to get the ProjectName and if it can't it bails out. This is by
design.

Do you think we should allow folks to initialize non NB folders from the favorites?
Comment 4 ehucka 2007-11-16 11:45:34 UTC
Yes. Initialize Repository is too common name for the action if it works only with projects. 
It should either to have 'project' word in its name (Initialize Project) or rather to work with any folder a user selected.

Use Case 1: I have 10 projects in a folder and I want to put them all to one repository.
Use Case 2: I work with a documentation in non-project folder.
Comment 5 John Rice 2007-11-16 12:19:24 UTC
Looking at this the problem is that we can only initialize the Project from the Project or Files view. We do not get the
information we need in the other Views to do so.

We can certainly change the menu item and also when a user tries to run it in the Favorites view we can throw up a
dialog saying "Not supported in this View". I'm reluctant to add code to disable the menu item in any context which does
not give us back a valid project name in the isEnabled handler as it will slow the menu startup.
Comment 6 John Rice 2007-12-03 11:19:20 UTC
There is no Project Context for Mercurial to work with - report back for any enabled menu items that this action is not
supported in this View. Also changed menu item to use Project instead of Repository.

IDE:-------------------------------------------------
IDE: [03/12/07 11:16] Committing started
Checking in ui/pull/Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/Bundle.properties,v  <--  Bundle.properties
new revision: 1.13; previous revision: 1.12
done
Checking in ui/pull/PullAction.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullAction.java,v  <--  PullAction.java
new revision: 1.19; previous revision: 1.18
done
Checking in ui/create/Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/create/Bundle.properties,v  <--  Bundle.properties
new revision: 1.7; previous revision: 1.6
done
Checking in ui/create/CreateAction.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/create/CreateAction.java,v  <--  CreateAction.java
new revision: 1.12; previous revision: 1.11
done
Checking in ui/diff/Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Bundle.properties,v  <--  Bundle.properties
new revision: 1.8; previous revision: 1.7
done
Checking in ui/diff/DiffAction.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/DiffAction.java,v  <--  DiffAction.java
new revision: 1.8; previous revision: 1.7
done
Checking in ui/merge/Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/merge/Bundle.properties,v  <--  Bundle.properties
new revision: 1.8; previous revision: 1.7
done
Checking in ui/merge/MergeAction.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/merge/MergeAction.java,v  <--  MergeAction.java
new revision: 1.11; previous revision: 1.10
done
Checking in ui/push/Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/Bundle.properties,v  <--  Bundle.properties
new revision: 1.11; previous revision: 1.10
done
Checking in ui/push/PushAction.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/PushAction.java,v  <--  PushAction.java
new revision: 1.18; previous revision: 1.17
done
Checking in Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/Bundle.properties,v  <--  Bundle.properties
new revision: 1.12; previous revision: 1.11
done
Checking in ui/commit/CommitAction.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/commit/CommitAction.java,v  <--  CommitAction.java
new revision: 1.10; previous revision: 1.9
done
Checking in ui/commit/Bundle.properties;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/commit/Bundle.properties,v  <--  Bundle.properties
new revision: 1.6; previous revision: 1.5
done
IDE: [03/12/07 11:16] Committing finished
IDE: [03/12/07 11:16] Diffing finished


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo