Peach Tree DocumentationOverviewPeach Tree is a VSCode extension that allows users to interact with HTTP-based code repositories that operate a REST paradigm. Multiple applications/repositories can be configured simultaneously, and code can be handled depending on it's split between different directories (named structures). Setting up credentialsAfter installing Peach Tree, run the "Open Peach Tree Profile" command. Store all your credentials and settings in this file. Save and close the file to finalise the changes. Note you can use the string variable "{{tld}}" to switch between different top level domains during requests. Other configurable settings include: current_network_configurationPossible values are "normal" (use ".com" in place of "{{tld}}"), "vpn" (use ".local" in place of "{{tld}}") or "proxy" (use ".com" in place of "{{tld}}" and also route all requests via the proxy specified in the "proxy" property) use_save_function_to_uploadIf true, then whenever VSCode saves a file that was opened using Peach Tree, then the file will also be uploaded to the place that it came from. This setting requires VSCode to be rebooted when it is changed. auto_initialise_peachtree_on_startupIf true, then Peach Tree will automatically initialise when the extension is loaded by VSCode. If false, then you will need to run the "Initialise Peach Tree" command before you can use the extension. ask_for_extra_confirmation_before_uploadingIf true, then an extra confirmation is asked before uploading any code. NOTE: This does not apply when code is uploaded using the use_save_function_to_upload functionality as described above. verify_code_deletion_with_random_numberIf true, you will be asked to type a randomly generated number as confirmation before deleting any code. Switching ProfilesOnce you have added credentials to the file mentioned above, you can switch between different profiles/servers by using the "Switch Peach Tree Credentials" command (by default this is assigned the hotkey "ctrl+shift+L"). Invalid Servername causing ERR_TLS_CERT_ALTNAME_INVALIDIf the servers SSL/TLS certificate alt names do not match the host of the request you are making, you will need to specify this manually be adding a property in the affected profile with the key "servername" and value equal to the host you'd expect to fin in the certificate. Most of the time this value is calculated automatically (by using the value of "{{tld}}" in the baseurl) but this extra property provides a way for you to override it. App ConfigBefore you can use Peach Tree, you need to define the endpoints for your repository. These are stored in a file similar to your profiles mentioned above. Run the "Open Peach Tree Config" command. You can currently have up to three apps/views, and an unlimited number of codebases in each one. Store the endpoints relating to your repository in here before saving and finalise any changes. Opening CodeThere are two methods for opening code:
Uploading codeTo upload code you can run the "Upload Code" command while having it open in the current editor. Depending on the type of code, one of three things will happen: If the code was originally opened by Peach Tree and it comes from a codebase that does not use structures:You will be prompted to check that you definitely want to update this code. If you select yes then the code will be reuploaded to the codebase and replace the piece of code that has the same name. If the code was originally opened by Peach Tree and it comes from a codebase that does use structures:You will be prompted which of the currently active structures you want to upload this code to. The code will then be reuploaded to each structure and replace the code that has the same name in each instance. If no code with that name exists in that structure then it is created with the same name. If the code was not opened by Peach Tree:The code will be uploaded as a new piece of code. You will be asked which app/codebase it should be uploaded to, as well as being asked a new for the new piece of code Active StructuresAs mentioned above you will need to mark certain structures as "active", to do this click on the small "toggle" icon that appears when you hover over a structure Deleting CodeYou can delete code from a repository by right-clicking it Resetting Tress/CodebasesIf something goes wrong, most problems can be fixed by clicking the "refresh icon" on a particular codebase or tree. However, if something REALLY goes wrong, you can restart the entire extension by running the "Initialise Peach Tree" command. SyncingIn codebases that use structures, you can use syncs to bulk-download and re-upload code from one structure to another. To do this:
Advanced SyncingAdvanced syncing works exactly the same way as above, except when generating the SyncFile you will be asked a few extra questions. You can set up an Advanced Sync by right-clicking on the "Structures" root node in the Peach Tree extension and choosing the correpsonding option.
Restore SyncingWhen performing an Adavnced Sync, you will be prompted to provide a unix timestamp relating to the time to want to download the code from. The sync works in exactly the same way, but when building the SyncFile it will provide instructions for a particular revision of the code to be used, as it appeared at the provided unix timestamp. However note, no code will be restored if it has been deleted after the provided unix timestamp. Therefore, only code that currently exists in the source structure will be uploaded to the destination structure, albeit a previous revision will be used. Do not use the "Restore Sync" feature unless you fully understand the ramifications of this and what problems it may cause. |