@Deprecated public interface

HistoryService

implements CommonHistoryService
com.atlassian.stash.history.HistoryService

This interface is deprecated.
in 2.11 for removal in 3.0. Use CommitService, which more accurately reflects the purpose of this service.

Summary

Public Methods
@Deprecated @Nonnull Page<Change> getChanges(Repository repository, String untilId, String sinceId, PageRequest pageRequest)
This method is deprecated. in 2.10 for removal in 3.0. Use getChanges(ChangesRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated @Nonnull Page<Changeset> getChangesetsBetween(Repository repository, Collection<String> excludeIds, Collection<String> includeIds, Collection<String> paths, Collection<String> attributesToLoad, PageRequest pageRequest)
This method is deprecated. in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated @Nonnull Page<Changeset> getChangesetsBetween(Repository repository, String sinceId, String untilId, Collection<String> attributesToLoad, PageRequest pageRequest)
This method is deprecated. in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated @Nonnull Page<Changeset> getChangesetsBetween(Repository repository, String sinceId, String untilId, PageRequest pageRequest)
This method is deprecated. in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated @Nonnull Page<Changeset> getChangesetsBetween(Repository repository, String sinceId, String untilId, String path, PageRequest pageRequest)
This method is deprecated. in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated @Nonnull Page<Changeset> getChangesetsBetween(Repository repository, String sinceId, String untilId, String path, Collection<String> attributesToLoad, PageRequest pageRequest)
This method is deprecated. in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated @Nonnull Page<DetailedChangeset> getDetailedChangesets(Repository repository, Collection<String> changesetIds, int maxChangesPerChangeset, PageRequest pageRequest)
This method is deprecated. in 2.4 for removal in 3.0. Use getDetailedChangesets(DetailedChangesetsRequest, PageRequest) instead; it is more flexible and more readily evolved
@Deprecated void streamChangesetsBetween(Repository repository, String sinceId, String untilId, String path, ChangesetCallback callback)
This method is deprecated. in 2.4 for removal in 3.0. Use streamChangesetsBetween(ChangesetsBetweenRequest, ChangesetCallback) instead; it is more flexible and more readily evolved
[Expand]
Inherited Methods
From interface com.atlassian.stash.history.CommonHistoryService

Public Methods

@Deprecated @Nonnull public Page<Change> getChanges (Repository repository, String untilId, String sinceId, PageRequest pageRequest)

This method is deprecated.
in 2.10 for removal in 3.0. Use getChanges(ChangesRequest, PageRequest) instead; it is more flexible and more readily evolved

Retrieves a page of changes between sinceId (exclusively) and untilId (inclusively).

Parameters
repository the repository to find the changes in
untilId a changeset, branch or tag in the repository potentially containing changes which are not present in sinceId
sinceId a changeset, branch or tag in the repository
pageRequest the start and limit for the page being requested
Returns
  • a page of changes within the repository between the specified IDs

@Deprecated @Nonnull public Page<Changeset> getChangesetsBetween (Repository repository, Collection<String> excludeIds, Collection<String> includeIds, Collection<String> paths, Collection<String> attributesToLoad, PageRequest pageRequest)

This method is deprecated.
in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved

Retrieves a page of changesets between includeIds and excludeIds. The changesets that are returned represent those which are reachable from the changesets, branches or tags referenced by the includeIds but not reachable from the changesets, branches or tags referenced by excludeIds. Paths may be provided to further narrow the results, restricting the returned changesets to only those which affect those paths.

This method is useful over the other variants for situations that may include potential merges with changesets that are not relevant. Consider the following:

 ---- A ------ B ------ C
       \                 \
        \                 \
        FA1 ---- FA2 ---- FA3
 
When excluding A and C and including FA3, FA1, FA2 and FA3 are returned. By only excluding A then B and C are also returned. The latter is the same as specifying sinceId as A and untilId as FA3, but the former is not possible without providing multiple excludeIds.

Parameters
repository the repository to retrieve changesets from
excludeIds a collection of changesets, branches or tags in the repository
includeIds a collection of changesets, branches or tags in the repository potentially containing changesets which are not present in excludeIds
paths a collection of paths, used to restrict the returned changesets to only those which affect those paths--may be a file or a directory path
pageRequest the start and limit for the page being requested
Returns
  • a page containing 0 or more changesets reachable from untilId but not from sinceId

@Deprecated @Nonnull public Page<Changeset> getChangesetsBetween (Repository repository, String sinceId, String untilId, Collection<String> attributesToLoad, PageRequest pageRequest)

This method is deprecated.
in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved

Parameters
repository the repository to retrieve changesets from
sinceId a changeset, branch or tag in the repository
untilId a changeset, branch or tag in the repository potentially containing changesets which are not present in sinceId
attributesToLoad a set containing 0 or more changeset attributes, such as JIRA keys, to load
pageRequest the start and limit for the page being requested
Returns
  • a page containing 0 or more changesets reachable from untilId but not from sinceId

@Deprecated @Nonnull public Page<Changeset> getChangesetsBetween (Repository repository, String sinceId, String untilId, PageRequest pageRequest)

This method is deprecated.
in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved

Retrieves a page of changesets between untilId and sinceId. The changesets that are returned represent those which are reachable from the changeset, branch or tag referenced by untilId but not reachable from the changeset, branch or tag referenced by sinceId. While this may imply an ancestral relationship between the two IDs, that is not strictly required. When the two IDs are unrelated, all changesets referenceable from untilId are candidates for the returned page, and the sinceId is effectively ignored.

The order of sinceId and untilId is important here. Consider the following example:

  1. Branch "feature-A" was created from "master" when "master" was at changeset A
  2. Changesets FA1, FA2 and FA3 were created on the "feature-A" branch
  3. Changesets B and C were made on "master" after the branch was created
The graph would look like this:
 ---- A ---- B ---- C
       \
        \
        FA1 ---- FA2 ---- FA3
 
If sinceId is "master" and untilId is "feature-A", changesets FA1, FA2 and FA3 will be returned, because they are reachable from "feature-A" but not from "master". If the two IDs were reversed, changesets B and C would be returned, because they are reachable from "master" but not from "feature-A". This approach can be used to determine how two branches have diverged over time.

Parameters
repository the repository to retrieve changesets from
sinceId a changeset, branch or tag in the repository
untilId a changeset, branch or tag in the repository potentially containing changesets which are not present in sinceId
pageRequest the start and limit for the page being requested
Returns
  • a page containing 0 or more changesets reachable from untilId but not from sinceId

@Deprecated @Nonnull public Page<Changeset> getChangesetsBetween (Repository repository, String sinceId, String untilId, String path, PageRequest pageRequest)

This method is deprecated.
in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved

Retrieves a page of changesets between untilId and sinceId. The changesets that are returned represent those which are reachable from the changeset, branch or tag referenced by untilId but not reachable from the changeset, branch or tag referenced by sinceId. While this may imply an ancestral relationship between the two IDs, that is not strictly required. When the two IDs are unrelated, all changesets referenceable from untilId are candidates for the returned page, and the sinceId is effectively ignored. A path may be provided to further narrow the results, restricting the returned changesets to only those which affect that path.

The order of sinceId and untilId is important here. Consider the following example:

  1. Branch "feature-A" was created from "master" when "master" was at changeset A
  2. Changesets FA1, FA2 and FA3 were created on the "feature-A" branch
  3. Changesets B and C were made on "master" after the branch was created
The graph would look like this:
 ---- A ---- B ---- C
       \
        \
        FA1 ---- FA2 ---- FA3
 
If sinceId is "master" and untilId is "feature-A", changesets FA1, FA2 and FA3 will be returned, because they are reachable from "feature-A" but not from "master". If the two IDs were reversed, changesets B and C would be returned, because they are reachable from "master" but not from "feature-A". This approach can be used to determine how two branches have diverged over time.

Parameters
repository the repository to retrieve changesets from
sinceId a changeset, branch or tag in the repository
untilId a changeset, branch or tag in the repository potentially containing changesets which are not present in sinceId
path an optional path, used to restrict the returned changesets to only those which affect that path--may be a file or a directory path
pageRequest the start and limit for the page being requested
Returns
  • a page containing 0 or more changesets reachable from untilId but not from sinceId

@Deprecated @Nonnull public Page<Changeset> getChangesetsBetween (Repository repository, String sinceId, String untilId, String path, Collection<String> attributesToLoad, PageRequest pageRequest)

This method is deprecated.
in 2.4 for removal in 3.0. Use getChangesetsBetween(ChangesetsBetweenRequest, PageRequest) instead; it is more flexible and more readily evolved

Parameters
repository the repository to retrieve changesets from
sinceId a changeset, branch or tag in the repository
untilId a changeset, branch or tag in the repository potentially containing changesets which are not present in sinceId
path an optional path, used to restrict the returned changesets to only those which affect that path--may be a file or a directory path
attributesToLoad a set containing 0 or more changeset attributes, such as JIRA keys, to load
pageRequest the start and limit for the page being requested
Returns
  • a page containing 0 or more changesets reachable from untilId but not from sinceId

@Deprecated @Nonnull public Page<DetailedChangeset> getDetailedChangesets (Repository repository, Collection<String> changesetIds, int maxChangesPerChangeset, PageRequest pageRequest)

This method is deprecated.
in 2.4 for removal in 3.0. Use getDetailedChangesets(DetailedChangesetsRequest, PageRequest) instead; it is more flexible and more readily evolved

Retrieves each of the changesets in changesetIds and returns their details, including the first page of changes between the changeset in question and its first parent.

If the page size is less than the size of the collection of IDs, a subset of the collection will be returned. Otherwise, detailed changesets for all IDs in the requested collection are returned.

Parameters
repository the repository to find the changesets in
changesetIds a collection containing one or more changeset IDs for retrieval
maxChangesPerChangeset the maximum number of changes to return for each DetailedChangeset
pageRequest the start and limit of the page being request
Returns
  • a page containing detailed changesets for a subset of the requested IDs
Throws
NoSuchChangesetException if any given changeset cannot be found.

@Deprecated public void streamChangesetsBetween (Repository repository, String sinceId, String untilId, String path, ChangesetCallback callback)

This method is deprecated.
in 2.4 for removal in 3.0. Use streamChangesetsBetween(ChangesetsBetweenRequest, ChangesetCallback) instead; it is more flexible and more readily evolved

Streams changesets between untilId and sinceId in repository repository. See getChangesetsBetween(...) for a description of the semantics of the changesets returned.

A path may be provided to further narrow the results, restricting the returned changesets to only those which affect that path.

This method promises to call onStart() on the supplied callback once followed by zero or more calls to onChangeset(Changeset), one for each changeset to be streamed (until false is returned by onChangeset(...) or there are no more changesets), followed by a single call to onEnd().

Parameters
repository the repository to retrieve changesets from
sinceId a changeset, branch or tag in the repository
untilId a changeset, branch or tag in the repository potentially containing changesets which are not present in sinceId
path an optional path, used to restrict the returned changesets to only those which affect that path--may be a file or a directory path
callback the callback for receiving the changesets