comparison src/org/tmatesoft/hg/core/HgChangeset.java @ 148:1a7a9a20e1f9

Exceptions, javadoc. Initial cancel and progress support
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 23 Feb 2011 22:36:28 +0100
parents 37a34044e6bd
children ba2bf656f00f
comparison
equal deleted inserted replaced
147:a05145db4d0c 148:1a7a9a20e1f9
155 statusHelper.change(revNumber, r); 155 statusHelper.change(revNumber, r);
156 final HgRepository repo = statusHelper.getRepo(); 156 final HgRepository repo = statusHelper.getRepo();
157 for (Path s : r.getModified()) { 157 for (Path s : r.getModified()) {
158 Nodeid nid = r.nodeidAfterChange(s); 158 Nodeid nid = r.nodeidAfterChange(s);
159 if (nid == null) { 159 if (nid == null) {
160 throw new IllegalArgumentException(); 160 throw new HgBadStateException();
161 } 161 }
162 modified.add(new FileRevision(repo, nid, s)); 162 modified.add(new FileRevision(repo, nid, s));
163 } 163 }
164 for (Path s : r.getAdded()) { 164 for (Path s : r.getAdded()) {
165 Nodeid nid = r.nodeidAfterChange(s); 165 Nodeid nid = r.nodeidAfterChange(s);
166 if (nid == null) { 166 if (nid == null) {
167 throw new IllegalArgumentException(); 167 throw new HgBadStateException();
168 } 168 }
169 added.add(new FileRevision(repo, nid, s)); 169 added.add(new FileRevision(repo, nid, s));
170 } 170 }
171 for (Path s : r.getRemoved()) { 171 for (Path s : r.getRemoved()) {
172 // with Path from getRemoved, may just copy 172 // with Path from getRemoved, may just copy