tests/test-histedit-edit.t
changeset 41213 704a3aa3dc0a
parent 41212 240f8e49a7bd
child 41362 57c462db87fd
equal deleted inserted replaced
41212:240f8e49a7bd 41213:704a3aa3dc0a
     2 
     2 
     3   $ cat >> $HGRCPATH <<EOF
     3   $ cat >> $HGRCPATH <<EOF
     4   > [extensions]
     4   > [extensions]
     5   > histedit=
     5   > histedit=
     6   > strip=
     6   > strip=
       
     7   > mockmakedate = $TESTDIR/mockmakedate.py
     7   > EOF
     8   > EOF
     8 
     9 
     9   $ initrepo ()
    10   $ initrepo ()
    10   > {
    11   > {
    11   >     hg init r
    12   >     hg init r
   482   #  r, roll = like fold, but discard this commit's description and date
   483   #  r, roll = like fold, but discard this commit's description and date
   483   #
   484   #
   484 
   485 
   485   $ cd ..
   486   $ cd ..
   486 
   487 
       
   488 ============================================
       
   489 Test update-timestamp config option in mess|
       
   490 ============================================
       
   491 
       
   492   $ addwithdate ()
       
   493   > {
       
   494   >     echo $1 > $1
       
   495   >     hg add $1
       
   496   >     hg ci -m $1 -d "$2 0"
       
   497   > }
       
   498 
       
   499   $ initrepo ()
       
   500   > {
       
   501   >     hg init r2
       
   502   >     cd r2
       
   503   >     addwithdate a 1
       
   504   >     addwithdate b 2
       
   505   >     addwithdate c 3
       
   506   >     addwithdate d 4
       
   507   >     addwithdate e 5
       
   508   >     addwithdate f 6
       
   509   > }
       
   510 
       
   511   $ initrepo
       
   512 
       
   513 log before edit
       
   514 
       
   515   $ hg log --limit 1
       
   516   changeset:   5:178e35e0ce73
       
   517   tag:         tip
       
   518   user:        test
       
   519   date:        Thu Jan 01 00:00:06 1970 +0000
       
   520   summary:     f
       
   521   
       
   522   $ hg histedit tip --commands - 2>&1 --config rewrite.update-timestamp=True << EOF | fixbundle
       
   523   > mess 178e35e0ce73 f
       
   524   > EOF
       
   525 
       
   526 log after edit
       
   527 
       
   528   $ hg log --limit 1
       
   529   changeset:   5:98bf456d476b
       
   530   tag:         tip
       
   531   user:        test
       
   532   date:        Thu Jan 01 00:00:00 1970 +0000
       
   533   summary:     f
       
   534   
       
   535 
       
   536   $ cd ..
       
   537 
   487 warn the user on editing tagged commits
   538 warn the user on editing tagged commits
   488 
   539 
   489   $ hg init issue4017
   540   $ hg init issue4017
   490   $ cd issue4017
   541   $ cd issue4017
   491   $ echo > a
   542   $ echo > a