tests/test-uncommit.t
changeset 42902 ff1ff2aae132
parent 42051 f4147ca63d39
child 42903 66048f6b5d0d
equal deleted inserted replaced
42901:75bd5990d8fe 42902:ff1ff2aae132
    36   
    36   
    37       --keep                     allow an empty commit after uncommiting
    37       --keep                     allow an empty commit after uncommiting
    38       --allow-dirty-working-copy allow uncommit with outstanding changes
    38       --allow-dirty-working-copy allow uncommit with outstanding changes
    39    -I --include PATTERN [+]      include names matching the given patterns
    39    -I --include PATTERN [+]      include names matching the given patterns
    40    -X --exclude PATTERN [+]      exclude names matching the given patterns
    40    -X --exclude PATTERN [+]      exclude names matching the given patterns
       
    41    -m --message TEXT             use text as commit message
       
    42    -l --logfile FILE             read commit message from file
       
    43    -d --date DATE                record the specified date as commit date
       
    44    -u --user USER                record the specified user as committer
    41   
    45   
    42   (some details hidden, use --verbose to show complete help)
    46   (some details hidden, use --verbose to show complete help)
    43 
    47 
    44 Uncommit with no commits should fail
    48 Uncommit with no commits should fail
    45 
    49 
   529 can be uncommitted.
   533 can be uncommitted.
   530 
   534 
   531   $ mkdir dir
   535   $ mkdir dir
   532   $ echo 1 > dir/file.txt
   536   $ echo 1 > dir/file.txt
   533   $ hg ci -Aqm 'add file in directory'
   537   $ hg ci -Aqm 'add file in directory'
   534   $ hg uncommit dir
   538   $ hg uncommit dir -m 'uncommit with message' -u 'different user' \
       
   539   >                 -d 'Jun 30 12:12:12 1980 +0000'
   535   $ hg status
   540   $ hg status
   536   A dir/file.txt
   541   A dir/file.txt
       
   542   $ hg log -r .
       
   543   changeset:   8:b4dd26dc42e0
       
   544   tag:         tip
       
   545   parent:      6:2278a4c24330
       
   546   user:        different user
       
   547   date:        Mon Jun 30 12:12:12 1980 +0000
       
   548   summary:     uncommit with message
       
   549   
   537 
   550 
   538 `uncommit <dir>` and `cd <dir> && uncommit .` behave the same...
   551 `uncommit <dir>` and `cd <dir> && uncommit .` behave the same...
   539 
   552 
   540   $ hg rollback -q --config ui.rollback=True
   553   $ hg rollback -q --config ui.rollback=True
   541   $ echo 2 > dir/file2.txt
   554   $ echo 2 > dir/file2.txt