[Gambas-user] Patch
Tobias Boege
tobs at taboege.de
Mon Jun 7 19:42:31 CEST 2021
On Mon, 07 Jun 2021, John Dovey wrote:
> Hi,
> I have searched in vain for any docs on the patch mechanism in the IDE. Can
> someone point me in the right direction? I want to know how it is designed
> to be used.
>
A patch in the IDE is a *source code* patch as generated by the diff(1)
utility and applied by the patch(1) utility (or `git diff` and `git apply`).
Patches are created with respect to old versions of the current project.
You open your project and click Patch » Create. You navigate to wherever
you store the tar.gz archives of the old versions of your project and
select one of them. When you click Next, the patch will be created and
displayed. You can choose which parts to include. Then you save the
patch file. This patch describes how to upgrade the old version from the
tar.gz archive you selected to the current state of the project you have
loaded in your IDE.
You can email this patch file to anyone who still has the old version
of your project. They would open their (old) project in the IDE and click
Patch » Apply. They select the patch file and click on the Apply button.
This applies the patch and reloads the project. If they ever want to go
back from the new to the old version, they can load the patch again and
click Revert.
I attached you the tar.gz of version 0.0.1 of a test project and a patch
which upgrades your version 0.0.1 to my current 0.0.2. Try it out.
Best,
Tobias
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gambastest-0.0.1.tar.gz
Type: application/gzip
Size: 11401 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210607/deb798bb/attachment-0001.gz>
-------------- next part --------------
diff -urNaX /tmp/gambas-patch-ignore a/.project b/.project
--- a/.project 2021-06-07 19:29:22.000000000 +0200
+++ b/.project 2021-06-07 19:31:58.000000000 +0200
@@ -1,6 +1,6 @@
# Gambas Project File 3.0
Startup=Main
-Version=0.0.1
+Version=0.0.2
TabSize=2
Language=en_US
SourcePath=/tmp
diff -urNaX /tmp/gambas-patch-ignore a/.src/Class1.class b/.src/Class1.class
--- a/.src/Class1.class 1970-01-01 01:00:00.000000000 +0100
+++ b/.src/Class1.class 2021-06-07 19:29:46.000000000 +0200
@@ -0,0 +1,7 @@
+' Gambas class file
+
+Public Sub _new()
+
+ Print "New!"
+
+End
diff -urNaX /tmp/gambas-patch-ignore a/.src/Main.module b/.src/Main.module
--- a/.src/Main.module 2021-06-07 19:29:01.000000000 +0200
+++ b/.src/Main.module 2021-06-07 19:29:29.000000000 +0200
@@ -2,6 +2,6 @@
Public Sub Main()
- Print "Hello world"
+ Print "Hallo Welt"
End
More information about the User
mailing list