com.aragost.javahg.commands
Class BranchCommand

java.lang.Object
  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.BranchCommandFlags
          extended by com.aragost.javahg.commands.BranchCommand

public class BranchCommand
extends BranchCommandFlags

Command class for executing hg branch. Set flags from BranchCommandFlags and run set(String) to set a branch or clean() to reset the branch name.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aragost.javahg.internals.AbstractCommand
AbstractCommand.State
 
Constructor Summary
BranchCommand(Repository repository)
           
 
Method Summary
 String clean()
          Reset the branch name for working directory to branch name of first parent
 String get()
          Get the branch for working directory.
 void set(String branchName)
          Set the branch for working directory.
 
Methods inherited from class com.aragost.javahg.commands.flags.BranchCommandFlags
force, getCommandName, on
 
Methods inherited from class com.aragost.javahg.internals.AbstractCommand
cancel, clear, cmdAppend, cmdAppend, cmdAppend, cmdAppend, cmdAppend, doneHook, getErrorString, getRepository, getReturnCode, isSuccessful, launchIterator, launchStream, launchString, needsInputLine, reopenOutputChannelStream, sendLine, toString, withDebugAndChangesetStyle, withDebugFlag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BranchCommand

public BranchCommand(Repository repository)
Method Detail

get

public String get()
Get the branch for working directory.

Returns:
name of branch for working copy

set

public void set(String branchName)
Set the branch for working directory.

Parameters:
branchName -

clean

public String clean()
             throws IOException
Reset the branch name for working directory to branch name of first parent

Returns:
old branch name
Throws:
IOException


Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.