class_editorvcsinterface.rst 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  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. Description
  12. -----------
  13. 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.
  14. Methods
  15. -------
  16. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`_checkout_branch<class_EditorVCSInterface_method__checkout_branch>` **(** :ref:`String<class_String>` branch_name **)** |virtual| |
  18. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`_commit<class_EditorVCSInterface_method__commit>` **(** :ref:`String<class_String>` msg **)** |virtual| |
  20. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`_create_branch<class_EditorVCSInterface_method__create_branch>` **(** :ref:`String<class_String>` branch_name **)** |virtual| |
  22. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`_create_remote<class_EditorVCSInterface_method__create_remote>` **(** :ref:`String<class_String>` remote_name, :ref:`String<class_String>` remote_url **)** |virtual| |
  24. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`_discard_file<class_EditorVCSInterface_method__discard_file>` **(** :ref:`String<class_String>` file_path **)** |virtual| |
  26. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`_fetch<class_EditorVCSInterface_method__fetch>` **(** :ref:`String<class_String>` remote **)** |virtual| |
  28. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_branch_list<class_EditorVCSInterface_method__get_branch_list>` **(** **)** |virtual| |
  30. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`String<class_String>` | :ref:`_get_current_branch_name<class_EditorVCSInterface_method__get_current_branch_name>` **(** **)** |virtual| |
  32. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_diff<class_EditorVCSInterface_method__get_diff>` **(** :ref:`String<class_String>` identifier, :ref:`int<class_int>` area **)** |virtual| |
  34. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_line_diff<class_EditorVCSInterface_method__get_line_diff>` **(** :ref:`String<class_String>` file_path, :ref:`String<class_String>` text **)** |virtual| |
  36. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_modified_files_data<class_EditorVCSInterface_method__get_modified_files_data>` **(** **)** |virtual| |
  38. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_previous_commits<class_EditorVCSInterface_method__get_previous_commits>` **(** :ref:`int<class_int>` max_commits **)** |virtual| |
  40. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_remotes<class_EditorVCSInterface_method__get_remotes>` **(** **)** |virtual| |
  42. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`String<class_String>` | :ref:`_get_vcs_name<class_EditorVCSInterface_method__get_vcs_name>` **(** **)** |virtual| |
  44. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`_initialize<class_EditorVCSInterface_method__initialize>` **(** :ref:`String<class_String>` project_path **)** |virtual| |
  46. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`_pull<class_EditorVCSInterface_method__pull>` **(** :ref:`String<class_String>` remote **)** |virtual| |
  48. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`_push<class_EditorVCSInterface_method__push>` **(** :ref:`String<class_String>` remote, :ref:`bool<class_bool>` force **)** |virtual| |
  50. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`_remove_branch<class_EditorVCSInterface_method__remove_branch>` **(** :ref:`String<class_String>` branch_name **)** |virtual| |
  52. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`_remove_remote<class_EditorVCSInterface_method__remove_remote>` **(** :ref:`String<class_String>` remote_name **)** |virtual| |
  54. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`_set_credentials<class_EditorVCSInterface_method__set_credentials>` **(** :ref:`String<class_String>` 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 **)** |virtual| |
  56. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`_shut_down<class_EditorVCSInterface_method__shut_down>` **(** **)** |virtual| |
  58. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`_stage_file<class_EditorVCSInterface_method__stage_file>` **(** :ref:`String<class_String>` file_path **)** |virtual| |
  60. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`_unstage_file<class_EditorVCSInterface_method__unstage_file>` **(** :ref:`String<class_String>` file_path **)** |virtual| |
  62. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`Dictionary<class_Dictionary>` | :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>` **(** :ref:`Dictionary<class_Dictionary>` diff_file, :ref:`Dictionary[]<class_Dictionary>` diff_hunks **)** |
  64. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`Dictionary<class_Dictionary>` | :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>` **(** :ref:`Dictionary<class_Dictionary>` diff_hunk, :ref:`Dictionary[]<class_Dictionary>` line_diffs **)** |
  66. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_commit<class_EditorVCSInterface_method_create_commit>` **(** :ref:`String<class_String>` msg, :ref:`String<class_String>` author, :ref:`String<class_String>` id, :ref:`int<class_int>` unix_timestamp, :ref:`int<class_int>` offset_minutes **)** |
  68. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>` **(** :ref:`String<class_String>` new_file, :ref:`String<class_String>` old_file **)** |
  70. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>` **(** :ref:`int<class_int>` old_start, :ref:`int<class_int>` new_start, :ref:`int<class_int>` old_lines, :ref:`int<class_int>` new_lines **)** |
  72. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>` **(** :ref:`int<class_int>` new_line_no, :ref:`int<class_int>` old_line_no, :ref:`String<class_String>` content, :ref:`String<class_String>` status **)** |
  74. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`Dictionary<class_Dictionary>` | :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>` **(** :ref:`String<class_String>` file_path, :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` change_type, :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` area **)** |
  76. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`popup_error<class_EditorVCSInterface_method_popup_error>` **(** :ref:`String<class_String>` msg **)** |
  78. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. Enumerations
  80. ------------
  81. .. _enum_EditorVCSInterface_ChangeType:
  82. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW:
  83. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_MODIFIED:
  84. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_RENAMED:
  85. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_DELETED:
  86. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_TYPECHANGE:
  87. .. _class_EditorVCSInterface_constant_CHANGE_TYPE_UNMERGED:
  88. enum **ChangeType**:
  89. - **CHANGE_TYPE_NEW** = **0** --- A new file has been added.
  90. - **CHANGE_TYPE_MODIFIED** = **1** --- An earlier added file has been modified.
  91. - **CHANGE_TYPE_RENAMED** = **2** --- An earlier added file has been renamed.
  92. - **CHANGE_TYPE_DELETED** = **3** --- An earlier added file has been deleted.
  93. - **CHANGE_TYPE_TYPECHANGE** = **4** --- An earlier added file has been typechanged.
  94. - **CHANGE_TYPE_UNMERGED** = **5** --- A file is left unmerged.
  95. ----
  96. .. _enum_EditorVCSInterface_TreeArea:
  97. .. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT:
  98. .. _class_EditorVCSInterface_constant_TREE_AREA_STAGED:
  99. .. _class_EditorVCSInterface_constant_TREE_AREA_UNSTAGED:
  100. enum **TreeArea**:
  101. - **TREE_AREA_COMMIT** = **0** --- A commit is encountered from the commit area.
  102. - **TREE_AREA_STAGED** = **1** --- A file is encountered from the staged area.
  103. - **TREE_AREA_UNSTAGED** = **2** --- A file is encountered from the unstaged area.
  104. Method Descriptions
  105. -------------------
  106. .. _class_EditorVCSInterface_method__checkout_branch:
  107. - :ref:`bool<class_bool>` **_checkout_branch** **(** :ref:`String<class_String>` branch_name **)** |virtual|
  108. Checks out a ``branch_name`` in the VCS.
  109. ----
  110. .. _class_EditorVCSInterface_method__commit:
  111. - void **_commit** **(** :ref:`String<class_String>` msg **)** |virtual|
  112. Commits the currently staged changes and applies the commit ``msg`` to the resulting commit.
  113. ----
  114. .. _class_EditorVCSInterface_method__create_branch:
  115. - void **_create_branch** **(** :ref:`String<class_String>` branch_name **)** |virtual|
  116. Creates a new branch named ``branch_name`` in the VCS.
  117. ----
  118. .. _class_EditorVCSInterface_method__create_remote:
  119. - void **_create_remote** **(** :ref:`String<class_String>` remote_name, :ref:`String<class_String>` remote_url **)** |virtual|
  120. 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.
  121. ----
  122. .. _class_EditorVCSInterface_method__discard_file:
  123. - void **_discard_file** **(** :ref:`String<class_String>` file_path **)** |virtual|
  124. Discards the changes made in a file present at ``file_path``.
  125. ----
  126. .. _class_EditorVCSInterface_method__fetch:
  127. - void **_fetch** **(** :ref:`String<class_String>` remote **)** |virtual|
  128. Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to ``git fetch``.
  129. ----
  130. .. _class_EditorVCSInterface_method__get_branch_list:
  131. - :ref:`Dictionary[]<class_Dictionary>` **_get_branch_list** **(** **)** |virtual|
  132. Gets an instance of an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s containing available branch names in the VCS.
  133. ----
  134. .. _class_EditorVCSInterface_method__get_current_branch_name:
  135. - :ref:`String<class_String>` **_get_current_branch_name** **(** **)** |virtual|
  136. Gets the current branch name defined in the VCS.
  137. ----
  138. .. _class_EditorVCSInterface_method__get_diff:
  139. - :ref:`Dictionary[]<class_Dictionary>` **_get_diff** **(** :ref:`String<class_String>` identifier, :ref:`int<class_int>` area **)** |virtual|
  140. 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.
  141. ----
  142. .. _class_EditorVCSInterface_method__get_line_diff:
  143. - :ref:`Dictionary[]<class_Dictionary>` **_get_line_diff** **(** :ref:`String<class_String>` file_path, :ref:`String<class_String>` text **)** |virtual|
  144. 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.
  145. ----
  146. .. _class_EditorVCSInterface_method__get_modified_files_data:
  147. - :ref:`Dictionary[]<class_Dictionary>` **_get_modified_files_data** **(** **)** |virtual|
  148. 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.
  149. ----
  150. .. _class_EditorVCSInterface_method__get_previous_commits:
  151. - :ref:`Dictionary[]<class_Dictionary>` **_get_previous_commits** **(** :ref:`int<class_int>` max_commits **)** |virtual|
  152. 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.
  153. ----
  154. .. _class_EditorVCSInterface_method__get_remotes:
  155. - :ref:`Dictionary[]<class_Dictionary>` **_get_remotes** **(** **)** |virtual|
  156. Returns an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s, each containing the name of a remote configured in the VCS.
  157. ----
  158. .. _class_EditorVCSInterface_method__get_vcs_name:
  159. - :ref:`String<class_String>` **_get_vcs_name** **(** **)** |virtual|
  160. Returns the name of the underlying VCS provider.
  161. ----
  162. .. _class_EditorVCSInterface_method__initialize:
  163. - :ref:`bool<class_bool>` **_initialize** **(** :ref:`String<class_String>` project_path **)** |virtual|
  164. 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``.
  165. ----
  166. .. _class_EditorVCSInterface_method__pull:
  167. - void **_pull** **(** :ref:`String<class_String>` remote **)** |virtual|
  168. Pulls changes from the remote. This can give rise to merge conflicts.
  169. ----
  170. .. _class_EditorVCSInterface_method__push:
  171. - void **_push** **(** :ref:`String<class_String>` remote, :ref:`bool<class_bool>` force **)** |virtual|
  172. Pushes changes to the ``remote``. Optionally, if ``force`` is set to true, a force push will override the change history already present on the remote.
  173. ----
  174. .. _class_EditorVCSInterface_method__remove_branch:
  175. - void **_remove_branch** **(** :ref:`String<class_String>` branch_name **)** |virtual|
  176. Remove a branch from the local VCS.
  177. ----
  178. .. _class_EditorVCSInterface_method__remove_remote:
  179. - void **_remove_remote** **(** :ref:`String<class_String>` remote_name **)** |virtual|
  180. Remove a remote from the local VCS.
  181. ----
  182. .. _class_EditorVCSInterface_method__set_credentials:
  183. - void **_set_credentials** **(** :ref:`String<class_String>` 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 **)** |virtual|
  184. 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.
  185. ----
  186. .. _class_EditorVCSInterface_method__shut_down:
  187. - :ref:`bool<class_bool>` **_shut_down** **(** **)** |virtual|
  188. Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI.
  189. ----
  190. .. _class_EditorVCSInterface_method__stage_file:
  191. - void **_stage_file** **(** :ref:`String<class_String>` file_path **)** |virtual|
  192. Stages the file present at ``file_path`` to the staged area.
  193. ----
  194. .. _class_EditorVCSInterface_method__unstage_file:
  195. - void **_unstage_file** **(** :ref:`String<class_String>` file_path **)** |virtual|
  196. Unstages the file present at ``file_path`` from the staged area to the unstaged area.
  197. ----
  198. .. _class_EditorVCSInterface_method_add_diff_hunks_into_diff_file:
  199. - :ref:`Dictionary<class_Dictionary>` **add_diff_hunks_into_diff_file** **(** :ref:`Dictionary<class_Dictionary>` diff_file, :ref:`Dictionary[]<class_Dictionary>` diff_hunks **)**
  200. Helper function to add an array of ``diff_hunks`` into a ``diff_file``.
  201. ----
  202. .. _class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk:
  203. - :ref:`Dictionary<class_Dictionary>` **add_line_diffs_into_diff_hunk** **(** :ref:`Dictionary<class_Dictionary>` diff_hunk, :ref:`Dictionary[]<class_Dictionary>` line_diffs **)**
  204. Helper function to add an array of ``line_diffs`` into a ``diff_hunk``.
  205. ----
  206. .. _class_EditorVCSInterface_method_create_commit:
  207. - :ref:`Dictionary<class_Dictionary>` **create_commit** **(** :ref:`String<class_String>` msg, :ref:`String<class_String>` author, :ref:`String<class_String>` id, :ref:`int<class_int>` unix_timestamp, :ref:`int<class_int>` offset_minutes **)**
  208. 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.
  209. ----
  210. .. _class_EditorVCSInterface_method_create_diff_file:
  211. - :ref:`Dictionary<class_Dictionary>` **create_diff_file** **(** :ref:`String<class_String>` new_file, :ref:`String<class_String>` old_file **)**
  212. Helper function to create a ``Dictionary`` for storing old and new diff file paths.
  213. ----
  214. .. _class_EditorVCSInterface_method_create_diff_hunk:
  215. - :ref:`Dictionary<class_Dictionary>` **create_diff_hunk** **(** :ref:`int<class_int>` old_start, :ref:`int<class_int>` new_start, :ref:`int<class_int>` old_lines, :ref:`int<class_int>` new_lines **)**
  216. Helper function to create a ``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.
  217. ----
  218. .. _class_EditorVCSInterface_method_create_diff_line:
  219. - :ref:`Dictionary<class_Dictionary>` **create_diff_line** **(** :ref:`int<class_int>` new_line_no, :ref:`int<class_int>` old_line_no, :ref:`String<class_String>` content, :ref:`String<class_String>` status **)**
  220. Helper function to create a ``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.
  221. ----
  222. .. _class_EditorVCSInterface_method_create_status_file:
  223. - :ref:`Dictionary<class_Dictionary>` **create_status_file** **(** :ref:`String<class_String>` file_path, :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` change_type, :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` area **)**
  224. Helper function to create a ``Dictionary`` used by editor to read the status of a file.
  225. ----
  226. .. _class_EditorVCSInterface_method_popup_error:
  227. - void **popup_error** **(** :ref:`String<class_String>` msg **)**
  228. Pops up an error message in the edior which is shown as coming from the underlying VCS. Use this to show VCS specific error messages.
  229. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  230. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  231. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  232. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  233. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  234. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`