tests/test-grab.t
changeset 4053 ecbf61d90807
parent 4052 73e73471d6c6
child 4076 f9a850018daa
child 4183 536c67823962
child 4229 a8ed26f01c8d
child 5219 acc3253f0ebc
equal deleted inserted replaced
4052:73e73471d6c6 4053:ecbf61d90807
    43   o  0:1f0dee641bb7 add a
    43   o  0:1f0dee641bb7 add a
    44   
    44   
    45 
    45 
    46 Grabbing an ancestor
    46 Grabbing an ancestor
    47 
    47 
    48   $ hg grab -r 7c3bad9141dc
    48   $ hg pick -r 7c3bad9141dc
    49   abort: cannot pick an ancestor revision
    49   abort: cannot pick an ancestor revision
    50   [255]
    50   [255]
    51 
    51 
    52 Grabbing the working directory parent
    52 Grabbing the working directory parent
    53 
    53 
    54   $ hg grab -r .
    54   $ hg pick -r .
    55   abort: cannot pick an ancestor revision
    55   abort: cannot pick an ancestor revision
    56   [255]
    56   [255]
    57 
    57 
    58 Specifying multiple revisions to grab
    58 Specifying multiple revisions to grab
    59 
    59 
    60   $ hg grab 1f0dee641bb7 -r 7c3bad9141dc
    60   $ hg pick 1f0dee641bb7 -r 7c3bad9141dc
    61   abort: specify just one revision
    61   abort: specify just one revision
    62   [255]
    62   [255]
    63 
    63 
    64 Specifying no revisions to grab
    64 Specifying no revisions to grab
    65 
    65 
    66   $ hg grab
    66   $ hg pick
    67   abort: empty revision set
    67   abort: empty revision set
    68   [255]
    68   [255]
    69 
    69 
    70 Continuing without interrupted grab
    70 Continuing without interrupted grab
    71 
    71 
    72   $ hg grab --continue
    72   $ hg pick --continue
    73   abort: no interrupted pick state exists
    73   abort: no interrupted pick state exists
    74   [255]
    74   [255]
    75 
    75 
    76 Aborting without interrupted grab
    76 Aborting without interrupted grab
    77 
    77 
    78   $ hg grab --abort
    78   $ hg pick --abort
    79   abort: no interrupted pick state exists
    79   abort: no interrupted pick state exists
    80   [255]
    80   [255]
    81 
    81 
    82 Specifying both continue and revs
    82 Specifying both continue and revs
    83 
    83 
    84   $ hg up 1f0dee641bb7
    84   $ hg up 1f0dee641bb7
    85   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
    85   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
    86   $ hg grab -r 4538525df7e2 --continue
    86   $ hg pick -r 4538525df7e2 --continue
    87   abort: cannot specify both --continue and revision
    87   abort: cannot specify both --continue and revision
    88   [255]
    88   [255]
    89 
    89 
    90 Making new branch heads
    90 Making new branch heads
    91 
    91 
   104   |/
   104   |/
   105   o  0:1f0dee641bb7 add a
   105   o  0:1f0dee641bb7 add a
   106   
   106   
   107 Grabbing a revision
   107 Grabbing a revision
   108 
   108 
   109   $ hg grab 7c3bad9141dc
   109   $ hg pick 7c3bad9141dc
   110   picking 1:7c3bad9141dc "add b"
   110   picking 1:7c3bad9141dc "add b"
   111   1 new orphan changesets
   111   1 new orphan changesets
   112   $ hg glog
   112   $ hg glog
   113   @  5:7c15c05db6fa add b
   113   @  5:7c15c05db6fa add b
   114   |
   114   |
   141   | |
   141   | |
   142   | x  1:7c3bad9141dc add b
   142   | x  1:7c3bad9141dc add b
   143   |/
   143   |/
   144   o  0:1f0dee641bb7 add a
   144   o  0:1f0dee641bb7 add a
   145   
   145   
   146   $ hg grab -r 4538525df7e2
   146   $ hg pick -r 4538525df7e2
   147   picking 2:4538525df7e2 "add c"
   147   picking 2:4538525df7e2 "add c"
   148   note: picking 2:4538525df7e2 created no changes to commit
   148   note: picking 2:4538525df7e2 created no changes to commit
   149 
   149 
   150   $ hg glog
   150   $ hg glog
   151   @  6:c4636a81ebeb add c
   151   @  6:c4636a81ebeb add c
   162 
   162 
   163   $ hg up d46dc301d92f
   163   $ hg up d46dc301d92f
   164   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   164   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   165   $ echo foo > c
   165   $ echo foo > c
   166   $ hg ci -Aqm "foo to c"
   166   $ hg ci -Aqm "foo to c"
   167   $ hg grab -r c4636a81ebeb
   167   $ hg pick -r c4636a81ebeb
   168   picking 6:c4636a81ebeb "add c"
   168   picking 6:c4636a81ebeb "add c"
   169   merging c
   169   merging c
   170   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   170   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   171   unresolved merge conflicts (see hg help resolve)
   171   unresolved merge conflicts (see hg help resolve)
   172   [1]
   172   [1]
   173 
   173 
   174   $ echo foobar > c
   174   $ echo foobar > c
   175   $ hg resolve --all --mark
   175   $ hg resolve --all --mark
   176   (no more unresolved files)
   176   (no more unresolved files)
   177   continue: hg pick --continue
   177   continue: hg pick --continue
   178   $ hg grab --continue
   178   $ hg pick --continue
   179   $ hg glog
   179   $ hg glog
   180   @  8:44e155eb95c7 add c
   180   @  8:44e155eb95c7 add c
   181   |
   181   |
   182   o  7:2ccc03d1d096 foo to c
   182   o  7:2ccc03d1d096 foo to c
   183   |
   183   |
   200   created new head
   200   created new head
   201 
   201 
   202   $ hg up 44e155eb95c7
   202   $ hg up 44e155eb95c7
   203   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   203   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   204 
   204 
   205   $ hg grab 4e04628911f6
   205   $ hg pick 4e04628911f6
   206   picking 9:4e04628911f6 "foo to c"
   206   picking 9:4e04628911f6 "foo to c"
   207   merging c
   207   merging c
   208   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   208   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   209   unresolved merge conflicts (see hg help resolve)
   209   unresolved merge conflicts (see hg help resolve)
   210   [1]
   210   [1]
   211   $ echo foobar > c
   211   $ echo foobar > c
   212   $ hg resolve -m
   212   $ hg resolve -m
   213   (no more unresolved files)
   213   (no more unresolved files)
   214   continue: hg pick --continue
   214   continue: hg pick --continue
   215 
   215 
   216   $ hg grab --continue
   216   $ hg pick --continue
   217   note: picking 9:4e04628911f6 created no changes to commit
   217   note: picking 9:4e04628911f6 created no changes to commit
   218 
   218 
   219 Testing the abort functionality of hg grab
   219 Testing the abort functionality of hg pick
   220 
   220 
   221   $ echo foo > b
   221   $ echo foo > b
   222   $ hg ci -Aqm "foo to b"
   222   $ hg ci -Aqm "foo to b"
   223   $ hg glog -r .^::
   223   $ hg glog -r .^::
   224   @  10:c437988de89f foo to b
   224   @  10:c437988de89f foo to b
   225   |
   225   |
   226   o  8:44e155eb95c7 add c
   226   o  8:44e155eb95c7 add c
   227   |
   227   |
   228   ~
   228   ~
   229 
   229 
   230   $ hg grab -r 7c15c05db6fa
   230   $ hg pick -r 7c15c05db6fa
   231   picking 5:7c15c05db6fa "add b"
   231   picking 5:7c15c05db6fa "add b"
   232   merging b
   232   merging b
   233   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   233   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   234   unresolved merge conflicts (see hg help resolve)
   234   unresolved merge conflicts (see hg help resolve)
   235   [1]
   235   [1]
   236 
   236 
   237   $ hg grab --abort
   237   $ hg pick --abort
   238   aborting pick, updating to c437988de89f
   238   aborting pick, updating to c437988de89f
   239 
   239 
   240   $ hg glog
   240   $ hg glog
   241   @  10:c437988de89f foo to b
   241   @  10:c437988de89f foo to b
   242   |
   242   |
   255 
   255 
   256 Trying to grab a public changeset
   256 Trying to grab a public changeset
   257 
   257 
   258   $ hg phase -r 7c15c05db6fa -p
   258   $ hg phase -r 7c15c05db6fa -p
   259 
   259 
   260   $ hg grab -r 7c15c05db6fa
   260   $ hg pick -r 7c15c05db6fa
   261   abort: cannot pick public changesets: 7c15c05db6fa
   261   abort: cannot pick public changesets: 7c15c05db6fa
   262   (see 'hg help phases' for details)
   262   (see 'hg help phases' for details)
   263   [255]
   263   [255]
   264 
   264 
   265   $ hg glog
   265   $ hg glog
   281 
   281 
   282 In case of merge conflicts
   282 In case of merge conflicts
   283 
   283 
   284   $ hg phase -r 7c15c05db6fa -s -f
   284   $ hg phase -r 7c15c05db6fa -s -f
   285 
   285 
   286   $ hg grab -r 7c15c05db6fa
   286   $ hg pick -r 7c15c05db6fa
   287   picking 5:7c15c05db6fa "add b"
   287   picking 5:7c15c05db6fa "add b"
   288   merging b
   288   merging b
   289   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   289   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   290   unresolved merge conflicts (see hg help resolve)
   290   unresolved merge conflicts (see hg help resolve)
   291   [1]
   291   [1]
   293   $ echo bar > b
   293   $ echo bar > b
   294   $ hg resolve -m
   294   $ hg resolve -m
   295   (no more unresolved files)
   295   (no more unresolved files)
   296   continue: hg pick --continue
   296   continue: hg pick --continue
   297 
   297 
   298   $ hg grab --continue
   298   $ hg pick --continue
   299   $ hg phase -r .
   299   $ hg phase -r .
   300   11: secret
   300   11: secret
   301 
   301 
   302 No merge conflicts
   302 No merge conflicts
   303 
   303 
   328   o  0:1f0dee641bb7 add a
   328   o  0:1f0dee641bb7 add a
   329   
   329   
   330   $ hg up 10427de9e26e
   330   $ hg up 10427de9e26e
   331   3 files updated, 0 files merged, 1 files removed, 0 files unresolved
   331   3 files updated, 0 files merged, 1 files removed, 0 files unresolved
   332 
   332 
   333   $ hg grab -r 508d572e7053
   333   $ hg pick -r 508d572e7053
   334   picking 12:508d572e7053 "added l"
   334   picking 12:508d572e7053 "added l"
   335 
   335 
   336   $ hg phase -r .
   336   $ hg phase -r .
   337   13: secret
   337   13: secret