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 Versioning > Mercurial > Initialize Repository
from the main menu.
- Or choose Versioning > Initialize Mercurial Repository
from the right-click menu.
- The project will be placed under Mercurial control. You will then need to Commit the Project files.
|
Clone an External Repository |
- Choose Versioning > 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. 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 Versioning >
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 controlled Project and choose Versioning >
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 Mercurial > Pull from default from right-click menu.
- This will Pull changes from the Clone's parent Repository.
|