public interface Change extends PropertySupport
commit
.Modifier and Type | Method and Description |
---|---|
Conflict |
getConflict()
Retrieves conflict information, if any, related to this change.
|
String |
getContentId()
An identifier for the content which was changed.
|
Boolean |
getExecutable()
The executable permission for the file after the
change . |
String |
getFromContentId()
An identifier from which the content was changed.
|
ContentTreeNode.Type |
getNodeType()
|
Path |
getPath()
The path to the changed content.
|
int |
getPercentUnchanged()
The percentage of content that matches before and after a change.
|
Boolean |
getSrcExecutable()
The executable permission for the file before the
change . |
Path |
getSrcPath()
The path at which the changed content originated.
|
ChangeType |
getType()
The type of change that was applied.
|
getProperties
@Nullable Conflict getConflict()
When streaming changes
for a
pull request
, it is possible for some changes to be decorated with
conflict information. Other sources of change information, such as the
CommitService
, 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.
null
if there is no conflict@Nullable String getContentId()
For deletions
, the returned content ID is for the content prior to deletion, since
there is no identifier available afterward. For all other types
, 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
.
@Nullable Boolean getExecutable()
change
.
If the file was deleted
this value will be null
, since a deleted file is
neither executable nor non-executable. Otherwise, it will be true
or false
according to the
permissions on the file.
true
or false
for any change other than a deletion
;
null
for deleted files@Nullable String getFromContentId()
null
.@Nonnull ContentTreeNode.Type getNodeType()
file
or possibly a
submodule
. A directory
type
is never returned as they are transient and can be recreated from the path
.int getPercentUnchanged()
copy
or move
is correct.
Note: This feature may not be supported by all SCM implementations. Where it is not supported, it will always
return -1
.
-1
if it is not@Nullable Boolean getSrcExecutable()
change
.
If the file was created
this value will be null
, since the file was neither
executable nor non-executable before it was created. Otherwise, it will be true
or false
according to the permissions on the file.
true
or false
for any change other than a creation
;
null
for newly-created files@Nullable Path getSrcPath()
@Nonnull ChangeType getType()
Copyright © 2022 Atlassian. All rights reserved.