Fix for truncated HGChangesetId at push parsing errors - fixes HGStXTests>>tests_commit_05b for Mercurial 5.8
--- a/mercurial/HGCommandParser.st Fri Jul 09 06:47:09 2021 +0100
+++ b/mercurial/HGCommandParser.st Tue Jul 13 15:09:57 2021 +0200
@@ -1,6 +1,7 @@
"
stx:libscm - a new source code management library for Smalltalk/X
Copyright (C) 2012-2015 Jan Vrany
+Copyright (C) 2021 svestkap
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -33,6 +34,7 @@
"
stx:libscm - a new source code management library for Smalltalk/X
Copyright (C) 2012-2015 Jan Vrany
+Copyright (C) 2021 svestkap
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -1309,7 +1311,7 @@
(msg startsWith: 'push creates new remote head ') ifTrue:[
| newHeadId err |
- newHeadId := HGChangesetId fromString: (msg copyFrom: 30 to: msg size -1).
+ newHeadId := HGChangesetId fromString: (msg copyFrom: 30) withoutTrailingSeparators.
err := HGPushWouldCreateNewHeadError newException
parameter: newHeadId;
messageText: msg;
@@ -1323,6 +1325,7 @@
"Created: / 04-02-2013 / 12:49:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 26-03-2014 / 15:39:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-07-2021 / 10:24:39 / svestkap"
! !
!HGCommandParser methodsFor:'parsing - errors - private'!