Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/vcs/interfaces/ibasicversioncontrol.h
Context not available. | |||||
186 | const QList<QUrl>& localLocations, | 186 | const QList<QUrl>& localLocations, | ||
---|---|---|---|---|---|
187 | RecursionMode recursion = IBasicVersionControl::Recursive ) = 0; | 187 | RecursionMode recursion = IBasicVersionControl::Recursive ) = 0; | ||
188 | 188 | | |||
189 | /** | ||||
190 | * change the number of lines of context the patch generated by diff() should show | ||||
191 | * | ||||
192 | * May not be supported by all VCS plugins. | ||||
193 | * @param contextLines The number of context lines included before and after each | ||||
194 | * hunk in a unified diff. Special values are -1 for the VCS default (usually 3) | ||||
195 | * and 0 for the largest possible value (intended to include the whole file as context). | ||||
196 | */ | ||||
197 | virtual void setDiffContextLines(int contextLines) { m_contextLines = contextLines == 0 ? INT_MAX : contextLines; } | ||||
198 | | ||||
189 | /** | 199 | /** | ||
190 | * Retrieves a diff between two revisions of a file | 200 | * Retrieves a diff between two revisions of a file | ||
191 | * | 201 | * | ||
192 | * The diff is in unified diff format for text files. | 202 | * The diff is in unified diff format for text files and may | ||
203 | * use the context size set through setDiffContextLines. | ||||
193 | */ | 204 | */ | ||
194 | virtual VcsJob* diff( const QUrl& fileOrDirectory, | 205 | virtual VcsJob* diff( const QUrl& fileOrDirectory, | ||
195 | const VcsRevision& srcRevision, | 206 | const VcsRevision& srcRevision, | ||
Context not available. | |||||
270 | * The default implementation does nothing. | 281 | * The default implementation does nothing. | ||
271 | */ | 282 | */ | ||
272 | virtual void setupCommitMessageEditor(const QUrl&, KTextEdit* edit) const; | 283 | virtual void setupCommitMessageEditor(const QUrl&, KTextEdit* edit) const; | ||
284 | protected: | ||||
285 | int m_contextLines = -1; | ||||
273 | }; | 286 | }; | ||
274 | 287 | | |||
275 | } | 288 | } | ||
Context not available. |