tests/test-amend.t
changeset 35393 4441705b7111
parent 35244 98f97eb20597
child 35508 9b3f95d9783d
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
    27 
    27 
    28   $ hg update B -q
    28   $ hg update B -q
    29   $ echo 2 >> B
    29   $ echo 2 >> B
    30 
    30 
    31   $ hg amend
    31   $ hg amend
    32   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-7e959a55-amend.hg (glob) (obsstore-off !)
    32   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-7e959a55-amend.hg (obsstore-off !)
    33 #if obsstore-off
    33 #if obsstore-off
    34   $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
    34   $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
    35   @  1 be169c7e8dbe B
    35   @  1 be169c7e8dbe B
    36   |  diff --git a/B b/B
    36   |  diff --git a/B b/B
    37   |  new file mode 100644
    37   |  new file mode 100644
    97 
    97 
    98   $ echo 3 > C
    98   $ echo 3 > C
    99   $ echo 4 > D
    99   $ echo 4 > D
   100   $ hg add C D
   100   $ hg add C D
   101   $ hg amend -m NEWMESSAGE -I C
   101   $ hg amend -m NEWMESSAGE -I C
   102   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe-7684ddc5-amend.hg (glob) (obsstore-off !)
   102   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe-7684ddc5-amend.hg (obsstore-off !)
   103   $ hg log -r . -T '{node|short} {desc} {files}\n'
   103   $ hg log -r . -T '{node|short} {desc} {files}\n'
   104   c7ba14d9075b NEWMESSAGE B C
   104   c7ba14d9075b NEWMESSAGE B C
   105   $ echo 5 > E
   105   $ echo 5 > E
   106   $ rm C
   106   $ rm C
   107   $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D
   107   $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D
   108   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b3e76daa-amend.hg (glob) (obsstore-off !)
   108   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b3e76daa-amend.hg (obsstore-off !)
   109   $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n'
   109   $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n'
   110   14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000
   110   14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000
   111 
   111 
   112 Amend with editor
   112 Amend with editor
   113 
   113 
   117   > mv $TESTTMP/msg "$1"
   117   > mv $TESTTMP/msg "$1"
   118   > EOF
   118   > EOF
   119   $ chmod +x $TESTTMP/prefix.sh
   119   $ chmod +x $TESTTMP/prefix.sh
   120 
   120 
   121   $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend --edit
   121   $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend --edit
   122   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/14f6c4bcc865-6591f15d-amend.hg (glob) (obsstore-off !)
   122   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/14f6c4bcc865-6591f15d-amend.hg (obsstore-off !)
   123   $ hg log -r . -T '{node|short} {desc}\n'
   123   $ hg log -r . -T '{node|short} {desc}\n'
   124   298f085230c3 EDITED: NEWMESSAGE
   124   298f085230c3 EDITED: NEWMESSAGE
   125   $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend -e -m MSG
   125   $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend -e -m MSG
   126   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/298f085230c3-d81a6ad3-amend.hg (glob) (obsstore-off !)
   126   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/298f085230c3-d81a6ad3-amend.hg (obsstore-off !)
   127   $ hg log -r . -T '{node|short} {desc}\n'
   127   $ hg log -r . -T '{node|short} {desc}\n'
   128   974f07f28537 EDITED: MSG
   128   974f07f28537 EDITED: MSG
   129 
   129 
   130   $ echo FOO > $TESTTMP/msg
   130   $ echo FOO > $TESTTMP/msg
   131   $ hg amend -l $TESTTMP/msg -m BAR
   131   $ hg amend -l $TESTTMP/msg -m BAR
   132   abort: options --message and --logfile are mutually exclusive
   132   abort: options --message and --logfile are mutually exclusive
   133   [255]
   133   [255]
   134   $ hg amend -l $TESTTMP/msg
   134   $ hg amend -l $TESTTMP/msg
   135   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/974f07f28537-edb6470a-amend.hg (glob) (obsstore-off !)
   135   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/974f07f28537-edb6470a-amend.hg (obsstore-off !)
   136   $ hg log -r . -T '{node|short} {desc}\n'
   136   $ hg log -r . -T '{node|short} {desc}\n'
   137   507be9bdac71 FOO
   137   507be9bdac71 FOO
   138 
   138 
   139 Interactive mode
   139 Interactive mode
   140 
   140 
   150   
   150   
   151   diff --git a/G b/G
   151   diff --git a/G b/G
   152   new file mode 100644
   152   new file mode 100644
   153   examine changes to 'G'? [Ynesfdaq?] n
   153   examine changes to 'G'? [Ynesfdaq?] n
   154   
   154   
   155   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71-c8077452-amend.hg (glob) (obsstore-off !)
   155   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71-c8077452-amend.hg (obsstore-off !)
   156   $ hg log -r . -T '{files}\n'
   156   $ hg log -r . -T '{files}\n'
   157   B D F
   157   B D F
   158 
   158 
   159 Amend in the middle of a stack
   159 Amend in the middle of a stack
   160 
   160 
   225   >  /|
   225   >  /|
   226   > A B
   226   > A B
   227   > EOS
   227   > EOS
   228   $ hg update -q C
   228   $ hg update -q C
   229   $ hg amend -m FOO
   229   $ hg amend -m FOO
   230   saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/a35c07e8a2a4-15ff4612-amend.hg (glob) (obsstore-off !)
   230   saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/a35c07e8a2a4-15ff4612-amend.hg (obsstore-off !)
   231   $ rm .hg/localtags
   231   $ rm .hg/localtags
   232   $ hg log -G -T '{desc}\n'
   232   $ hg log -G -T '{desc}\n'
   233   @    FOO
   233   @    FOO
   234   |\
   234   |\
   235   | o  B
   235   | o  B