The following table describes common Mercurial tasks.
To perform this task: |
Follow these steps: |
Place a Project under Mercurial Version Control |
- Select the NetBeans project you wish to put under Mercurial version control.
- Either choose Team > Mercurial > Initialize Repository
from the main menu, or
- Choose Versioning > Initialize Mercurial Project
from the right-click menu of a node in the Projects, Files or Favorites window.
The project is placed under Mercurial control. You will then need to Commit the Project files.
|
Clone an External Repository |
- Choose Team > Mercurial > Clone Other
from the main menu.
- In the Mercurial Clone Other wizard, specify the location of the Mercurial repository,
and click Next.
- In the Parent Directory, specify the location on your computer where you want the
Clone to reside.
- In the Clone Name, specify the name of the Clone.
- Click Finish to Clone the remote repository.
|
View versioning information |
- Select a project, directory, or file that is in a Mercurial working
directory
- Choose Mercurial > Status from the right-click menu of a node in the
Projects, Files or Favorites window. The Status
Window opens to display versioning information on the selected item(s).
|
Diff files |
- Select the file that you want to perform a diff on.
- Choose Mercurial > Diff
from the right-click menu.
|
Update project |
- Select the project that you want to update
- Choose Mercurial > Update from
the right-click menu.
- This will update the working directory to match the repository contents.
|
Commit changes |
- Select the file or directory that you want to commit.
- Choose Mercurial > Commit from right-click menu.
|
Create a patch |
- Select the locally modified file or folder and choose Team >
Export Diff from the main menu.
- Select the revision to export.
- Enter a name and location where you want to save the patch.
- The default is to place it in /tmp/%b_%r_%h. Where %b = Project Name, %r = revision and %h = ChangeSet ID
- Click Export.
|
Import a patch |
- Select the Mercurial-versioned Project and choose Team >
Import Patches from the main menu.
- Type the path or navigate to the patch file you want to apply.
- Click Ok.
|
Push to default |
- Select the Cloned Mercurial Project you want to Push changes to.
- Choose Mercurial > Push to default from right-click menu.
- This will Push changes to the Clone's parent Repository.
|
Pull from default |
- Select the Cloned Mercurial Project you want to Pull changes into.
- Choose Team > Share > Pull from default from the main menu.
This will Pull changes from the Clone's parent Repository.
|