DESCRIPTION

Disable actions when HEAD cannot be resolved

Actions like: tag, branch, reset and merge should be disabled when
repository has no commits yet. A special decorator "NO-HEAD" is added
into project node in this case.

Additionally push and fetch actions should be disabled when there are
no remote configurations.

Also updates context menu actions in Repositories view so that they
don't appear on empty repository or when fetch/push remotes aren't
defined. This also needs to updates some tests.

Change-Id: I6b023fd40ae29e3c2571a0cfc783d587f3a46427
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2011-03-01 22:34:42.000000000

Uploaded patch set 6.

-------------------------------------
author: Douglas Trujillo
date: 2011-03-01 23:05:32.000000000

Patch Set 6:

ah, ok, I missed this use case that synchronize also shows not yet committed changes, I agree we should not disable the synchronize menu entry due to this

-------------------------------------
author: Leslie Stephenson
date: 2011-03-01 23:09:59.000000000

Patch Set 6:

I've reverted this change in patch set 6, now synchronize is enabled for empty repository.

-------------------------------------
author: Douglas Trujillo
date: 2011-03-01 23:31:23.000000000

Patch Set 6: I would prefer that you didn't submit this

still I see the following problems:

repository view:
- on repo node
-- merge and rebase action are not disabled but removed, I think it's better to disable them so that users can see what operations they might expect when repo is not empty
-- does "Import Projects" make sense in that state ?
- on "Branches" node
-- Create Branch doesn't work since it requires a source branch ?
- on "Tags" node
-- "Create Tag" should be disabled ?

team menu:
- "Remote > Configure Fetch from Upstream" should be enabled since if you did that you may fill your empty repo by running "Fetch from Upstream", right ?
-- configuring that should then enable "Fetch from Upstream"
- similarly "Remote > Fetch from..." should be also enabled as this might be the way to get commits in
- "Remote > Configure Push to Upstream" should be enabled as you may want to configure that before you created the first commit (or fetched some changes) (but "Push to upstream" and "Remote > Push...) should be disabled until there is anything to puhs

-------------------------------------
