Fossil

Diff
Login

Differences From Artifact [e9c8a4d066]:

To Artifact [408e1e00d7]:


1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25




26
27
28
29
30
31
32
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36









-
+















+
+
+
+







# The "fossil patch" command

The "[fossil patch](/help?cmd=patch)" command is designed to transfer
uncommitted changes from one check-out to another, including transfering
those changes to other machines.

For example, if you are working on a Windows desktop and you want to
test your changes on a Linux server before you commit, you can use the
"fossil patch push" command to make a copy of all your changes on the
remote Linux server, where they can be tested.
remote Linux server:

>  fossil patch push linuxserver:/path/to/checkout

In the previous "linuxserver" is the name of the remote machine and
"/path/to/checkout" is an existing checkout directory for the same project
on the remote machine.

The "fossil patch push" command works by first creating a patch file,
then transfering that patch file to the remote machine using "ssh", then
applying the patch.  If you do not have ssh available, you can break these
steps apart as follows:

  1.  On the local machine: `fossil patch create mypatch.patch`
  2.  Move "mypatch.patch" to the remote machine.
  3.  On the remote machine: `fossil patch apply mypatch.patch`

Step 2 can be accomplished by a variety of means including
posting the mypatch.patch file on [chat](./chat.md) or sending
it as an email attachment.

## Setup

The "fossil push" and "fossil pull" commands will only work if you have
"ssh" available on the local machine and if "fossil" is on the default
PATH on the remote machine.

60
61
62
63
64
65
66
67

68
69
70
71
72
73
74
64
65
66
67
68
69
70

71
72
73
74
75
76
77
78







-
+








Is equivalent to:

> `fossil patch create - | ssh -T remote 'cd projectA;fossil patch apply -'`

Likewise, a command like this:

> `fossil patch pull remote:projB
> `fossil patch pull remote:projB`

Could be entered like this:

> `ssh -T remote 'cd projB;fossil patch create -' | fossil patch apply -`

The "fossil patch view" command just opens the database file and prints
a summary of its contents on standard output.