Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgDiffCommand.java @ 683:98ff1fb49abe
Update commands to use changeset Nodeid and int in uniform way, clients of core.* classes shall not go back and forth from int to Nodeid
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 24 Jul 2013 16:40:15 +0200 |
parents | a20121a2bba6 |
children | 7839ff0bfd78 |
comparison
equal
deleted
inserted
replaced
682:f568330dd9c0 | 683:98ff1fb49abe |
---|---|
92 clogRevIndexEnd.set(changelogRevIndexEnd); | 92 clogRevIndexEnd.set(changelogRevIndexEnd); |
93 return this; | 93 return this; |
94 } | 94 } |
95 | 95 |
96 /** | 96 /** |
97 * Select range of file history, limited by changesets. | |
98 * @see #range(int, int) | |
99 * @param cset1 changelog revision, left range boundary | |
100 * @param cset2 changelog revision, right range boundary | |
101 * @return <code>this</code> for convenience | |
102 * @throws HgBadArgumentException if revisions are not valid changeset identifiers | |
103 */ | |
104 public HgDiffCommand range(Nodeid cset1, Nodeid cset2) throws HgBadArgumentException { | |
105 clogRevIndexStart.set(cset1); | |
106 clogRevIndexEnd.set(cset2); | |
107 return this; | |
108 } | |
109 | |
110 /** | |
97 * Selects revision for {@link #executeParentsAnnotate(HgBlameInspector)}, the one | 111 * Selects revision for {@link #executeParentsAnnotate(HgBlameInspector)}, the one |
98 * to diff against its parents. | 112 * to diff against its parents. |
99 * | 113 * |
100 * Besides, it is handy when range of interest spans up to the very beginning of the file history | 114 * Besides, it is handy when range of interest spans up to the very beginning of the file history |
101 * (and thus is equivalent to <code>range(0, changelogRevIndex)</code>) | 115 * (and thus is equivalent to <code>range(0, changelogRevIndex)</code>) |
107 public HgDiffCommand changeset(int changelogRevIndex) throws HgBadArgumentException { | 121 public HgDiffCommand changeset(int changelogRevIndex) throws HgBadArgumentException { |
108 clogRevIndexStart.set(0); | 122 clogRevIndexStart.set(0); |
109 clogRevIndexEnd.set(changelogRevIndex); | 123 clogRevIndexEnd.set(changelogRevIndex); |
110 return this; | 124 return this; |
111 } | 125 } |
126 | |
127 /** | |
128 * Select specific changeset or a range [0..changeset], like {@link #changeset(int)} | |
129 * | |
130 * @param nid changeset | |
131 * @return <code>this</code> for convenience | |
132 * @throws HgBadArgumentException if failed to find supplied changeset revision | |
133 */ | |
134 public HgDiffCommand changeset(Nodeid nid) throws HgBadArgumentException { | |
135 clogRevIndexStart.set(0); | |
136 clogRevIndexEnd.set(nid); | |
137 return this; | |
138 } | |
139 | |
112 | 140 |
113 /** | 141 /** |
114 * Revision differences are reported in selected order when | 142 * Revision differences are reported in selected order when |
115 * annotating {@link #range(int, int) range} of changesets with | 143 * annotating {@link #range(int, int) range} of changesets with |
116 * {@link #executeAnnotate(HgBlameInspector)}. | 144 * {@link #executeAnnotate(HgBlameInspector)}. |