Changeset View
Changeset View
Standalone View
Standalone View
plugins/subversion/kdevsvnplugin.cpp
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Line(s) | |||||
231 | KDevelop::VcsJob* KDevSvnPlugin::diff(const QUrl &fileOrDirectory, | 231 | KDevelop::VcsJob* KDevSvnPlugin::diff(const QUrl &fileOrDirectory, | ||
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 | KDevelop::VcsLocation loc(fileOrDirectory); | 237 | KDevelop::VcsLocation loc(fileOrDirectory); | ||
238 | return diff2(loc, loc, srcRevision, dstRevision, diffType, recurse); | 238 | return diff2(loc, loc, srcRevision, dstRevision, diffType, recurse); | ||
239 | } | 239 | } | ||
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. | |||||
240 | 240 | | |||
241 | KDevelop::VcsJob* KDevSvnPlugin::diff2(const KDevelop::VcsLocation& src, | 241 | KDevelop::VcsJob* KDevSvnPlugin::diff2(const KDevelop::VcsLocation& src, | ||
242 | const KDevelop::VcsLocation& dst, | 242 | const KDevelop::VcsLocation& dst, | ||
243 | const KDevelop::VcsRevision& srcRevision, | 243 | const KDevelop::VcsRevision& srcRevision, | ||
244 | const KDevelop::VcsRevision& dstRevision, | 244 | const KDevelop::VcsRevision& dstRevision, | ||
245 | KDevelop::VcsDiff::Type diffType, | 245 | KDevelop::VcsDiff::Type diffType, | ||
246 | KDevelop::IBasicVersionControl::RecursionMode recurse) | 246 | KDevelop::IBasicVersionControl::RecursionMode recurse) | ||
247 | { | 247 | { | ||
248 | // TODO: support custom context lines in SvnDiffJob | ||||
248 | SvnDiffJob* job = new SvnDiffJob(this); | 249 | SvnDiffJob* job = new SvnDiffJob(this); | ||
249 | job->setSource(src); | 250 | job->setSource(src); | ||
250 | job->setDestination(dst); | 251 | job->setDestination(dst); | ||
251 | job->setSrcRevision(srcRevision); | 252 | job->setSrcRevision(srcRevision); | ||
252 | job->setDstRevision(dstRevision); | 253 | job->setDstRevision(dstRevision); | ||
253 | job->setDiffType(diffType); | 254 | job->setDiffType(diffType); | ||
254 | job->setRecursive((recurse == KDevelop::IBasicVersionControl::Recursive)); | 255 | job->setRecursive((recurse == KDevelop::IBasicVersionControl::Recursive)); | ||
255 | return job; | 256 | 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.