tests/test-metaedit.t
branchmercurial-4.3
changeset 3105 f5d472b7e800
parent 3013 945a0989e41b
child 3273 c0ee9ddfd5ff
equal deleted inserted replaced
3104:3dd5a6f83f8b 3105:f5d472b7e800
    78 
    78 
    79 Test
    79 Test
    80 ----
    80 ----
    81 
    81 
    82   $ hg log -G
    82   $ hg log -G
    83   @  7	: F - test
    83   @  8	: F - test
    84   |
    84   |
    85   o  6	: E - test
    85   o  7	: E - test
    86   |
    86   |
    87   | o  5	: D2 - test
    87   | o  6	: D2 - test
    88   |/
    88   |/
    89   o  3	: C - test
    89   o  3	: C - test
    90   |
    90   |
    91   | o  2	: B - test
    91   | o  2	: B - test
    92   |/
    92   |/
   122   (see 'hg help evolution.instability')
   122   (see 'hg help evolution.instability')
   123   [255]
   123   [255]
   124   $ hg metaedit --user foobar
   124   $ hg metaedit --user foobar
   125   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   125   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   126   $ hg log --template '{rev}: {author}\n' -r 'desc(F):' --hidden
   126   $ hg log --template '{rev}: {author}\n' -r 'desc(F):' --hidden
       
   127   5: test
       
   128   6: test
   127   7: test
   129   7: test
   128   8: foobar
   130   8: test
       
   131   9: foobar
   129   $ hg log --template '{rev}: {author}\n' -r .
   132   $ hg log --template '{rev}: {author}\n' -r .
   130   8: foobar
   133   9: foobar
   131 
   134 
   132 TODO: support this
   135 TODO: support this
   133   $ hg metaedit '.^::.'
   136   $ hg metaedit '.^::.'
   134   abort: editing multiple revisions without --fold is not currently supported
   137   abort: editing multiple revisions without --fold is not currently supported
   135   [255]
   138   [255]
   136 
   139 
   137   $ HGEDITOR=cat hg metaedit '.^::.' --fold
   140   $ HGEDITOR=cat hg metaedit '.^::.' --fold
   138   HG: This is a fold of 2 changesets.
   141   HG: This is a fold of 2 changesets.
   139   HG: Commit message of changeset 6.
   142   HG: Commit message of changeset 7.
   140   
   143   
   141   E
   144   E
   142   
   145   
   143   HG: Commit message of changeset 8.
   146   HG: Commit message of changeset 9.
   144   
   147   
   145   F
   148   F
   146   
   149   
   147   
   150   
   148   
   151   
   155   HG: added F
   158   HG: added F
   156   2 changesets folded
   159   2 changesets folded
   157   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   160   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   158 
   161 
   159   $ glog -r .
   162   $ glog -r .
   160   @  9:a08d35fd7d9d@default(draft) E
   163   @  10:a08d35fd7d9d@default(draft) E
   161   |
   164   |
   162   ~
   165   ~
   163 
   166 
   164 no new commit is created here because the date is the same
   167 no new commit is created here because the date is the same
   165   $ HGEDITOR=cat hg metaedit
   168   $ HGEDITOR=cat hg metaedit
   177   HG: added E
   180   HG: added E
   178   HG: added F
   181   HG: added F
   179   nothing changed
   182   nothing changed
   180 
   183 
   181   $ glog -r '.^::.'
   184   $ glog -r '.^::.'
   182   @  9:a08d35fd7d9d@default(draft) E
   185   @  10:a08d35fd7d9d@default(draft) E
   183   |
   186   |
   184   o  3:3260958f1169@default(draft) C
   187   o  3:3260958f1169@default(draft) C
   185   |
   188   |
   186   ~
   189   ~
   187 
   190 
   191 but highlight the bug)
   194 but highlight the bug)
   192   $ hg metaedit --config defaults.metaedit= --config devel.default-date="42 0"
   195   $ hg metaedit --config defaults.metaedit= --config devel.default-date="42 0"
   193   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   196   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   194   $ hg log -r '.^::.' --template '{rev}: {desc|firstline}\n'
   197   $ hg log -r '.^::.' --template '{rev}: {desc|firstline}\n'
   195   3: C
   198   3: C
   196   10: E
   199   11: E
   197 
   200 
   198   $ hg up .^
   201   $ hg up .^
   199   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   202   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   200   $ hg metaedit --user foobar2 tip
   203   $ hg metaedit --user foobar2 tip
   201   $ hg log --template '{rev}: {author}\n' -r "user(foobar):" --hidden
   204   $ hg log --template '{rev}: {author}\n' -r "user(foobar):" --hidden
   202   8: foobar
   205   9: foobar
   203   9: test
       
   204   10: test
   206   10: test
   205   11: foobar2
   207   11: test
       
   208   12: foobar2
   206   $ hg diff -r "10" -r "11" --hidden
   209   $ hg diff -r "10" -r "11" --hidden
   207 
   210 
   208 'fold' one commit
   211 'fold' one commit
   209   $ HGUSER=foobar3 hg metaedit "desc(D2)" --fold -U --config
   212   $ HGUSER=foobar3 hg metaedit "desc(D2)" --fold -U --config
   210   1 changesets folded
   213   1 changesets folded
   211   $ hg log -r "tip" --template '{rev}: {author}\n'
   214   $ hg log -r "tip" --template '{rev}: {author}\n'
   212   12: foobar3
   215   13: foobar3