mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
implement disable sub repository detection option
This commit is contained in:
@@ -104,6 +104,11 @@ public class HgBrowseCommand extends AbstractCommand implements BrowseCommand
|
||||
cmd.recursive();
|
||||
}
|
||||
|
||||
if (request.isDisableSubRepositoryDetection())
|
||||
{
|
||||
cmd.disableSubRepositoryDetection();
|
||||
}
|
||||
|
||||
BrowserResult result = new BrowserResult();
|
||||
|
||||
result.setFiles(cmd.execute());
|
||||
|
||||
@@ -99,6 +99,19 @@ public class HgFileviewCommand extends AbstractCommand
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public HgFileviewCommand disableSubRepositoryDetection()
|
||||
{
|
||||
cmdAppend("-s");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -145,10 +145,11 @@ def fileview(ui, repo, **opts):
|
||||
path = path[0:-1]
|
||||
transport = opts['transport']
|
||||
collectFiles(revCtx, path, files, directories, opts['recursive'])
|
||||
subRepositories = createSubRepositoryMap(revCtx)
|
||||
for k, v in subRepositories.iteritems():
|
||||
if k.startswith(path):
|
||||
printSubRepository(ui, k, v, transport)
|
||||
if not opts['disableSubRepositoryDetection']:
|
||||
subRepositories = createSubRepositoryMap(revCtx)
|
||||
for k, v in subRepositories.iteritems():
|
||||
if k.startswith(path):
|
||||
printSubRepository(ui, k, v, transport)
|
||||
for d in directories:
|
||||
printDirectory(ui, d, transport)
|
||||
for f in files:
|
||||
@@ -161,6 +162,7 @@ cmdtable = {
|
||||
('p', 'path', '', 'path to print'),
|
||||
('c', 'recursive', False, 'browse repository recursive'),
|
||||
('d', 'disableLastCommit', False, 'disables last commit description and date'),
|
||||
('s', 'disableSubRepositoryDetection', False, 'disables detection of sub repositories'),
|
||||
('t', 'transport', False, 'format the output for command server'),
|
||||
])
|
||||
}
|
||||
Reference in New Issue
Block a user