MercurialVersionControlDemoScript

Revision as of 13:22, 5 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Overview

The purpose of this demo is to present the NetBeans Mercurial Module features.


Prerequsites


Demo Steps

Setup

  • Remove AnagramGame project if it exists. You must remove the directory which contained the project outside of the IDE as it will contain the .hg directory which is not deleted when the project is deleted.
  • Create new project - Samples - Java - Anagram Game. The name of the project will be AnagramGame the first time you create the project, AnagramGame1 the next time and AnagramGame2, the third time and so on.

Initialize

  1. Invoke Versioning | Mercurial SHOW that "Initialize Hg Repository" and "Clone Other..." are the only menu items available.
  2. Invoke Versioning | Mercurial | Initialize Hg Repository menu item.
    SHOW files to be added to repository are displayed in Mercurial output tab.
  3. Now SHOW that Mercurial menu item is available when right clicking on the project.
  4. Invoke Mercurial | Status to show files to be put under Mercurial control.
  5. Invoke Mercurial | Commit... to commit the changes.
    SHOW that the commit dialog lists all files to be committed.


Create a clone of the project

  1. Invoke Clone - AnagramGame from Versioning in the Main menu to create a clone of the project. The cloned project is the newly highlighted project.
    SHOW output in Mercurial output tab.


Update-Edit-Commit Work-flow

This work should be done using the cloned project.

Make local changes.

  1. edit, add and remove some files.
    SHOW status visible in project explorer, i.e. added and modified files. Status changes visible in status view, i.e. added modified and deleted files.

Diff before commit - OPTIONAL

  1. Invoke diff from the toolbar in status view.
    SHOW all changes made.

Commit changes

  1. Invoke commit from the toolbar in status view.
    SHOW that it is possible to manually exclude files from the commit.
  2. Specify some commit message and click commit.


Push and Pull Changes

  1. Choose file to which change was made and select Show History menu item from the Mercurial menu.
    SHOW two changesets, the initial import and the recent change.
  2. In original AnagramGame project choose the same file and invoke Show History from the Mercurial menu.
    SHOW one changeset, the initial commit.
  3. In cloned AnagramGame project invoke Push to - default.
  4. In original AnagramGame project choose the same file and invoke Show History from the Mercurial menu.
    SHOW two changesets, the initial commit and the recent change.


Not logged in. Log in, Register

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