added option to disable sub repository detection of browse command

This commit is contained in:
Sebastian Sdorra
2013-01-20 11:17:31 +01:00
parent d34ce7b0c9
commit 81d78b6fa8
2 changed files with 55 additions and 2 deletions

View File

@@ -255,6 +255,25 @@ public final class BrowseCommandBuilder
return this; return this;
} }
/**
* Enable or disable the detection of sub repositories.
*
*
* @param disableSubRepositoryDetection true to disable sub repository detection.
*
* @return {@code this}
*
* @since 1.26
*/
public BrowseCommandBuilder setDisableSubRepositoryDetection(
boolean disableSubRepositoryDetection)
{
this.request.setDisableSubRepositoryDetection(
disableSubRepositoryDetection);
return this;
}
/** /**
* Retrieve only files which are children of the given path. * Retrieve only files which are children of the given path.
* This path have to be a directory. * This path have to be a directory.

View File

@@ -99,7 +99,9 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
final BrowseCommandRequest other = (BrowseCommandRequest) obj; final BrowseCommandRequest other = (BrowseCommandRequest) obj;
return super.equals(obj) && Objects.equal(recursive, other.recursive) return super.equals(obj) && Objects.equal(recursive, other.recursive)
&& Objects.equal(disableLastCommit, other.disableLastCommit); && Objects.equal(disableLastCommit, other.disableLastCommit)
&& Objects.equal(disableSubRepositoryDetection,
other.disableSubRepositoryDetection);
} }
/** /**
@@ -111,7 +113,8 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
@Override @Override
public int hashCode() public int hashCode()
{ {
return Objects.hashCode(super.hashCode(), recursive, disableLastCommit); return Objects.hashCode(super.hashCode(), recursive, disableLastCommit,
disableSubRepositoryDetection);
} }
/** /**
@@ -129,6 +132,7 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
.add("revision", getRevision()) .add("revision", getRevision())
.add("recursive", recursive) .add("recursive", recursive)
.add("disableLastCommit", disableLastCommit) .add("disableLastCommit", disableLastCommit)
.add("disableSubRepositoryDetection", disableSubRepositoryDetection)
.toString(); .toString();
//J+ //J+
} }
@@ -148,6 +152,20 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
this.disableLastCommit = disableLastCommit; this.disableLastCommit = disableLastCommit;
} }
/**
* Enable or Disable sub repository detection. Default is enabled.
*
*
* @param disableSubRepositoryDetection true to disable sub repository detection
*
* @since 1.26
*/
public void setDisableSubRepositoryDetection(
boolean disableSubRepositoryDetection)
{
this.disableSubRepositoryDetection = disableSubRepositoryDetection;
}
/** /**
* True to enable recursive file object browsing. * True to enable recursive file object browsing.
* *
@@ -176,6 +194,19 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
return disableLastCommit; return disableLastCommit;
} }
/**
* Returns true if the detection of sub repositories is disabled.
*
*
* @return true if sub repository detection is disabled.
*
* @since 1.26
*/
boolean isDisableSubRepositoryDetection()
{
return disableSubRepositoryDetection;
}
/** /**
* Returns true if recursive file object browsing is enabled. * Returns true if recursive file object browsing is enabled.
* *
@@ -194,6 +225,9 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
/** disable last commit */ /** disable last commit */
private boolean disableLastCommit = false; private boolean disableLastCommit = false;
/** disable detection of sub repositories */
private boolean disableSubRepositoryDetection = false;
/** browse file objects recursive */ /** browse file objects recursive */
private boolean recursive = false; private boolean recursive = false;
} }