Interface Change
- All Superinterfaces:
PropertySupport
commit
.-
Method Summary
Modifier and TypeMethodDescriptionRetrieves conflict information, if any, related to this change.An identifier for the content which was changed.The executable permission for the file after thechange
.An identifier from which the content was changed.getPath()
The path to the changed content.int
The percentage of content that matches before and after a change.The executable permission for the file before thechange
.The path at which the changed content originated.getType()
The type of change that was applied.Methods inherited from interface com.atlassian.bitbucket.property.PropertySupport
getProperties
-
Method Details
-
getConflict
Retrieves conflict information, if any, related to this change.When
streaming changes
for apull request
, it is possible for some changes to be decorated with conflict information. Other sources of change information, such as theCommitService
, will never include conflicts on any of the changes they return.When conflict information is present, the
conflicting changes
describe the changes that were made on each side of the merge. Details provided with this change will not be accurate when conflict information is present. Instead, this change will describe the way the conflict was handled by the system to allow the merge to be committed.- Returns:
- conflict information related to this change, or
null
if there is no conflict
-
getContentId
An identifier for the content which was changed.For
deletions
, the returned content ID is for the content prior to deletion, since there is no identifier available afterward. For all othertypes
, the identifier is for the content after the change.Some SCM implementations, such as Mercurial, do not provide content IDs. When working with repositories for such SCMs, this value will be
null
.- Returns:
- a content identifier
-
getExecutable
The executable permission for the file after thechange
.If the file was
deleted
this value will benull
, since a deleted file is neither executable nor non-executable. Otherwise, it will betrue
orfalse
according to the permissions on the file.- Returns:
true
orfalse
for any change other than adeletion
;null
for deleted files
-
getFromContentId
An identifier from which the content was changed. Some SCM implementations, such as Mercurial, do not provide content IDs. When working with repositories for such SCMs, this value will benull
.- Returns:
- a content identifier
-
getNodeType
The type of the file node, which is most likely to be afile
or possibly asubmodule
. Adirectory
type is never returned as they are transient and can be recreated from thepath
.- Returns:
- the node type
-
getPath
The path to the changed content.- Returns:
- the changed path
-
getPercentUnchanged
int getPercentUnchanged()The percentage of content that matches before and after a change. This is useful, for example, in determining the likelihood that an identifiedcopy
ormove
is correct.Note: This feature may not be supported by all SCM implementations. Where it is not supported, it will always return
-1
.- Returns:
- a percentage, if the change is scored, or
-1
if it is not
-
getSrcExecutable
The executable permission for the file before thechange
.If the file was
created
this value will benull
, since the file was neither executable nor non-executable before it was created. Otherwise, it will betrue
orfalse
according to the permissions on the file.- Returns:
true
orfalse
for any change other than acreation
;null
for newly-created files
-
getSrcPath
The path at which the changed content originated.- Returns:
- the originating path, if any
-
getType
The type of change that was applied.- Returns:
- the change type
-