source code management refactor
Javier Guerra Giraldez <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwrite |
|---|---|
| Message-ID | <CAFkDaoQE0pZyrCM-hQoswi2JNEBThhaDHip0CKjY5p+mc_xj0Q@mail.gmail.com> |
Hi, I've recently pushed a small patch to add minimal Fossil support to Kate's Project plugin. It felt so good to contribute to my favourite KDE application after many (many!) years of using it! The next step, of course, is to get more Fossil functionality; ideally getting it to parity with the current Git support. Looking at the code, I found several places like "if git, do this very-git thing", which of course, doesn't scale to multiple SCM backends. I'm not a fan of gratuitous inheritance, but it seems the best way forward. As a nice bonus, it should make it easier to add similar features to Mercurial, and maybe Subversion. Now, I haven't done any real C++ since Qt3 days, so I'd like to ask for some comments before going too far into a bad design. I've just pushed a new branch: https://invent.kde.org/javier/kate/-/tree/work/javier/fossil_branches It adds a `scm/` directory with a base class and a class for each SCM supported. So far the features: - SCM detection (all SCMs) - get managed files (all SCMs) - get SCM icon (for Git and Fossil) - get current branch name (Git and Fossil) - list of branches (Git and Fossil) - checkout branch (Git and Fossil) - new branch (Git and Fossil) have been moved to use these new classes. Is this list the appropriate place to discuss design? or would it be better to open a PR and do it there (even if the code is still very much in process) thanks! -- Javier