mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Fixed a bug causing problems with rev numbers > 999
This commit is contained in:
@@ -4,8 +4,6 @@ import sonia.scm.repository.Modifications;
|
|||||||
import sonia.scm.repository.Repository;
|
import sonia.scm.repository.Repository;
|
||||||
import sonia.scm.repository.spi.javahg.HgLogChangesetCommand;
|
import sonia.scm.repository.spi.javahg.HgLogChangesetCommand;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
|
|
||||||
public class HgModificationsCommand extends AbstractCommand implements ModificationsCommand {
|
public class HgModificationsCommand extends AbstractCommand implements ModificationsCommand {
|
||||||
|
|
||||||
HgModificationsCommand(HgCommandContext context, Repository repository) {
|
HgModificationsCommand(HgCommandContext context, Repository repository) {
|
||||||
@@ -17,8 +15,7 @@ public class HgModificationsCommand extends AbstractCommand implements Modificat
|
|||||||
public Modifications getModifications(String revision) {
|
public Modifications getModifications(String revision) {
|
||||||
com.aragost.javahg.Repository repository = open();
|
com.aragost.javahg.Repository repository = open();
|
||||||
HgLogChangesetCommand hgLogChangesetCommand = HgLogChangesetCommand.on(repository, getContext().getConfig());
|
HgLogChangesetCommand hgLogChangesetCommand = HgLogChangesetCommand.on(repository, getContext().getConfig());
|
||||||
int hgRevision = hgLogChangesetCommand.rev(revision).singleRevision();
|
Modifications modifications = hgLogChangesetCommand.rev(revision).extractModifications();
|
||||||
Modifications modifications = hgLogChangesetCommand.rev(MessageFormat.format("{0}:{0}", hgRevision)).extractModifications();
|
|
||||||
modifications.setRevision(revision);
|
modifications.setRevision(revision);
|
||||||
return modifications;
|
return modifications;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user