tests/test-patchbomb.t
changeset 40969 55fcdb73c88b
parent 39707 5abc47d4ca6b
child 43019 2cc453284d5c
equal deleted inserted replaced
40968:74f41329bf55 40969:55fcdb73c88b
    20   >     if not trim(l) and skipblank:
    20   >     if not trim(l) and skipblank:
    21   >         continue
    21   >         continue
    22   >     skipblank = False
    22   >     skipblank = False
    23   >     print(l, end='')
    23   >     print(l, end='')
    24   > EOF
    24   > EOF
    25   $ FILTERBOUNDARY="$PYTHON `pwd`/prune-blank-after-boundary.py"
    25   $ filterboundary() {
       
    26   >     "$PYTHON" "$TESTTMP/prune-blank-after-boundary.py"
       
    27   > }
    26   $ echo "[extensions]" >> $HGRCPATH
    28   $ echo "[extensions]" >> $HGRCPATH
    27   $ echo "patchbomb=" >> $HGRCPATH
    29   $ echo "patchbomb=" >> $HGRCPATH
    28 
    30 
    29   $ hg init t
    31   $ hg init t
    30   $ cd t
    32   $ cd t
   355   > EOF
   357   > EOF
   356 
   358 
   357 
   359 
   358 test bundle and description:
   360 test bundle and description:
   359   $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
   361   $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
   360   >  -c bar -s test -r tip -b --desc description | $FILTERBOUNDARY
   362   >  -c bar -s test -r tip -b --desc description | filterboundary
   361   searching for changes
   363   searching for changes
   362   1 changesets found
   364   1 changesets found
   363   
   365   
   364   displaying test ...
   366   displaying test ...
   365   Content-Type: multipart/mixed; boundary="===*==" (glob)
   367   Content-Type: multipart/mixed; boundary="===*==" (glob)
   401 with a specific bundle type
   403 with a specific bundle type
   402 (binary part must be different)
   404 (binary part must be different)
   403 
   405 
   404   $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
   406   $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
   405   >  -c bar -s test -r tip -b --desc description \
   407   >  -c bar -s test -r tip -b --desc description \
   406   > --config patchbomb.bundletype=gzip-v1 | $FILTERBOUNDARY
   408   > --config patchbomb.bundletype=gzip-v1 | filterboundary
   407   searching for changes
   409   searching for changes
   408   1 changesets found
   410   1 changesets found
   409   
   411   
   410   displaying test ...
   412   displaying test ...
   411   Content-Type: multipart/mixed; boundary="===*==" (glob)
   413   Content-Type: multipart/mixed; boundary="===*==" (glob)
   882   @@ -0,0 +1,1 @@
   884   @@ -0,0 +1,1 @@
   883   +b
   885   +b
   884   
   886   
   885 
   887 
   886 test inline for single patch:
   888 test inline for single patch:
   887   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | $FILTERBOUNDARY
   889   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | filterboundary
   888   this patch series consists of 1 patches.
   890   this patch series consists of 1 patches.
   889   
   891   
   890   
   892   
   891   displaying [PATCH] test ...
   893   displaying [PATCH] test ...
   892   Content-Type: multipart/mixed; boundary="===*==" (glob)
   894   Content-Type: multipart/mixed; boundary="===*==" (glob)
   925   
   927   
   926   --===*=-- (glob)
   928   --===*=-- (glob)
   927 
   929 
   928 
   930 
   929 test inline for single patch (quoted-printable):
   931 test inline for single patch (quoted-printable):
   930   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | $FILTERBOUNDARY
   932   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | filterboundary
   931   this patch series consists of 1 patches.
   933   this patch series consists of 1 patches.
   932   
   934   
   933   
   935   
   934   displaying [PATCH] test ...
   936   displaying [PATCH] test ...
   935   Content-Type: multipart/mixed; boundary="===*==" (glob)
   937   Content-Type: multipart/mixed; boundary="===*==" (glob)
   984   
   986   
   985   --===*=-- (glob)
   987   --===*=-- (glob)
   986 
   988 
   987 test inline for multiple patches:
   989 test inline for multiple patches:
   988   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
   990   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
   989   >  -r 0:1 -r 4 | $FILTERBOUNDARY
   991   >  -r 0:1 -r 4 | filterboundary
   990   this patch series consists of 3 patches.
   992   this patch series consists of 3 patches.
   991   
   993   
   992   
   994   
   993   Write the introductory message for the patch series.
   995   Write the introductory message for the patch series.
   994   
   996   
  1136   +bar
  1138   +bar
  1137   
  1139   
  1138   --===*=-- (glob)
  1140   --===*=-- (glob)
  1139 
  1141 
  1140 test attach for single patch:
  1142 test attach for single patch:
  1141   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | $FILTERBOUNDARY
  1143   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | filterboundary
  1142   this patch series consists of 1 patches.
  1144   this patch series consists of 1 patches.
  1143   
  1145   
  1144   
  1146   
  1145   displaying [PATCH] test ...
  1147   displaying [PATCH] test ...
  1146   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1148   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1187   +c
  1189   +c
  1188   
  1190   
  1189   --===*=-- (glob)
  1191   --===*=-- (glob)
  1190 
  1192 
  1191 test attach for single patch (quoted-printable):
  1193 test attach for single patch (quoted-printable):
  1192   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | $FILTERBOUNDARY
  1194   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | filterboundary
  1193   this patch series consists of 1 patches.
  1195   this patch series consists of 1 patches.
  1194   
  1196   
  1195   
  1197   
  1196   displaying [PATCH] test ...
  1198   displaying [PATCH] test ...
  1197   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1199   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1254   +bar
  1256   +bar
  1255   
  1257   
  1256   --===*=-- (glob)
  1258   --===*=-- (glob)
  1257 
  1259 
  1258 test attach and body for single patch:
  1260 test attach and body for single patch:
  1259   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2 | $FILTERBOUNDARY
  1261   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2 | filterboundary
  1260   this patch series consists of 1 patches.
  1262   this patch series consists of 1 patches.
  1261   
  1263   
  1262   
  1264   
  1263   displaying [PATCH] test ...
  1265   displaying [PATCH] test ...
  1264   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1266   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1316   
  1318   
  1317   --===*=-- (glob)
  1319   --===*=-- (glob)
  1318 
  1320 
  1319 test attach for multiple patches:
  1321 test attach for multiple patches:
  1320   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
  1322   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
  1321   >  -r 0:1 -r 4 | $FILTERBOUNDARY
  1323   >  -r 0:1 -r 4 | filterboundary
  1322   this patch series consists of 3 patches.
  1324   this patch series consists of 3 patches.
  1323   
  1325   
  1324   
  1326   
  1325   Write the introductory message for the patch series.
  1327   Write the introductory message for the patch series.
  1326   
  1328   
  1773   $ hg tag -r1 one one.patch
  1775   $ hg tag -r1 one one.patch
  1774   $ hg tag -r2 two two.diff
  1776   $ hg tag -r2 two two.diff
  1775 
  1777 
  1776 test inline for single named patch:
  1778 test inline for single named patch:
  1777   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
  1779   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
  1778   >   -r 2 | $FILTERBOUNDARY
  1780   >   -r 2 | filterboundary
  1779   this patch series consists of 1 patches.
  1781   this patch series consists of 1 patches.
  1780   
  1782   
  1781   
  1783   
  1782   displaying [PATCH] test ...
  1784   displaying [PATCH] test ...
  1783   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1785   Content-Type: multipart/mixed; boundary="===*==" (glob)
  1816   
  1818   
  1817   --===*=-- (glob)
  1819   --===*=-- (glob)
  1818 
  1820 
  1819 test inline for multiple named/unnamed patches:
  1821 test inline for multiple named/unnamed patches:
  1820   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
  1822   $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
  1821   >    -r 0:1 | $FILTERBOUNDARY
  1823   >    -r 0:1 | filterboundary
  1822   this patch series consists of 2 patches.
  1824   this patch series consists of 2 patches.
  1823   
  1825   
  1824   
  1826   
  1825   Write the introductory message for the patch series.
  1827   Write the introductory message for the patch series.
  1826   
  1828   
  2122 
  2124 
  2123 test single flag for single patch (and no warning when not mailing dirty rev):
  2125 test single flag for single patch (and no warning when not mailing dirty rev):
  2124   $ hg up -qr1
  2126   $ hg up -qr1
  2125   $ echo dirt > a
  2127   $ echo dirt > a
  2126   $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
  2128   $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
  2127   >  -r 2 | $FILTERBOUNDARY
  2129   >  -r 2 | filterboundary
  2128   this patch series consists of 1 patches.
  2130   this patch series consists of 1 patches.
  2129   
  2131   
  2130   
  2132   
  2131   displaying [PATCH fooFlag] test ...
  2133   displaying [PATCH fooFlag] test ...
  2132   MIME-Version: 1.0
  2134   MIME-Version: 1.0