tests/test-commit-amend.t
branchstable
changeset 16630 f30226b1a46a
parent 16553 9224cc2e99cc
child 16716 0311a6abd38a
child 17049 2440822446ce
equal deleted inserted replaced
16620:e22d6b1dec1d 16630:f30226b1a46a
   314 Can't rollback an amend:
   314 Can't rollback an amend:
   315 
   315 
   316   $ hg rollback
   316   $ hg rollback
   317   no rollback information available
   317   no rollback information available
   318   [1]
   318   [1]
       
   319 
       
   320 Preserve extra dict (issue3430):
       
   321 
       
   322   $ hg branch a
       
   323   marked working directory as branch a
       
   324   (branches are permanent and global, did you want a bookmark?)
       
   325   $ echo a >> a
       
   326   $ hg ci -ma
       
   327   $ hg ci --amend -m "a'"
       
   328   saved backup bundle to $TESTTMP/.hg/strip-backup/167f8e3031df-amend-backup.hg
       
   329   $ hg log -r . --template "{branch}\n"
       
   330   a
       
   331   $ hg ci --amend -m "a''"
       
   332   saved backup bundle to $TESTTMP/.hg/strip-backup/ceac1a44c806-amend-backup.hg
       
   333   $ hg log -r . --template "{branch}\n"
       
   334   a
       
   335 
       
   336 Also preserve other entries in the dict that are in the old commit,
       
   337 first graft something so there's an additional entry:
       
   338 
       
   339   $ hg up 0 -q
       
   340   $ echo z > z
       
   341   $ hg ci -Am 'fork'
       
   342   adding z
       
   343   created new head
       
   344   $ hg up 11
       
   345   5 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   346   $ hg graft 12
       
   347   grafting revision 12
       
   348   $ hg ci --amend -m 'graft amend'
       
   349   saved backup bundle to $TESTTMP/.hg/strip-backup/18a5124daf7a-amend-backup.hg
       
   350   $ hg log -r . --debug | grep extra
       
   351   extra:       branch=a
       
   352   extra:       source=2647734878ef0236dda712fae9c1651cf694ea8a