Commits

Sebastian Sdorra  committed b8b68d8

fix not found in revision 00... errors

  • Participants
  • Parent commits 9e75831

Comments (0)

Files changed (3)

File scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBlameCommand.java

 import sonia.scm.repository.Person;
 import sonia.scm.repository.Repository;
 import sonia.scm.repository.RepositoryException;
+import sonia.scm.web.HgUtil;
 
 //~--- JDK imports ------------------------------------------------------------
 
    */
   @Override
   public BlameResult getBlameResult(BlameCommandRequest request)
-          throws IOException, RepositoryException
+    throws IOException, RepositoryException
   {
     if (logger.isDebugEnabled())
     {
 
     AnnotateCommand cmd = AnnotateCommand.on(open());
 
-    if (!Strings.isNullOrEmpty(request.getRevision()))
-    {
-      cmd.rev(request.getRevision());
-    }
+    cmd.rev(HgUtil.getRevision(request.getRevision()));
 
     List<BlameLine> blameLines = Lists.newArrayList();
     List<AnnotateLine> lines = cmd.execute(request.getPath());

File scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgCatCommand.java

 
 import sonia.scm.repository.Repository;
 import sonia.scm.repository.RepositoryException;
+import sonia.scm.web.HgUtil;
 
 //~--- JDK imports ------------------------------------------------------------
 
    */
   @Override
   public void getCatResult(CatCommandRequest request, OutputStream output)
-          throws IOException, RepositoryException
+    throws IOException, RepositoryException
   {
     com.aragost.javahg.commands.CatCommand cmd =
       com.aragost.javahg.commands.CatCommand.on(open());
 
-    if (!Strings.isNullOrEmpty(request.getRevision()))
-    {
-      cmd.rev(request.getRevision());
-    }
+    cmd.rev(HgUtil.getRevision(request.getRevision()));
 
     InputStream input = null;
 

File scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgDiffCommand.java

 
 import sonia.scm.repository.Repository;
 import sonia.scm.repository.RepositoryException;
+import sonia.scm.web.HgUtil;
 
 //~--- JDK imports ------------------------------------------------------------
 
    */
   @Override
   public void getDiffResult(DiffCommandRequest request, OutputStream output)
-          throws IOException, RepositoryException
+    throws IOException, RepositoryException
   {
     com.aragost.javahg.commands.DiffCommand cmd =
       com.aragost.javahg.commands.DiffCommand.on(open());
 
-    if (!Strings.isNullOrEmpty(request.getRevision()))
-    {
-      cmd.change(request.getRevision());
-    }
+    cmd.change(HgUtil.getRevision(request.getRevision()));
 
     String diff = null;