tests/test-absorb.t
changeset 38923 8460c3cbca7e
parent 38917 5111d11b8719
child 38932 205efbf656c2
equal deleted inserted replaced
38922:ec0697f4f9c9 38923:8460c3cbca7e
   313   $ hg log -T '{rev}:{node|short} {desc} {get(extras, "absorb_source")}\n'
   313   $ hg log -T '{rev}:{node|short} {desc} {get(extras, "absorb_source")}\n'
   314   10:e1c8c1e030a4 commit b 2 3dfde4199b4610ea6e3c6fa9f5bdad8939d69524
   314   10:e1c8c1e030a4 commit b 2 3dfde4199b4610ea6e3c6fa9f5bdad8939d69524
   315   9:816c30955758 commit b 1 99cfab7da5ffdaf3b9fc6643b14333e194d87f46
   315   9:816c30955758 commit b 1 99cfab7da5ffdaf3b9fc6643b14333e194d87f46
   316   8:5867d584106b commit a 2 fec2b3bd9e0834b7cb6a564348a0058171aed811
   316   8:5867d584106b commit a 2 fec2b3bd9e0834b7cb6a564348a0058171aed811
   317   7:8c76602baf10 commit a 1 f9a81da8dc53380ed91902e5b82c1b36255a4bd0
   317   7:8c76602baf10 commit a 1 f9a81da8dc53380ed91902e5b82c1b36255a4bd0
   318 
       
   319 Test config option absorb.amendflags and running as a sub command of amend:
       
   320 
       
   321   $ cat >> $TESTTMP/dummyamend.py << EOF
       
   322   > from mercurial import commands, registrar
       
   323   > cmdtable = {}
       
   324   > command = registrar.command(cmdtable)
       
   325   > @command('amend', [], '')
       
   326   > def amend(ui, repo, *pats, **opts):
       
   327   >     return 3
       
   328   > EOF
       
   329   $ cat >> $HGRCPATH << EOF
       
   330   > [extensions]
       
   331   > fbamend=$TESTTMP/dummyamend.py
       
   332   > [absorb]
       
   333   > amendflag = correlated
       
   334   > EOF
       
   335 
       
   336   $ hg amend -h
       
   337   hg amend
       
   338   
       
   339   (no help text available)
       
   340   
       
   341   options:
       
   342   
       
   343     --correlated incorporate corrections into stack. see 'hg help absorb' for
       
   344                  details
       
   345   
       
   346   (some details hidden, use --verbose to show complete help)
       
   347 
       
   348   $ $PYTHON -c 'print("".join(map(chr, range(0,3))))' > c
       
   349   $ hg commit -A c -m 'c is a binary file'
       
   350   $ echo c >> c
       
   351   $ sedi $'2i\\\nINS\n' b
       
   352   $ echo END >> b
       
   353   $ hg rm a
       
   354   $ hg amend --correlated
       
   355   1 of 2 chunk(s) applied
       
   356   
       
   357   # changes not applied and left in working directory:
       
   358   # M b : 1 modified chunks were ignored
       
   359   # M c : unsupported file type (ex. binary or link)
       
   360   # R a : removed files were ignored
       
   361 
   318 
   362 Executable files:
   319 Executable files:
   363 
   320 
   364   $ cat >> $HGRCPATH << EOF
   321   $ cat >> $HGRCPATH << EOF
   365   > [diff]
   322   > [diff]