1. Sebastian Sdorra
  2. scm-manager

Commits

Sebastian Sdorra  committed 4462b99

fix missing p2 revision and use shorter property names

  • Participants
  • Parent commits f48d815
  • Branches issue-287

Comments (0)

Files changed (1)

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

View file
  • Ignore whitespace
     "0000000000000000000000000000000000000000";
 
   /** changeset property for parent1 revision */
-  private static final String PROPERTY_PARENT1_REVISION = "hg.parent1.revision";
+  private static final String PROPERTY_PARENT1_REVISION = "hg.p1.rev";
 
   /** changeset property for parent2 revision */
-  private static final String PROPERTY_PARENT2_REVISION = "hg.parent2.revision";
+  private static final String PROPERTY_PARENT2_REVISION = "hg.p2.rev";
 
   /** changeset property for node revision */
-  private static final String PROPERTY_REVISION = "hg.revision";
+  private static final String PROPERTY_REVISION = "hg.rev";
 
   //~--- constructors ---------------------------------------------------------
 
     {
       changeset.getParents().add(p1);
     }
+    
+    in.mustMatch(' ');
 
     String p2 = readId(in, changeset, PROPERTY_PARENT2_REVISION);
 
     {
       Integer rev = in.readDecimal();
 
-      if (rev != null)
+      if (rev != null && rev >= 0)
       {
         changeset.setProperty(propertyKey, String.valueOf(rev));
       }