Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgManifestCommand.java @ 457:d78cb5ca3053
Get rid of ambiguity in method name
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 18 Jun 2012 17:06:42 +0200 |
parents | b3b1db9301a2 |
children | 3ca4ae7bdd38 |
comparison
equal
deleted
inserted
replaced
456:909306e412e2 | 457:d78cb5ca3053 |
---|---|
24 import java.util.LinkedHashMap; | 24 import java.util.LinkedHashMap; |
25 import java.util.LinkedList; | 25 import java.util.LinkedList; |
26 import java.util.List; | 26 import java.util.List; |
27 | 27 |
28 import org.tmatesoft.hg.internal.PathPool; | 28 import org.tmatesoft.hg.internal.PathPool; |
29 import org.tmatesoft.hg.repo.HgInvalidRevisionException; | |
29 import org.tmatesoft.hg.repo.HgManifest; | 30 import org.tmatesoft.hg.repo.HgManifest; |
30 import org.tmatesoft.hg.repo.HgRepository; | 31 import org.tmatesoft.hg.repo.HgRepository; |
31 import org.tmatesoft.hg.repo.HgManifest.Flags; | 32 import org.tmatesoft.hg.repo.HgManifest.Flags; |
32 import org.tmatesoft.hg.repo.HgRuntimeException; | 33 import org.tmatesoft.hg.repo.HgRuntimeException; |
33 import org.tmatesoft.hg.util.CancelSupport; | 34 import org.tmatesoft.hg.util.CancelSupport; |
74 startRev = rev1; | 75 startRev = rev1; |
75 endRev = rev2; | 76 endRev = rev2; |
76 return this; | 77 return this; |
77 } | 78 } |
78 | 79 |
80 /** | |
81 * Select changeset for the command using revision index | |
82 * @param csetRevisionIndex index of changeset revision | |
83 * @return <code>this</code> for convenience. | |
84 */ | |
85 public HgManifestCommand changeset(int csetRevisionIndex) { | |
86 return range(csetRevisionIndex, csetRevisionIndex); | |
87 } | |
88 | |
89 /** | |
90 * Select changeset for the command | |
91 * | |
92 * @param nid changeset revision | |
93 * @return <code>this</code> for convenience | |
94 * @throws HgBadArgumentException if failed to find supplied changeset revision | |
95 */ | |
96 public HgManifestCommand changeset(Nodeid nid) throws HgBadArgumentException { | |
97 // XXX also see HgLogCommand#changeset(Nodeid) | |
98 try { | |
99 final int csetRevIndex = repo.getChangelog().getRevisionIndex(nid); | |
100 return range(csetRevIndex, csetRevIndex); | |
101 } catch (HgInvalidRevisionException ex) { | |
102 throw new HgBadArgumentException("Can't find revision", ex).setRevision(nid); | |
103 } | |
104 } | |
105 | |
106 /** | |
107 * @deprecated confusing whether it's changeset or manifest own revision index in use, use {@link #changeset(int)} instead | |
108 */ | |
109 @Deprecated | |
79 public HgManifestCommand revision(int rev) { | 110 public HgManifestCommand revision(int rev) { |
80 startRev = endRev = rev; | 111 return changeset(rev); |
81 return this; | 112 } |
82 } | |
83 | |
84 // FIXME add changeset(Nodeid), perhaps rename revision(int) to changeset(int), and add changeset(int) to HgLogCommand (and, perhaps, others) | |
85 | 113 |
86 public HgManifestCommand dirs(boolean include) { | 114 public HgManifestCommand dirs(boolean include) { |
87 // XXX whether directories with directories only are include or not | 115 // XXX whether directories with directories only are include or not |
88 // now lists only directories with files | 116 // now lists only directories with files |
89 needDirs = include; | 117 needDirs = include; |