class_editorvcsinterface.rst 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorVCSInterface.xml.
  6. .. _class_EditorVCSInterface:
  7. EditorVCSInterface
  8. ==================
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Version Control System (VCS) interface, which reads and writes to the local VCS in use.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are GDExtension plugins that inherit **EditorVCSInterface** and are attached (on demand) to the singleton instance of **EditorVCSInterface**. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from **EditorVCSInterface** and override each of these virtual functions.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`Version control systems <../tutorials/best_practices/version_control_systems>`
  19. .. rst-class:: classref-reftable-group
  20. Methods
  21. -------
  22. .. table::
  23. :widths: auto
  24. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`_checkout_branch<class_EditorVCSInterface_private_method__checkout_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |
  26. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | |void| | :ref:`_commit<class_EditorVCSInterface_private_method__commit>`\ (\ msg\: :ref:`String<class_String>`\ ) |virtual| |
  28. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | |void| | :ref:`_create_branch<class_EditorVCSInterface_private_method__create_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |
  30. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | |void| | :ref:`_create_remote<class_EditorVCSInterface_private_method__create_remote>`\ (\ remote_name\: :ref:`String<class_String>`, remote_url\: :ref:`String<class_String>`\ ) |virtual| |
  32. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | |void| | :ref:`_discard_file<class_EditorVCSInterface_private_method__discard_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |
  34. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | |void| | :ref:`_fetch<class_EditorVCSInterface_private_method__fetch>`\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| |
  36. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`_get_branch_list<class_EditorVCSInterface_private_method__get_branch_list>`\ (\ ) |virtual| |
  38. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`String<class_String>` | :ref:`_get_current_branch_name<class_EditorVCSInterface_private_method__get_current_branch_name>`\ (\ ) |virtual| |
  40. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_diff<class_EditorVCSInterface_private_method__get_diff>`\ (\ identifier\: :ref:`String<class_String>`, area\: :ref:`int<class_int>`\ ) |virtual| |
  42. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_line_diff<class_EditorVCSInterface_private_method__get_line_diff>`\ (\ file_path\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |virtual| |
  44. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_modified_files_data<class_EditorVCSInterface_private_method__get_modified_files_data>`\ (\ ) |virtual| |
  46. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_previous_commits<class_EditorVCSInterface_private_method__get_previous_commits>`\ (\ max_commits\: :ref:`int<class_int>`\ ) |virtual| |
  48. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`_get_remotes<class_EditorVCSInterface_private_method__get_remotes>`\ (\ ) |virtual| |
  50. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`String<class_String>` | :ref:`_get_vcs_name<class_EditorVCSInterface_private_method__get_vcs_name>`\ (\ ) |virtual| |
  52. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`_initialize<class_EditorVCSInterface_private_method__initialize>`\ (\ project_path\: :ref:`String<class_String>`\ ) |virtual| |
  54. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | |void| | :ref:`_pull<class_EditorVCSInterface_private_method__pull>`\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| |
  56. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | |void| | :ref:`_push<class_EditorVCSInterface_private_method__push>`\ (\ remote\: :ref:`String<class_String>`, force\: :ref:`bool<class_bool>`\ ) |virtual| |
  58. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | |void| | :ref:`_remove_branch<class_EditorVCSInterface_private_method__remove_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |
  60. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | |void| | :ref:`_remove_remote<class_EditorVCSInterface_private_method__remove_remote>`\ (\ remote_name\: :ref:`String<class_String>`\ ) |virtual| |
  62. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | |void| | :ref:`_set_credentials<class_EditorVCSInterface_private_method__set_credentials>`\ (\ username\: :ref:`String<class_String>`, password\: :ref:`String<class_String>`, ssh_public_key_path\: :ref:`String<class_String>`, ssh_private_key_path\: :ref:`String<class_String>`, ssh_passphrase\: :ref:`String<class_String>`\ ) |virtual| |
  64. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`_shut_down<class_EditorVCSInterface_private_method__shut_down>`\ (\ ) |virtual| |
  66. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | |void| | :ref:`_stage_file<class_EditorVCSInterface_private_method__stage_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |
  68. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | |void| | :ref:`_unstage_file<class_EditorVCSInterface_private_method__unstage_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |
  70. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`Dictionary<class_Dictionary>` | :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`\ (\ diff_file\: :ref:`Dictionary<class_Dictionary>`, diff_hunks\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) |
  72. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`Dictionary<class_Dictionary>` | :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>`\ (\ diff_hunk\: :ref:`Dictionary<class_Dictionary>`, line_diffs\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) |
  74. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_commit<class_EditorVCSInterface_method_create_commit>`\ (\ msg\: :ref:`String<class_String>`, author\: :ref:`String<class_String>`, id\: :ref:`String<class_String>`, unix_timestamp\: :ref:`int<class_int>`, offset_minutes\: :ref:`int<class_int>`\ ) |
  76. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>`\ (\ new_file\: :ref:`String<class_String>`, old_file\: :ref:`String<class_String>`\ ) |
  78. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`\ (\ old_start\: :ref:`int<class_int>`, new_start\: :ref:`int<class_int>`, old_lines\: :ref:`int<class_int>`, new_lines\: :ref:`int<class_int>`\ ) |
  80. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>`\ (\ new_line_no\: :ref:`int<class_int>`, old_line_no\: :ref:`int<class_int>`, content\: :ref:`String<class_String>`, status\: :ref:`String<class_String>`\ ) |
  82. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>`\ (\ file_path\: :ref:`String<class_String>`, change_type\: :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>`, area\: :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>`\ ) |
  84. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | |void| | :ref:`popup_error<class_EditorVCSInterface_method_popup_error>`\ (\ msg\: :ref:`String<class_String>`\ ) |
  86. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. .. rst-class:: classref-section-separator
  88. ----
  89. .. rst-class:: classref-descriptions-group
  90. Enumerations
  91. ------------
  92. .. _enum_EditorVCSInterface_ChangeType:
  93. .. rst-class:: classref-enumeration
  94. enum **ChangeType**: :ref:`๐Ÿ”—<enum_EditorVCSInterface_ChangeType>`
  95. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_NEW** = ``0``
  98. A new file has been added.
  99. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_MODIFIED:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_MODIFIED** = ``1``
  102. An earlier added file has been modified.
  103. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_RENAMED:
  104. .. rst-class:: classref-enumeration-constant
  105. :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_RENAMED** = ``2``
  106. An earlier added file has been renamed.
  107. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_DELETED:
  108. .. rst-class:: classref-enumeration-constant
  109. :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_DELETED** = ``3``
  110. An earlier added file has been deleted.
  111. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_TYPECHANGE:
  112. .. rst-class:: classref-enumeration-constant
  113. :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_TYPECHANGE** = ``4``
  114. An earlier added file has been typechanged.
  115. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_UNMERGED:
  116. .. rst-class:: classref-enumeration-constant
  117. :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_UNMERGED** = ``5``
  118. A file is left unmerged.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _enum_EditorVCSInterface_TreeArea:
  122. .. rst-class:: classref-enumeration
  123. enum **TreeArea**: :ref:`๐Ÿ”—<enum_EditorVCSInterface_TreeArea>`
  124. .. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT:
  125. .. rst-class:: classref-enumeration-constant
  126. :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` **TREE_AREA_COMMIT** = ``0``
  127. A commit is encountered from the commit area.
  128. .. _class_EditorVCSInterface_constant_TREE_AREA_STAGED:
  129. .. rst-class:: classref-enumeration-constant
  130. :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` **TREE_AREA_STAGED** = ``1``
  131. A file is encountered from the staged area.
  132. .. _class_EditorVCSInterface_constant_TREE_AREA_UNSTAGED:
  133. .. rst-class:: classref-enumeration-constant
  134. :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` **TREE_AREA_UNSTAGED** = ``2``
  135. A file is encountered from the unstaged area.
  136. .. rst-class:: classref-section-separator
  137. ----
  138. .. rst-class:: classref-descriptions-group
  139. Method Descriptions
  140. -------------------
  141. .. _class_EditorVCSInterface_private_method__checkout_branch:
  142. .. rst-class:: classref-method
  143. :ref:`bool<class_bool>` **_checkout_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__checkout_branch>`
  144. Checks out a ``branch_name`` in the VCS.
  145. .. rst-class:: classref-item-separator
  146. ----
  147. .. _class_EditorVCSInterface_private_method__commit:
  148. .. rst-class:: classref-method
  149. |void| **_commit**\ (\ msg\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__commit>`
  150. Commits the currently staged changes and applies the commit ``msg`` to the resulting commit.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_EditorVCSInterface_private_method__create_branch:
  154. .. rst-class:: classref-method
  155. |void| **_create_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__create_branch>`
  156. Creates a new branch named ``branch_name`` in the VCS.
  157. .. rst-class:: classref-item-separator
  158. ----
  159. .. _class_EditorVCSInterface_private_method__create_remote:
  160. .. rst-class:: classref-method
  161. |void| **_create_remote**\ (\ remote_name\: :ref:`String<class_String>`, remote_url\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__create_remote>`
  162. Creates a new remote destination with name ``remote_name`` and points it to ``remote_url``. This can be an HTTPS remote or an SSH remote.
  163. .. rst-class:: classref-item-separator
  164. ----
  165. .. _class_EditorVCSInterface_private_method__discard_file:
  166. .. rst-class:: classref-method
  167. |void| **_discard_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__discard_file>`
  168. Discards the changes made in a file present at ``file_path``.
  169. .. rst-class:: classref-item-separator
  170. ----
  171. .. _class_EditorVCSInterface_private_method__fetch:
  172. .. rst-class:: classref-method
  173. |void| **_fetch**\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__fetch>`
  174. Fetches new changes from the ``remote``, but doesn't write changes to the current working directory. Equivalent to ``git fetch``.
  175. .. rst-class:: classref-item-separator
  176. ----
  177. .. _class_EditorVCSInterface_private_method__get_branch_list:
  178. .. rst-class:: classref-method
  179. :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **_get_branch_list**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_branch_list>`
  180. Gets an instance of an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s containing available branch names in the VCS.
  181. .. rst-class:: classref-item-separator
  182. ----
  183. .. _class_EditorVCSInterface_private_method__get_current_branch_name:
  184. .. rst-class:: classref-method
  185. :ref:`String<class_String>` **_get_current_branch_name**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_current_branch_name>`
  186. Gets the current branch name defined in the VCS.
  187. .. rst-class:: classref-item-separator
  188. ----
  189. .. _class_EditorVCSInterface_private_method__get_diff:
  190. .. rst-class:: classref-method
  191. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_diff**\ (\ identifier\: :ref:`String<class_String>`, area\: :ref:`int<class_int>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_diff>`
  192. Returns an array of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>`, :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`, :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>`, :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>` and :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`), each containing information about a diff. If ``identifier`` is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff.
  193. .. rst-class:: classref-item-separator
  194. ----
  195. .. _class_EditorVCSInterface_private_method__get_line_diff:
  196. .. rst-class:: classref-method
  197. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_line_diff**\ (\ file_path\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_line_diff>`
  198. Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`), each containing a line diff between a file at ``file_path`` and the ``text`` which is passed in.
  199. .. rst-class:: classref-item-separator
  200. ----
  201. .. _class_EditorVCSInterface_private_method__get_modified_files_data:
  202. .. rst-class:: classref-method
  203. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_modified_files_data**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_modified_files_data>`
  204. Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>`), each containing the status data of every modified file in the project folder.
  205. .. rst-class:: classref-item-separator
  206. ----
  207. .. _class_EditorVCSInterface_private_method__get_previous_commits:
  208. .. rst-class:: classref-method
  209. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_previous_commits**\ (\ max_commits\: :ref:`int<class_int>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_previous_commits>`
  210. Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_commit<class_EditorVCSInterface_method_create_commit>`), each containing the data for a past commit.
  211. .. rst-class:: classref-item-separator
  212. ----
  213. .. _class_EditorVCSInterface_private_method__get_remotes:
  214. .. rst-class:: classref-method
  215. :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **_get_remotes**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_remotes>`
  216. Returns an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s, each containing the name of a remote configured in the VCS.
  217. .. rst-class:: classref-item-separator
  218. ----
  219. .. _class_EditorVCSInterface_private_method__get_vcs_name:
  220. .. rst-class:: classref-method
  221. :ref:`String<class_String>` **_get_vcs_name**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__get_vcs_name>`
  222. Returns the name of the underlying VCS provider.
  223. .. rst-class:: classref-item-separator
  224. ----
  225. .. _class_EditorVCSInterface_private_method__initialize:
  226. .. rst-class:: classref-method
  227. :ref:`bool<class_bool>` **_initialize**\ (\ project_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__initialize>`
  228. Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at ``project_path``.
  229. .. rst-class:: classref-item-separator
  230. ----
  231. .. _class_EditorVCSInterface_private_method__pull:
  232. .. rst-class:: classref-method
  233. |void| **_pull**\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__pull>`
  234. Pulls changes from the remote. This can give rise to merge conflicts.
  235. .. rst-class:: classref-item-separator
  236. ----
  237. .. _class_EditorVCSInterface_private_method__push:
  238. .. rst-class:: classref-method
  239. |void| **_push**\ (\ remote\: :ref:`String<class_String>`, force\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__push>`
  240. Pushes changes to the ``remote``. If ``force`` is ``true``, a force push will override the change history already present on the remote.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_EditorVCSInterface_private_method__remove_branch:
  244. .. rst-class:: classref-method
  245. |void| **_remove_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__remove_branch>`
  246. Remove a branch from the local VCS.
  247. .. rst-class:: classref-item-separator
  248. ----
  249. .. _class_EditorVCSInterface_private_method__remove_remote:
  250. .. rst-class:: classref-method
  251. |void| **_remove_remote**\ (\ remote_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__remove_remote>`
  252. Remove a remote from the local VCS.
  253. .. rst-class:: classref-item-separator
  254. ----
  255. .. _class_EditorVCSInterface_private_method__set_credentials:
  256. .. rst-class:: classref-method
  257. |void| **_set_credentials**\ (\ username\: :ref:`String<class_String>`, password\: :ref:`String<class_String>`, ssh_public_key_path\: :ref:`String<class_String>`, ssh_private_key_path\: :ref:`String<class_String>`, ssh_passphrase\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__set_credentials>`
  258. Set user credentials in the underlying VCS. ``username`` and ``password`` are used only during HTTPS authentication unless not already mentioned in the remote URL. ``ssh_public_key_path``, ``ssh_private_key_path``, and ``ssh_passphrase`` are only used during SSH authentication.
  259. .. rst-class:: classref-item-separator
  260. ----
  261. .. _class_EditorVCSInterface_private_method__shut_down:
  262. .. rst-class:: classref-method
  263. :ref:`bool<class_bool>` **_shut_down**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__shut_down>`
  264. Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI.
  265. .. rst-class:: classref-item-separator
  266. ----
  267. .. _class_EditorVCSInterface_private_method__stage_file:
  268. .. rst-class:: classref-method
  269. |void| **_stage_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__stage_file>`
  270. Stages the file present at ``file_path`` to the staged area.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_EditorVCSInterface_private_method__unstage_file:
  274. .. rst-class:: classref-method
  275. |void| **_unstage_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorVCSInterface_private_method__unstage_file>`
  276. Unstages the file present at ``file_path`` from the staged area to the unstaged area.
  277. .. rst-class:: classref-item-separator
  278. ----
  279. .. _class_EditorVCSInterface_method_add_diff_hunks_into_diff_file:
  280. .. rst-class:: classref-method
  281. :ref:`Dictionary<class_Dictionary>` **add_diff_hunks_into_diff_file**\ (\ diff_file\: :ref:`Dictionary<class_Dictionary>`, diff_hunks\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`
  282. Helper function to add an array of ``diff_hunks`` into a ``diff_file``.
  283. .. rst-class:: classref-item-separator
  284. ----
  285. .. _class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk:
  286. .. rst-class:: classref-method
  287. :ref:`Dictionary<class_Dictionary>` **add_line_diffs_into_diff_hunk**\ (\ diff_hunk\: :ref:`Dictionary<class_Dictionary>`, line_diffs\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>`
  288. Helper function to add an array of ``line_diffs`` into a ``diff_hunk``.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_EditorVCSInterface_method_create_commit:
  292. .. rst-class:: classref-method
  293. :ref:`Dictionary<class_Dictionary>` **create_commit**\ (\ msg\: :ref:`String<class_String>`, author\: :ref:`String<class_String>`, id\: :ref:`String<class_String>`, unix_timestamp\: :ref:`int<class_int>`, offset_minutes\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_create_commit>`
  294. Helper function to create a commit :ref:`Dictionary<class_Dictionary>` item. ``msg`` is the commit message of the commit. ``author`` is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. ``id`` is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. ``unix_timestamp`` is the UTC Unix timestamp of when the commit was created. ``offset_minutes`` is the timezone offset in minutes, recorded from the system timezone where the commit was created.
  295. .. rst-class:: classref-item-separator
  296. ----
  297. .. _class_EditorVCSInterface_method_create_diff_file:
  298. .. rst-class:: classref-method
  299. :ref:`Dictionary<class_Dictionary>` **create_diff_file**\ (\ new_file\: :ref:`String<class_String>`, old_file\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_create_diff_file>`
  300. Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing old and new diff file paths.
  301. .. rst-class:: classref-item-separator
  302. ----
  303. .. _class_EditorVCSInterface_method_create_diff_hunk:
  304. .. rst-class:: classref-method
  305. :ref:`Dictionary<class_Dictionary>` **create_diff_hunk**\ (\ old_start\: :ref:`int<class_int>`, new_start\: :ref:`int<class_int>`, old_lines\: :ref:`int<class_int>`, new_lines\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_create_diff_hunk>`
  306. Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing diff hunk data. ``old_start`` is the starting line number in old file. ``new_start`` is the starting line number in new file. ``old_lines`` is the number of lines in the old file. ``new_lines`` is the number of lines in the new file.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_EditorVCSInterface_method_create_diff_line:
  310. .. rst-class:: classref-method
  311. :ref:`Dictionary<class_Dictionary>` **create_diff_line**\ (\ new_line_no\: :ref:`int<class_int>`, old_line_no\: :ref:`int<class_int>`, content\: :ref:`String<class_String>`, status\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_create_diff_line>`
  312. Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing a line diff. ``new_line_no`` is the line number in the new file (can be ``-1`` if the line is deleted). ``old_line_no`` is the line number in the old file (can be ``-1`` if the line is added). ``content`` is the diff text. ``status`` is a single character string which stores the line origin.
  313. .. rst-class:: classref-item-separator
  314. ----
  315. .. _class_EditorVCSInterface_method_create_status_file:
  316. .. rst-class:: classref-method
  317. :ref:`Dictionary<class_Dictionary>` **create_status_file**\ (\ file_path\: :ref:`String<class_String>`, change_type\: :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>`, area\: :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>`\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_create_status_file>`
  318. Helper function to create a :ref:`Dictionary<class_Dictionary>` used by editor to read the status of a file.
  319. .. rst-class:: classref-item-separator
  320. ----
  321. .. _class_EditorVCSInterface_method_popup_error:
  322. .. rst-class:: classref-method
  323. |void| **popup_error**\ (\ msg\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_EditorVCSInterface_method_popup_error>`
  324. Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages.
  325. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  326. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  327. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  328. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  329. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  330. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  331. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  332. .. |void| replace:: :abbr:`void (No return value.)`