Mercurial > jhg
comparison src/org/tmatesoft/hg/core/Cset.java @ 87:25f2e5d1cd8b
Fix IAE when changeset has no files listed (merged revision)
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 26 Jan 2011 01:07:26 +0100 |
parents | 6f1b88693d48 |
children | d55d4eedfc57 |
comparison
equal
deleted
inserted
replaced
86:ee4458416579 | 87:25f2e5d1cd8b |
---|---|
83 public Nodeid getManifestRevision() { | 83 public Nodeid getManifestRevision() { |
84 return changeset.manifest(); | 84 return changeset.manifest(); |
85 } | 85 } |
86 | 86 |
87 public List<Path> getAffectedFiles() { | 87 public List<Path> getAffectedFiles() { |
88 // reports files as recorded in changelog. Note, merge revisions may have no | |
89 // files listed, and thus this method would return empty list, while | |
90 // #getModifiedFiles() would return list with merged file(s) (because it uses status to get 'em, not | |
91 // what #files() gives). | |
88 ArrayList<Path> rv = new ArrayList<Path>(changeset.files().size()); | 92 ArrayList<Path> rv = new ArrayList<Path>(changeset.files().size()); |
89 for (String name : changeset.files()) { | 93 for (String name : changeset.files()) { |
90 rv.add(pathHelper.path(name)); | 94 rv.add(pathHelper.path(name)); |
91 } | 95 } |
92 return rv; | 96 return rv; |