Class VcsWorkingCopy


  • public class VcsWorkingCopy
    extends Object
    A state of a working copy. Plugin implementors can extend this object to add data specific to a repository type.
    Since:
    5.14
    • Constructor Detail

      • VcsWorkingCopy

        @Deprecated
        public VcsWorkingCopy​(long repositoryId,
                              File path,
                              String currentRevisionKey)
        Deprecated.
        since 5.8 as it doesn't set current branch and configured branch
      • VcsWorkingCopy

        public VcsWorkingCopy​(long repositoryId,
                              File path,
                              String currentRevisionKey,
                              VcsBranch currentBranch,
                              boolean currentBranchChanged)
      • VcsWorkingCopy

        @Deprecated
        public VcsWorkingCopy​(long repositoryId,
                              File path,
                              String currentRevisionKey,
                              boolean hasNotCommittedChanges)
        Deprecated.
        since 5.8 as it doesn't set current branch
      • VcsWorkingCopy

        public VcsWorkingCopy​(long repositoryId,
                              File path,
                              String currentRevisionKey,
                              boolean hasNotCommittedChanges,
                              VcsBranch currentBranch,
                              boolean currentBranchChanged)
    • Method Detail

      • getPath

        public File getPath()
      • getRepositoryId

        public long getRepositoryId()
      • getCurrentRevisionKey

        public String getCurrentRevisionKey()
      • getCurrentBranch

        @Nullable
        public @Nullable VcsBranch getCurrentBranch()
        Return branch the working copy is switched to. If null value is returned, the current branch is the same as in repository configuration. This method must not return empty value if isCurrentBranchChanged() return true.
      • isCurrentBranchChanged

        public boolean isCurrentBranchChanged()
      • hasNotCommittedChanges

        public boolean hasNotCommittedChanges()