Changeset View
Changeset View
Standalone View
Standalone View
plugins/subversion/kdevsvnplugin.cpp
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Line(s) | |||||
220 | KDevelop::VcsJob* KDevSvnPlugin::diff(const QUrl &fileOrDirectory, | 220 | KDevelop::VcsJob* KDevSvnPlugin::diff(const QUrl &fileOrDirectory, | ||
221 | const KDevelop::VcsRevision& srcRevision, | 221 | const KDevelop::VcsRevision& srcRevision, | ||
222 | const KDevelop::VcsRevision& dstRevision, | 222 | const KDevelop::VcsRevision& dstRevision, | ||
223 | KDevelop::VcsDiff::Type diffType, | 223 | KDevelop::VcsDiff::Type diffType, | ||
224 | KDevelop::IBasicVersionControl::RecursionMode recurse) | 224 | KDevelop::IBasicVersionControl::RecursionMode recurse) | ||
225 | { | 225 | { | ||
226 | KDevelop::VcsLocation loc(fileOrDirectory); | 226 | KDevelop::VcsLocation loc(fileOrDirectory); | ||
227 | return diff2(loc, loc, srcRevision, dstRevision, diffType, recurse); | 227 | return diff2(loc, loc, srcRevision, dstRevision, diffType, recurse); | ||
228 | } | 228 | } | ||
kfunk: Why does this store `contextLines` into a member? That's totally cumbersome from a API POV. | |||||
I could indeed just as well have passed on the parameter to diff2() as an additional argument. I take it then that you wouldn't be in favour of making the contextLines parameter a member variable of the base class, with a setter function so that it doesn't have to be passed around regardless of whether an implementation actually support it? rjvbb: I could indeed just as well have passed on the parameter to diff2() as an additional argument. | |||||
229 | 229 | | |||
230 | KDevelop::VcsJob* KDevSvnPlugin::diff2(const KDevelop::VcsLocation& src, | 230 | KDevelop::VcsJob* KDevSvnPlugin::diff2(const KDevelop::VcsLocation& src, | ||
231 | const KDevelop::VcsLocation& dst, | 231 | const KDevelop::VcsLocation& dst, | ||
232 | const KDevelop::VcsRevision& srcRevision, | 232 | const KDevelop::VcsRevision& srcRevision, | ||
233 | const KDevelop::VcsRevision& dstRevision, | 233 | const KDevelop::VcsRevision& dstRevision, | ||
234 | KDevelop::VcsDiff::Type diffType, | 234 | KDevelop::VcsDiff::Type diffType, | ||
235 | KDevelop::IBasicVersionControl::RecursionMode recurse) | 235 | KDevelop::IBasicVersionControl::RecursionMode recurse) | ||
236 | { | 236 | { | ||
237 | // TODO: support custom context lines in SvnDiffJob | ||||
237 | SvnDiffJob* job = new SvnDiffJob(this); | 238 | SvnDiffJob* job = new SvnDiffJob(this); | ||
238 | job->setSource(src); | 239 | job->setSource(src); | ||
239 | job->setDestination(dst); | 240 | job->setDestination(dst); | ||
240 | job->setSrcRevision(srcRevision); | 241 | job->setSrcRevision(srcRevision); | ||
241 | job->setDstRevision(dstRevision); | 242 | job->setDstRevision(dstRevision); | ||
242 | job->setDiffType(diffType); | 243 | job->setDiffType(diffType); | ||
243 | job->setRecursive((recurse == KDevelop::IBasicVersionControl::Recursive)); | 244 | job->setRecursive((recurse == KDevelop::IBasicVersionControl::Recursive)); | ||
244 | return job; | 245 | return job; | ||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |
Why does this store contextLines into a member? That's totally cumbersome from a API POV.