org.apache.maven.scm

Class ScmFileStatus

public final class ScmFileStatus extends Object

Typesafe enum for file status

There are two types of status defined in this class:
1) Status: Changes in the working tree, not yet committed to the repository eg. MODIFIED
2) Transaction: The file is part of some transaction with the repository eg. CHECKED_IN

Version: $Id: ScmFileStatus.java 381352 2006-02-27 15:00:06Z evenisse $

Author: Trygve Laugstøl

Field Summary
static ScmFileStatusADDED
File is added to the working tree and does not yet exist in the repository
static ScmFileStatusCHECKED_IN
File from working tree is checked into the repository
static ScmFileStatusCHECKED_OUT
File is checked out from the repository and into the working tree
static ScmFileStatusCONFLICT
The file in the working tree has differences to the one in repository that conflicts ie. it cannot automatically be merged.
static ScmFileStatusDELETED
File is removed from the working tree thus not revisioned anymore.
The file is still present in the repository.
The file could be deleted from the filesystem depending on the provider.
static ScmFileStatusLOCKED
static ScmFileStatusMODIFIED
The file has been modified in the working tree.
static ScmFileStatusPATCHED
The file in the working tree has been updated with changes from the repository.
static ScmFileStatusTAGGED
The file is part of a tag
static ScmFileStatusUNKNOWN
The file is in the working tree but is not versioned and not ignored either.
static ScmFileStatusUPDATED
The file is added, removed or updated from the repository, thus its up-to-date with the version in the repository.
Method Summary
booleanisDiff()
There are changes in the working tree that are not committed to the repository.
booleanisStatus()
There are changes in the working tree that are not committed to the repository, or
the file is unknown for the working tree.
booleanisTransaction()
booleanisUpdate()
File is part of an update transaction with the repository.
Note: ADDED and REMOVED are not an update status since they indicates that the working tree has changed.
An update indicates the opposite, that the repository was changed compared to the working tree and that it is now synchronized unless there are conflicts.
StringtoString()

Field Detail

ADDED

public static final ScmFileStatus ADDED
File is added to the working tree and does not yet exist in the repository

CHECKED_IN

public static final ScmFileStatus CHECKED_IN
File from working tree is checked into the repository

CHECKED_OUT

public static final ScmFileStatus CHECKED_OUT
File is checked out from the repository and into the working tree

CONFLICT

public static final ScmFileStatus CONFLICT
The file in the working tree has differences to the one in repository that conflicts ie. it cannot automatically be merged.

DELETED

public static final ScmFileStatus DELETED
File is removed from the working tree thus not revisioned anymore.
The file is still present in the repository.
The file could be deleted from the filesystem depending on the provider.

LOCKED

public static final ScmFileStatus LOCKED

MODIFIED

public static final ScmFileStatus MODIFIED
The file has been modified in the working tree.

PATCHED

public static final ScmFileStatus PATCHED
The file in the working tree has been updated with changes from the repository.

TAGGED

public static final ScmFileStatus TAGGED
The file is part of a tag

UNKNOWN

public static final ScmFileStatus UNKNOWN
The file is in the working tree but is not versioned and not ignored either.

UPDATED

public static final ScmFileStatus UPDATED
The file is added, removed or updated from the repository, thus its up-to-date with the version in the repository. See also isUpdate()

Method Detail

isDiff

public boolean isDiff()
There are changes in the working tree that are not committed to the repository.

Returns: true on changes in the working tree

isStatus

public boolean isStatus()
There are changes in the working tree that are not committed to the repository, or
the file is unknown for the working tree.

Returns: true on changes in the working tree or if the file is unknown.

isTransaction

public boolean isTransaction()

Returns: true if the file was part of a transaction with the repository.

isUpdate

public boolean isUpdate()
File is part of an update transaction with the repository.
Note: ADDED and REMOVED are not an update status since they indicates that the working tree has changed.
An update indicates the opposite, that the repository was changed compared to the working tree and that it is now synchronized unless there are conflicts.

toString

public String toString()
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.