File
www/patchcmd.md
— part of check-in
[006b61b0]
at
2024-02-18 15:15:18
on branch trunk
— Replaced use of MD blockquotes for command examples with MD code blocks.
(user:
wyoung
size: 3932)
[more...]
0000: 23 20 54 68 65 20 22 66 6f 73 73 69 6c 20 70 61 # The "fossil pa
0010: 74 63 68 22 20 63 6f 6d 6d 61 6e 64 0a 0a 54 68 tch" command..Th
0020: 65 20 22 5b 66 6f 73 73 69 6c 20 70 61 74 63 68 e "[fossil patch
0030: 5d 28 2f 68 65 6c 70 3f 63 6d 64 3d 70 61 74 63 ](/help?cmd=patc
0040: 68 29 22 20 63 6f 6d 6d 61 6e 64 20 69 73 20 64 h)" command is d
0050: 65 73 69 67 6e 65 64 20 74 6f 20 74 72 61 6e 73 esigned to trans
0060: 66 65 72 0a 75 6e 63 6f 6d 6d 69 74 74 65 64 20 fer.uncommitted
0070: 63 68 61 6e 67 65 73 20 66 72 6f 6d 20 6f 6e 65 changes from one
0080: 20 63 68 65 63 6b 2d 6f 75 74 20 74 6f 20 61 6e check-out to an
0090: 6f 74 68 65 72 2c 20 69 6e 63 6c 75 64 69 6e 67 other, including
00a0: 20 74 72 61 6e 73 66 65 72 69 6e 67 0a 74 68 6f transfering.tho
00b0: 73 65 20 63 68 61 6e 67 65 73 20 74 6f 20 6f 74 se changes to ot
00c0: 68 65 72 20 6d 61 63 68 69 6e 65 73 2e 0a 0a 46 her machines...F
00d0: 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 79 or example, if y
00e0: 6f 75 20 61 72 65 20 77 6f 72 6b 69 6e 67 20 6f ou are working o
00f0: 6e 20 61 20 57 69 6e 64 6f 77 73 20 64 65 73 6b n a Windows desk
0100: 74 6f 70 20 61 6e 64 20 79 6f 75 20 77 61 6e 74 top and you want
0110: 20 74 6f 0a 74 65 73 74 20 79 6f 75 72 20 63 68 to.test your ch
0120: 61 6e 67 65 73 20 6f 6e 20 61 20 4c 69 6e 75 78 anges on a Linux
0130: 20 73 65 72 76 65 72 20 62 65 66 6f 72 65 20 79 server before y
0140: 6f 75 20 63 6f 6d 6d 69 74 2c 20 79 6f 75 20 63 ou commit, you c
0150: 61 6e 20 75 73 65 20 74 68 65 0a 22 66 6f 73 73 an use the."foss
0160: 69 6c 20 70 61 74 63 68 20 70 75 73 68 22 20 63 il patch push" c
0170: 6f 6d 6d 61 6e 64 20 74 6f 20 6d 61 6b 65 20 61 ommand to make a
0180: 20 63 6f 70 79 20 6f 66 20 61 6c 6c 20 79 6f 75 copy of all you
0190: 72 20 63 68 61 6e 67 65 73 20 6f 6e 20 74 68 65 r changes on the
01a0: 0a 72 65 6d 6f 74 65 20 4c 69 6e 75 78 20 73 65 .remote Linux se
01b0: 72 76 65 72 3a 0a 0a 20 20 20 66 6f 73 73 69 6c rver:.. fossil
01c0: 20 70 61 74 63 68 20 70 75 73 68 20 6c 69 6e 75 patch push linu
01d0: 78 73 65 72 76 65 72 3a 2f 70 61 74 68 2f 74 6f xserver:/path/to
01e0: 2f 63 68 65 63 6b 6f 75 74 0a 0a 49 6e 20 74 68 /checkout..In th
01f0: 65 20 70 72 65 76 69 6f 75 73 20 22 6c 69 6e 75 e previous "linu
0200: 78 73 65 72 76 65 72 22 20 69 73 20 74 68 65 20 xserver" is the
0210: 6e 61 6d 65 20 6f 66 20 74 68 65 20 72 65 6d 6f name of the remo
0220: 74 65 20 6d 61 63 68 69 6e 65 20 61 6e 64 0a 22 te machine and."
0230: 2f 70 61 74 68 2f 74 6f 2f 63 68 65 63 6b 6f 75 /path/to/checkou
0240: 74 22 20 69 73 20 61 6e 20 65 78 69 73 74 69 6e t" is an existin
0250: 67 20 63 68 65 63 6b 6f 75 74 20 64 69 72 65 63 g checkout direc
0260: 74 6f 72 79 20 66 6f 72 20 74 68 65 20 73 61 6d tory for the sam
0270: 65 20 70 72 6f 6a 65 63 74 0a 6f 6e 20 74 68 65 e project.on the
0280: 20 72 65 6d 6f 74 65 20 6d 61 63 68 69 6e 65 2e remote machine.
0290: 0a 0a 54 68 65 20 22 66 6f 73 73 69 6c 20 70 61 ..The "fossil pa
02a0: 74 63 68 20 70 75 73 68 22 20 63 6f 6d 6d 61 6e tch push" comman
02b0: 64 20 77 6f 72 6b 73 20 62 79 20 66 69 72 73 74 d works by first
02c0: 20 63 72 65 61 74 69 6e 67 20 61 20 70 61 74 63 creating a patc
02d0: 68 20 66 69 6c 65 2c 0a 74 68 65 6e 20 74 72 61 h file,.then tra
02e0: 6e 73 66 65 72 69 6e 67 20 74 68 61 74 20 70 61 nsfering that pa
02f0: 74 63 68 20 66 69 6c 65 20 74 6f 20 74 68 65 20 tch file to the
0300: 72 65 6d 6f 74 65 20 6d 61 63 68 69 6e 65 20 75 remote machine u
0310: 73 69 6e 67 20 22 73 73 68 22 2c 20 74 68 65 6e sing "ssh", then
0320: 0a 61 70 70 6c 79 69 6e 67 20 74 68 65 20 70 61 .applying the pa
0330: 74 63 68 2e 20 20 49 66 20 79 6f 75 20 64 6f 20 tch. If you do
0340: 6e 6f 74 20 68 61 76 65 20 73 73 68 20 61 76 61 not have ssh ava
0350: 69 6c 61 62 6c 65 2c 20 79 6f 75 20 63 61 6e 20 ilable, you can
0360: 62 72 65 61 6b 20 74 68 65 73 65 0a 73 74 65 70 break these.step
0370: 73 20 61 70 61 72 74 20 61 73 20 66 6f 6c 6c 6f s apart as follo
0380: 77 73 3a 0a 0a 20 20 31 2e 20 20 4f 6e 20 74 68 ws:.. 1. On th
0390: 65 20 6c 6f 63 61 6c 20 6d 61 63 68 69 6e 65 3a e local machine:
03a0: 20 60 66 6f 73 73 69 6c 20 70 61 74 63 68 20 63 `fossil patch c
03b0: 72 65 61 74 65 20 6d 79 70 61 74 63 68 2e 70 61 reate mypatch.pa
03c0: 74 63 68 60 0a 20 20 32 2e 20 20 4d 6f 76 65 20 tch`. 2. Move
03d0: 22 6d 79 70 61 74 63 68 2e 70 61 74 63 68 22 20 "mypatch.patch"
03e0: 74 6f 20 74 68 65 20 72 65 6d 6f 74 65 20 6d 61 to the remote ma
03f0: 63 68 69 6e 65 2e 0a 20 20 33 2e 20 20 4f 6e 20 chine.. 3. On
0400: 74 68 65 20 72 65 6d 6f 74 65 20 6d 61 63 68 69 the remote machi
0410: 6e 65 3a 20 60 66 6f 73 73 69 6c 20 70 61 74 63 ne: `fossil patc
0420: 68 20 61 70 70 6c 79 20 6d 79 70 61 74 63 68 2e h apply mypatch.
0430: 70 61 74 63 68 60 0a 0a 53 74 65 70 20 32 20 63 patch`..Step 2 c
0440: 61 6e 20 62 65 20 61 63 63 6f 6d 70 6c 69 73 68 an be accomplish
0450: 65 64 20 62 79 20 61 20 76 61 72 69 65 74 79 20 ed by a variety
0460: 6f 66 20 6d 65 61 6e 73 20 69 6e 63 6c 75 64 69 of means includi
0470: 6e 67 0a 70 6f 73 74 69 6e 67 20 74 68 65 20 6d ng.posting the m
0480: 79 70 61 74 63 68 2e 70 61 74 63 68 20 66 69 6c ypatch.patch fil
0490: 65 20 6f 6e 20 5b 63 68 61 74 5d 28 2e 2f 63 68 e on [chat](./ch
04a0: 61 74 2e 6d 64 29 20 6f 72 20 73 65 6e 64 69 6e at.md) or sendin
04b0: 67 0a 69 74 20 61 73 20 61 6e 20 65 6d 61 69 6c g.it as an email
04c0: 20 61 74 74 61 63 68 6d 65 6e 74 2e 0a 0a 23 23 attachment...##
04d0: 20 53 65 74 75 70 0a 0a 54 68 65 20 22 66 6f 73 Setup..The "fos
04e0: 73 69 6c 20 70 61 74 63 68 20 70 75 73 68 22 20 sil patch push"
04f0: 61 6e 64 20 22 66 6f 73 73 69 6c 20 70 61 74 63 and "fossil patc
0500: 68 20 70 75 6c 6c 22 20 63 6f 6d 6d 61 6e 64 73 h pull" commands
0510: 20 77 69 6c 6c 20 6f 6e 6c 79 20 77 6f 72 6b 20 will only work
0520: 69 66 20 79 6f 75 20 68 61 76 65 0a 22 73 73 68 if you have."ssh
0530: 22 20 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 74 " available on t
0540: 68 65 20 6c 6f 63 61 6c 20 6d 61 63 68 69 6e 65 he local machine
0550: 20 61 6e 64 20 69 66 20 22 66 6f 73 73 69 6c 22 and if "fossil"
0560: 20 69 73 20 6f 6e 20 74 68 65 20 64 65 66 61 75 is on the defau
0570: 6c 74 0a 50 41 54 48 20 6f 6e 20 74 68 65 20 72 lt.PATH on the r
0580: 65 6d 6f 74 65 20 6d 61 63 68 69 6e 65 2e 0a 0a emote machine...
0590: 54 6f 20 63 68 65 63 6b 20 69 66 20 46 6f 73 73 To check if Foss
05a0: 69 6c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 20 il is installed
05b0: 63 6f 72 72 65 63 74 6c 79 20 6f 6e 20 74 68 65 correctly on the
05c0: 20 72 65 6d 6f 74 65 2c 20 74 72 79 20 61 20 63 remote, try a c
05d0: 6f 6d 6d 61 6e 64 0a 6c 69 6b 65 20 74 68 69 73 ommand.like this
05e0: 3a 0a 0a 20 20 20 20 73 73 68 20 2d 54 20 72 65 :.. ssh -T re
05f0: 6d 6f 74 65 20 22 66 6f 73 73 69 6c 20 76 65 72 mote "fossil ver
0600: 73 69 6f 6e 22 0a 0a 49 66 20 74 68 65 20 63 6f sion"..If the co
0610: 6d 6d 61 6e 64 20 61 62 6f 76 65 20 73 68 6f 77 mmand above show
0620: 73 20 61 20 72 65 63 65 6e 74 20 76 65 72 73 69 s a recent versi
0630: 6f 6e 20 6f 66 20 46 6f 73 73 69 6c 2c 20 74 68 on of Fossil, th
0640: 65 6e 20 79 6f 75 20 73 68 6f 75 6c 64 20 62 65 en you should be
0650: 0a 73 65 74 20 74 6f 20 67 6f 2e 20 20 49 66 20 .set to go. If
0660: 79 6f 75 20 67 65 74 20 22 66 6f 73 73 69 6c 20 you get "fossil
0670: 6e 6f 74 20 66 6f 75 6e 64 22 2c 20 6f 72 20 69 not found", or i
0680: 66 20 74 68 65 20 76 65 72 73 69 6f 6e 20 73 68 f the version sh
0690: 6f 77 6e 20 69 73 20 74 6f 6f 0a 6f 6c 64 2c 20 own is too.old,
06a0: 70 75 74 20 61 20 6e 65 77 65 72 20 66 6f 73 73 put a newer foss
06b0: 69 6c 20 65 78 65 63 75 74 61 62 6c 65 20 6f 6e il executable on
06c0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 50 41 54 the default PAT
06d0: 48 2e 20 20 54 68 65 20 64 65 66 61 75 6c 74 20 H. The default
06e0: 50 41 54 48 0a 63 61 6e 20 62 65 20 73 68 6f 77 PATH.can be show
06f0: 6e 20 75 73 69 6e 67 3a 0a 0a 20 20 20 20 73 73 n using:.. ss
0700: 68 20 2d 54 20 72 65 6d 6f 74 65 20 27 65 63 68 h -T remote 'ech
0710: 6f 20 24 50 41 54 48 27 0a 0a 23 23 23 20 43 75 o $PATH'..### Cu
0720: 73 74 6f 6d 20 50 41 54 48 20 43 61 76 65 61 74 stom PATH Caveat
0730: 0a 0a 4f 6e 20 55 6e 69 78 2d 6c 69 6b 65 20 73 ..On Unix-like s
0740: 79 73 74 65 6d 73 2c 20 74 68 65 20 69 6e 69 74 ystems, the init
0750: 20 73 63 72 69 70 74 20 66 6f 72 20 74 68 65 20 script for the
0760: 75 73 65 72 27 73 20 6c 6f 67 69 6e 20 73 68 65 user's login she
0770: 6c 6c 0a 28 65 2e 67 2e 20 60 7e 2f 2e 70 72 6f ll.(e.g. `~/.pro
0780: 66 69 6c 65 60 20 6f 72 20 60 7e 2f 2e 62 61 73 file` or `~/.bas
0790: 68 5f 70 72 6f 66 69 6c 65 60 29 20 6d 61 79 20 h_profile`) may
07a0: 62 65 20 63 6f 6e 66 69 67 75 72 65 64 20 74 6f be configured to
07b0: 20 2a 6e 6f 74 20 64 6f 0a 61 6e 79 74 68 69 6e *not do.anythin
07c0: 67 2a 20 77 68 65 6e 20 72 75 6e 6e 69 6e 67 20 g* when running
07d0: 75 6e 64 65 72 20 61 20 6e 6f 6e 2d 69 6e 74 65 under a non-inte
07e0: 72 61 63 74 69 76 65 20 73 68 65 6c 6c 2e 20 54 ractive shell. T
07f0: 68 75 73 20 61 20 66 6f 73 73 69 6c 0a 62 69 6e hus a fossil.bin
0800: 61 72 79 20 69 6e 73 74 61 6c 6c 65 64 20 74 6f ary installed to
0810: 20 61 20 63 75 73 74 6f 6d 20 64 69 72 65 63 74 a custom direct
0820: 6f 72 79 20 6d 69 67 68 74 20 6e 6f 74 20 62 65 ory might not be
0830: 20 66 6f 75 6e 64 2e 20 54 6f 20 61 6c 6c 6f 77 found. To allow
0840: 0a 74 68 65 20 70 61 74 63 68 20 63 6f 6d 6d 61 .the patch comma
0850: 6e 64 20 74 6f 20 75 73 65 20 61 20 66 6f 73 73 nd to use a foss
0860: 69 6c 20 62 69 6e 61 72 79 20 69 6e 73 74 61 6c il binary instal
0870: 6c 65 64 20 69 6e 20 61 20 64 69 72 65 63 74 6f led in a directo
0880: 72 79 0a 77 68 69 63 68 20 69 73 20 6e 6f 72 6d ry.which is norm
0890: 61 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 ally added to th
08a0: 65 20 50 41 54 48 20 76 69 61 20 74 68 65 20 69 e PATH via the i
08b0: 6e 74 65 72 61 63 74 69 76 65 20 73 68 65 6c 6c nteractive shell
08c0: 27 73 20 69 6e 69 74 0a 73 63 72 69 70 74 2c 20 's init.script,
08d0: 69 74 20 6d 61 79 20 62 65 20 75 73 65 66 75 6c it may be useful
08e0: 20 74 6f 20 64 69 73 61 62 6c 65 20 74 68 61 74 to disable that
08f0: 20 63 68 65 63 6b 2e 20 46 6f 72 20 65 78 61 6d check. For exam
0900: 70 6c 65 2c 0a 55 62 75 6e 74 75 2d 64 65 72 69 ple,.Ubuntu-deri
0910: 76 65 64 20 73 79 73 74 65 6d 73 20 73 6f 6d 65 ved systems some
0920: 74 69 6d 65 73 20 73 74 61 72 74 20 74 68 65 69 times start thei
0930: 72 20 64 65 66 61 75 6c 74 20 60 2e 62 61 73 68 r default `.bash
0940: 72 63 60 20 77 69 74 68 0a 73 6f 6d 65 74 68 69 rc` with.somethi
0950: 6e 67 20 6c 69 6b 65 3a 0a 0a 60 60 60 0a 23 20 ng like:..```.#
0960: 49 66 20 6e 6f 74 20 72 75 6e 6e 69 6e 67 20 69 If not running i
0970: 6e 74 65 72 61 63 74 69 76 65 6c 79 2c 20 64 6f nteractively, do
0980: 6e 27 74 20 64 6f 20 61 6e 79 74 68 69 6e 67 3a n't do anything:
0990: 0a 5b 20 2d 7a 20 22 24 50 53 31 22 20 5d 20 26 .[ -z "$PS1" ] &
09a0: 26 20 72 65 74 75 72 6e 0a 23 20 4f 72 3a 0a 63 & return.# Or:.c
09b0: 61 73 65 20 24 2d 20 69 6e 0a 20 20 20 20 2a 69 ase $- in. *i
09c0: 2a 29 20 3b 3b 0a 20 20 20 20 2a 29 20 72 65 74 *) ;;. *) ret
09d0: 75 72 6e 3b 3b 0a 65 73 61 63 0a 60 60 60 0a 0a urn;;.esac.```..
09e0: 43 6f 6d 6d 65 6e 74 69 6e 67 20 6f 75 74 20 74 Commenting out t
09f0: 68 61 74 20 63 68 65 63 6b 20 77 69 6c 6c 20 61 hat check will a
0a00: 6c 6c 6f 77 20 74 68 65 20 70 61 74 63 68 20 63 llow the patch c
0a10: 6f 6d 6d 61 6e 64 20 74 6f 20 72 75 6e 2c 20 66 ommand to run, f
0a20: 6f 72 0a 65 78 61 6d 70 6c 65 2c 20 60 7e 2f 62 or.example, `~/b
0a30: 69 6e 2f 66 6f 73 73 69 6c 60 20 69 66 20 60 7e in/fossil` if `~
0a40: 2f 62 69 6e 60 20 69 73 20 61 64 64 65 64 20 74 /bin` is added t
0a50: 6f 20 74 68 65 20 50 41 54 48 20 76 69 61 20 74 o the PATH via t
0a60: 68 65 20 69 6e 69 74 0a 73 63 72 69 70 74 2e 20 he init.script.
0a70: 54 6f 20 64 69 73 61 62 6c 65 20 74 68 61 74 20 To disable that
0a80: 63 68 65 63 6b 20 2a 6f 6e 6c 79 2a 20 77 68 65 check *only* whe
0a90: 6e 20 74 68 65 20 73 68 65 6c 6c 20 69 73 20 2a n the shell is *
0aa0: 6e 6f 74 2a 20 72 75 6e 6e 69 6e 67 0a 6f 76 65 not* running.ove
0ab0: 72 20 61 6e 20 53 53 48 20 63 6f 6e 6e 65 63 74 r an SSH connect
0ac0: 69 6f 6e 2c 20 73 6f 6d 65 74 68 69 6e 67 20 6c ion, something l
0ad0: 69 6b 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e ike the followin
0ae0: 67 20 73 68 6f 75 6c 64 20 73 75 66 66 69 63 65 g should suffice
0af0: 3a 0a 0a 60 60 60 0a 69 66 20 5b 20 2d 7a 20 22 :..```.if [ -z "
0b00: 24 53 53 48 5f 43 4f 4e 4e 45 43 54 49 4f 4e 22 $SSH_CONNECTION"
0b10: 20 5d 3b 20 74 68 65 6e 0a 20 20 23 20 2e 2e 2e ]; then. # ...
0b20: 20 74 68 65 20 69 73 2d 69 6e 74 65 72 61 63 74 the is-interact
0b30: 69 76 65 20 63 68 65 63 6b 20 67 6f 65 73 20 68 ive check goes h
0b40: 65 72 65 20 2e 2e 2e 0a 66 69 0a 60 60 60 0a 0a ere ....fi.```..
0b50: 0a 23 23 20 49 6d 70 6c 65 6d 65 6e 74 61 74 69 .## Implementati
0b60: 6f 6e 20 44 65 74 61 69 6c 73 0a 0a 54 68 65 20 on Details..The
0b70: 22 66 6f 73 73 69 6c 20 70 61 74 63 68 20 63 72 "fossil patch cr
0b80: 65 61 74 65 22 20 63 6f 6d 6d 61 6e 64 20 72 65 eate" command re
0b90: 63 6f 72 64 73 20 61 6c 6c 20 6f 66 20 74 68 65 cords all of the
0ba0: 20 6c 6f 63 61 6c 2c 20 75 6e 63 6f 6d 6d 69 74 local, uncommit
0bb0: 74 65 64 0a 63 68 61 6e 67 65 73 20 69 6e 20 61 ted.changes in a
0bc0: 6e 20 53 51 4c 69 74 65 20 64 61 74 61 62 61 73 n SQLite databas
0bd0: 65 20 66 69 6c 65 2e 20 20 49 66 20 74 68 65 20 e file. If the
0be0: 61 72 67 75 6d 65 6e 74 20 74 6f 20 22 66 6f 73 argument to "fos
0bf0: 73 69 6c 20 70 61 74 63 68 20 63 72 65 61 74 65 sil patch create
0c00: 22 0a 69 73 20 61 20 66 69 6c 65 6e 61 6d 65 2c ".is a filename,
0c10: 20 74 68 65 6e 20 74 68 65 20 70 61 74 63 68 2d then the patch-
0c20: 66 69 6c 65 20 64 61 74 61 62 61 73 65 20 69 73 file database is
0c30: 20 77 72 69 74 74 65 6e 20 69 6e 74 6f 20 74 68 written into th
0c40: 61 74 20 66 69 6c 65 2e 0a 49 66 20 74 68 65 20 at file..If the
0c50: 61 72 67 75 6d 65 6e 74 20 69 73 20 22 2d 22 20 argument is "-"
0c60: 74 68 65 6e 20 74 68 65 20 64 61 74 61 62 61 73 then the databas
0c70: 65 20 69 73 20 77 72 69 74 74 65 6e 20 6f 6e 20 e is written on
0c80: 73 74 61 6e 64 61 72 64 20 6f 75 74 70 75 74 2e standard output.
0c90: 0a 0a 54 68 65 20 22 66 6f 73 73 69 6c 20 70 61 ..The "fossil pa
0ca0: 74 63 68 20 61 70 70 6c 79 22 20 63 6f 6d 6d 61 tch apply" comma
0cb0: 6e 64 20 72 65 61 64 73 20 74 68 65 20 64 61 74 nd reads the dat
0cc0: 61 62 61 73 65 20 74 68 61 74 20 69 73 20 74 68 abase that is th
0cd0: 65 20 70 61 74 63 68 20 66 69 6c 65 0a 61 6e 64 e patch file.and
0ce0: 20 61 70 70 6c 69 65 73 20 69 74 20 74 6f 20 74 applies it to t
0cf0: 68 65 20 6c 6f 63 61 6c 20 63 68 65 63 6b 2d 6f he local check-o
0d00: 75 74 2e 20 20 49 66 20 61 20 66 69 6c 65 6e 61 ut. If a filena
0d10: 6d 65 20 69 73 20 67 69 76 65 6e 20 61 73 20 61 me is given as a
0d20: 6e 0a 61 72 67 75 6d 65 6e 74 2c 20 74 68 65 6e n.argument, then
0d30: 20 74 68 65 20 64 61 74 61 62 61 73 65 20 69 73 the database is
0d40: 20 72 65 61 64 20 66 72 6f 6d 20 74 68 61 74 20 read from that
0d50: 66 69 6c 65 2e 20 20 49 66 20 74 68 65 20 61 72 file. If the ar
0d60: 67 75 6d 65 6e 74 20 69 73 20 22 2d 22 0a 74 68 gument is "-".th
0d70: 65 6e 20 74 68 65 20 64 61 74 61 62 61 73 65 20 en the database
0d80: 69 73 20 72 65 61 64 20 66 72 6f 6d 20 73 74 61 is read from sta
0d90: 6e 64 61 72 64 20 69 6e 70 75 74 2e 0a 0a 48 65 ndard input...He
0da0: 6e 63 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64 3a nce the command:
0db0: 0a 0a 20 20 20 20 66 6f 73 73 69 6c 20 70 61 74 .. fossil pat
0dc0: 63 68 20 70 75 73 68 20 72 65 6d 6f 74 65 3a 70 ch push remote:p
0dd0: 72 6f 6a 65 63 74 41 0a 0a 49 73 20 65 71 75 69 rojectA..Is equi
0de0: 76 61 6c 65 6e 74 20 74 6f 3a 0a 0a 20 20 20 20 valent to:..
0df0: 66 6f 73 73 69 6c 20 70 61 74 63 68 20 63 72 65 fossil patch cre
0e00: 61 74 65 20 2d 20 7c 20 73 73 68 20 2d 54 20 72 ate - | ssh -T r
0e10: 65 6d 6f 74 65 20 27 63 64 20 70 72 6f 6a 65 63 emote 'cd projec
0e20: 74 41 3b 66 6f 73 73 69 6c 20 70 61 74 63 68 20 tA;fossil patch
0e30: 61 70 70 6c 79 20 2d 27 0a 0a 4c 69 6b 65 77 69 apply -'..Likewi
0e40: 73 65 2c 20 61 20 63 6f 6d 6d 61 6e 64 20 6c 69 se, a command li
0e50: 6b 65 20 74 68 69 73 3a 0a 0a 20 20 20 20 66 6f ke this:.. fo
0e60: 73 73 69 6c 20 70 61 74 63 68 20 70 75 6c 6c 20 ssil patch pull
0e70: 72 65 6d 6f 74 65 3a 70 72 6f 6a 42 0a 0a 43 6f remote:projB..Co
0e80: 75 6c 64 20 62 65 20 65 6e 74 65 72 65 64 20 6c uld be entered l
0e90: 69 6b 65 20 74 68 69 73 3a 0a 0a 20 20 20 20 73 ike this:.. s
0ea0: 73 68 20 2d 54 20 72 65 6d 6f 74 65 20 27 63 64 sh -T remote 'cd
0eb0: 20 70 72 6f 6a 42 3b 66 6f 73 73 69 6c 20 70 61 projB;fossil pa
0ec0: 74 63 68 20 63 72 65 61 74 65 20 2d 27 20 7c 20 tch create -' |
0ed0: 66 6f 73 73 69 6c 20 70 61 74 63 68 20 61 70 70 fossil patch app
0ee0: 6c 79 20 2d 0a 0a 54 68 65 20 22 66 6f 73 73 69 ly -..The "fossi
0ef0: 6c 20 70 61 74 63 68 20 76 69 65 77 22 20 63 6f l patch view" co
0f00: 6d 6d 61 6e 64 20 6a 75 73 74 20 6f 70 65 6e 73 mmand just opens
0f10: 20 74 68 65 20 64 61 74 61 62 61 73 65 20 66 69 the database fi
0f20: 6c 65 20 61 6e 64 20 70 72 69 6e 74 73 0a 61 20 le and prints.a
0f30: 73 75 6d 6d 61 72 79 20 6f 66 20 69 74 73 20 63 summary of its c
0f40: 6f 6e 74 65 6e 74 73 20 6f 6e 20 73 74 61 6e 64 ontents on stand
0f50: 61 72 64 20 6f 75 74 70 75 74 2e 0a ard output..