Commits

John Peberdy committed ddca8fb

Fix incorrect parsing of changeset phase - debug flag was inserting extra output.
https://bitbucket.org/mercurialeclipse/main/issue/363/deadlock-in-properties-view-showing

  • Participants
  • Parent commits bae889e

Comments (0)

Files changed (1)

File src/main/java/com/aragost/javahg/Repository.java

         Map<Changeset, Phase> result = Maps.newHashMap();
         try {
             while (!stream.isEof()) {
-                String node = stream.textUpTo(' ');
+            	// $ hg log --debug --template "{node} {phase}" --rev 5b80e11a7c32121b5fd926b06056bb773eff050f
+            	// removing unknown node dd8c766936b9 from 1-phase boundary
+            	// 5b80e11a7c32121b5fd926b06056bb773eff050f draft
+            	// Observed with at least Mercurial Distributed SCM (version 2.3+10-9d9d15928521)
+            	String node = stream.textUpTo(' ');
+
+            	while ("removing".equals(node) && stream.find('\n')) {
+            		node = stream.textUpTo(' ');
+            	}
+            	
                 String phaseName = stream.textUpTo('\0');
                 Phase phase = Phase.fromText(phaseName);
                 result.put(changeset(node), phase);