mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
fix not found in revision 00... errors
This commit is contained in:
@@ -50,6 +50,7 @@ import sonia.scm.repository.BlameResult;
|
|||||||
import sonia.scm.repository.Person;
|
import sonia.scm.repository.Person;
|
||||||
import sonia.scm.repository.Repository;
|
import sonia.scm.repository.Repository;
|
||||||
import sonia.scm.repository.RepositoryException;
|
import sonia.scm.repository.RepositoryException;
|
||||||
|
import sonia.scm.web.HgUtil;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ public class HgBlameCommand extends AbstractCommand implements BlameCommand
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BlameResult getBlameResult(BlameCommandRequest request)
|
public BlameResult getBlameResult(BlameCommandRequest request)
|
||||||
throws IOException, RepositoryException
|
throws IOException, RepositoryException
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
@@ -108,10 +109,7 @@ public class HgBlameCommand extends AbstractCommand implements BlameCommand
|
|||||||
|
|
||||||
AnnotateCommand cmd = AnnotateCommand.on(open());
|
AnnotateCommand cmd = AnnotateCommand.on(open());
|
||||||
|
|
||||||
if (!Strings.isNullOrEmpty(request.getRevision()))
|
cmd.rev(HgUtil.getRevision(request.getRevision()));
|
||||||
{
|
|
||||||
cmd.rev(request.getRevision());
|
|
||||||
}
|
|
||||||
|
|
||||||
List<BlameLine> blameLines = Lists.newArrayList();
|
List<BlameLine> blameLines = Lists.newArrayList();
|
||||||
List<AnnotateLine> lines = cmd.execute(request.getPath());
|
List<AnnotateLine> lines = cmd.execute(request.getPath());
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import com.google.common.io.Closeables;
|
|||||||
|
|
||||||
import sonia.scm.repository.Repository;
|
import sonia.scm.repository.Repository;
|
||||||
import sonia.scm.repository.RepositoryException;
|
import sonia.scm.repository.RepositoryException;
|
||||||
|
import sonia.scm.web.HgUtil;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
@@ -81,15 +82,12 @@ public class HgCatCommand extends AbstractCommand implements CatCommand
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void getCatResult(CatCommandRequest request, OutputStream output)
|
public void getCatResult(CatCommandRequest request, OutputStream output)
|
||||||
throws IOException, RepositoryException
|
throws IOException, RepositoryException
|
||||||
{
|
{
|
||||||
com.aragost.javahg.commands.CatCommand cmd =
|
com.aragost.javahg.commands.CatCommand cmd =
|
||||||
com.aragost.javahg.commands.CatCommand.on(open());
|
com.aragost.javahg.commands.CatCommand.on(open());
|
||||||
|
|
||||||
if (!Strings.isNullOrEmpty(request.getRevision()))
|
cmd.rev(HgUtil.getRevision(request.getRevision()));
|
||||||
{
|
|
||||||
cmd.rev(request.getRevision());
|
|
||||||
}
|
|
||||||
|
|
||||||
InputStream input = null;
|
InputStream input = null;
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.google.common.base.Strings;
|
|||||||
|
|
||||||
import sonia.scm.repository.Repository;
|
import sonia.scm.repository.Repository;
|
||||||
import sonia.scm.repository.RepositoryException;
|
import sonia.scm.repository.RepositoryException;
|
||||||
|
import sonia.scm.web.HgUtil;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
@@ -78,15 +79,12 @@ public class HgDiffCommand extends AbstractCommand implements DiffCommand
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void getDiffResult(DiffCommandRequest request, OutputStream output)
|
public void getDiffResult(DiffCommandRequest request, OutputStream output)
|
||||||
throws IOException, RepositoryException
|
throws IOException, RepositoryException
|
||||||
{
|
{
|
||||||
com.aragost.javahg.commands.DiffCommand cmd =
|
com.aragost.javahg.commands.DiffCommand cmd =
|
||||||
com.aragost.javahg.commands.DiffCommand.on(open());
|
com.aragost.javahg.commands.DiffCommand.on(open());
|
||||||
|
|
||||||
if (!Strings.isNullOrEmpty(request.getRevision()))
|
cmd.change(HgUtil.getRevision(request.getRevision()));
|
||||||
{
|
|
||||||
cmd.change(request.getRevision());
|
|
||||||
}
|
|
||||||
|
|
||||||
String diff = null;
|
String diff = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user