pijul_org / pijul

#320 Apply expects GZ input by default but Patch doesn't produce GZ by default.

Opened by chakrit, on October 22, 2018
Open
chakrit commented on October 22, 2018

This is a bit of a double-whammy:\r +

  1. pijul patch does not output GZipped-patch by default but...\r +
  2. pijul apply requires GZipped-patch on standard input, and will simply silently fails otherwise.\r+ \r + Here is an SH script that'll test it:\r + \r +
#!/bin/sh\r                                                                                           +
\r                                                                                                    +
set -e\r                                                                                              +
rm -r pijalpha pijbeta\r                                                                              +
\r                                                                                                    +
mkdir pijalpha\r                                                                                      +
\r                                                                                                    +
cd pijalpha\r                                                                                         +
pijul init\r                                                                                          +
echo "hello" > hello.txt\r                                                                            +
pijul add hello.txt\r                                                                                 +
pijul record -a -A "Chakrit" -m "initial patch"\r                                                     +
\r                                                                                                    +
cd ..\r                                                                                               +
mkdir pijbeta\r                                                                                       +
cd pijbeta\r                                                                                          +
pijul init\r                                                                                          +
cd ..\r                                                                                               +
\r                                                                                                    +
COMMIT=`pijul log --repository ./pijalpha --hash-only | tail -1 | cut -d: -f 1`\r                     +
echo $COMMIT\r                                                                                        +
pijul patch --repository ./pijalpha $COMMIT | \\r                                                     +
  pijul apply --repository ./pijbeta\r                                                                +
\r                                                                                                    +
pijul log --repository ./pijbeta # <-- This should show some patch, but none will be shown.\r         +
```\r                                                                                                 +
\r                                                                                                    +
I'm using Pijul 0.10.0\r                                                                              +

chakrit commented on October 22, 2018

Adding --bin makes it work, but this is unintuitive. If --bin is required, it should be required on apply as well. (Should that flag just be renamed --gzip ?!?)

pmeunier commented on October 22, 2018

Hi! Thanks for reporting. patch is indeed a misnomer for that command, as the information it outputs intersects, but does not include, the information required by apply.\r+ \r + This is a really good bug report, and I might even finally find the time to change this situation very soon.