com.aragost.javahg
Class Changeset

java.lang.Object
  extended by com.aragost.javahg.Changeset

public class Changeset
extends Object

Represent data for a single changeset.

A Changeset object can be created just with the node id. The actually data will be loaded on demand when it is accessed


Nested Class Summary
 class Changeset.Extra
          Class representing the extra dictionary Mercurial has for each changeset.
 
Field Summary
static String CHANGESET_EAGER_STYLE_PATH
           
static String CHANGESET_STYLE_PATH
          Style file used among other with the log command to read changesets.
protected  com.aragost.javahg.ChangesetData data
          The actual data for the Changeset
protected  com.aragost.javahg.ChangesetFileData fileData
          The actual file data for the Changeset
static String NULL_ID
          The id for the null changeset
 
Constructor Summary
Changeset(Repository repository, String node)
          Use Repository.changeset(String) to create Changesets
 
Method Summary
 boolean equals(Changeset that)
           
 boolean equals(Object that)
           
 List<String> getAddedFiles()
           
 String getBranch()
           
 List<String> getDeletedFiles()
           
 Changeset.Extra getExtra()
           
 String getMessage()
           
 List<String> getModifiedFiles()
           
 String getNode()
           
 Changeset getParent1()
           
 Changeset getParent2()
           
 int getRevision()
           
 DateTime getTimestamp()
           
 String getUser()
           
 int hashCode()
           
 Phase phase()
           
static List<Changeset> readListFromStream(Repository repository, HgInputStream in)
          This method is an alias for readListFromStream(Repository, HgInputStream, boolean) with the eager parameter set to false.
static List<Changeset> readListFromStream(Repository repository, HgInputStream in, boolean eager)
          Read the rest of the content of the stream and return a List of the Changeset found there.
 Phase readPhase()
          Deprecated. 
 List<String> tags()
          Return tags that is pointing the this changeset
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANGESET_STYLE_PATH

public static final String CHANGESET_STYLE_PATH
Style file used among other with the log command to read changesets.

The style is parsed by the createFromInputStream() method.


CHANGESET_EAGER_STYLE_PATH

public static final String CHANGESET_EAGER_STYLE_PATH

NULL_ID

public static final String NULL_ID
The id for the null changeset

See Also:
Constant Field Values

data

protected com.aragost.javahg.ChangesetData data
The actual data for the Changeset


fileData

protected com.aragost.javahg.ChangesetFileData fileData
The actual file data for the Changeset

Constructor Detail

Changeset

public Changeset(Repository repository,
                 String node)
Use Repository.changeset(String) to create Changesets

Parameters:
repository -
Method Detail

readListFromStream

public static List<Changeset> readListFromStream(Repository repository,
                                                 HgInputStream in)
This method is an alias for readListFromStream(Repository, HgInputStream, boolean) with the eager parameter set to false.

Parameters:
repository -
in -
Returns:

readListFromStream

public static List<Changeset> readListFromStream(Repository repository,
                                                 HgInputStream in,
                                                 boolean eager)
Read the rest of the content of the stream and return a List of the Changeset found there.

Be aware the this method will read everything from the stream, what is after the changesets will simply be discarded.

Parameters:
repository -
in -
eager -
Returns:

getNode

public String getNode()

getRevision

public int getRevision()

getUser

public String getUser()

getTimestamp

public DateTime getTimestamp()

getBranch

public String getBranch()

getParent1

public Changeset getParent1()

getParent2

public Changeset getParent2()

getMessage

public String getMessage()

getAddedFiles

public List<String> getAddedFiles()

getModifiedFiles

public List<String> getModifiedFiles()

getDeletedFiles

public List<String> getDeletedFiles()

readPhase

@Deprecated
public Phase readPhase()
Deprecated. 


phase

public Phase phase()
Returns:
the phase for this changeset.

tags

public List<String> tags()
Return tags that is pointing the this changeset


getExtra

public Changeset.Extra getExtra()
Returns:
Mercurial's extra dictionary

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(Changeset that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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