tests/test-evolve-orphan-split.t
branchstable
changeset 4507 de9089514833
parent 4455 b58e45aa9be2
child 4516 f54bb6eaf5e6
child 4576 96ce1030d2fb
equal deleted inserted replaced
4486:099e0ca8285e 4507:de9089514833
    17   $ cd repo
    17   $ cd repo
    18   $ echo ".*\.orig" > .hgignore
    18   $ echo ".*\.orig" > .hgignore
    19   $ hg add .hgignore
    19   $ hg add .hgignore
    20   $ hg ci -m "added hgignore"
    20   $ hg ci -m "added hgignore"
    21 
    21 
    22 An orphan changeset with parent got splitted
    22 An orphan changeset with parent got split
    23 --------------------------------------------
    23 -----------------------------------------
    24 
    24 
    25   $ for ch in a b c; do echo foo > $ch; done;
    25   $ for ch in a b c; do echo foo > $ch; done;
    26 
    26 
    27   $ hg add a b
    27   $ hg add a b
    28   $ hg ci -m "added a and b"
    28   $ hg ci -m "added a and b"
   180   |/    () draft
   180   |/    () draft
   181   o  0:8fa14d15e168 added hgignore
   181   o  0:8fa14d15e168 added hgignore
   182       () draft
   182       () draft
   183 
   183 
   184   $ hg evolve --dry-run <<EOF
   184   $ hg evolve --dry-run <<EOF
   185   > 0
   185   > 1
   186   > EOF
   186   > EOF
   187   ancestor 'd48a30875f01' split over multiple topological branches.
   187   ancestor 'd48a30875f01' split over multiple topological branches.
   188   choose an evolve destination:
   188   choose an evolve destination:
   189   0: [f2632392aefe] added a b c
   189   1: [f2632392aefe] added a b c
   190   1: [7f87764e5b64] added a b c
   190   2: [7f87764e5b64] added a b c
   191   q: quit the prompt
   191   q: quit the prompt
   192   enter the index of the revision you want to select: 0
   192   enter the index of the revision you want to select: 1
   193   move:[7] added d
   193   move:[7] added d
   194   atop:[8] added a b c
   194   atop:[8] added a b c
   195   hg rebase -r d48a30875f01 -d f2632392aefe
   195   hg rebase -r d48a30875f01 -d f2632392aefe
   196 
   196 
   197   $ hg evolve --dry-run <<EOF
   197   $ hg evolve --dry-run <<EOF
   198   > 1
   198   > 2
   199   > EOF
   199   > EOF
   200   ancestor 'd48a30875f01' split over multiple topological branches.
   200   ancestor 'd48a30875f01' split over multiple topological branches.
   201   choose an evolve destination:
   201   choose an evolve destination:
   202   0: [f2632392aefe] added a b c
   202   1: [f2632392aefe] added a b c
   203   1: [7f87764e5b64] added a b c
   203   2: [7f87764e5b64] added a b c
   204   q: quit the prompt
   204   q: quit the prompt
   205   enter the index of the revision you want to select: 1
   205   enter the index of the revision you want to select: 2
   206   move:[7] added d
   206   move:[7] added d
   207   atop:[10] added a b c
   207   atop:[10] added a b c
   208   hg rebase -r d48a30875f01 -d 7f87764e5b64
   208   hg rebase -r d48a30875f01 -d 7f87764e5b64
   209 
   209 
   210 Testing the interactive prompt with invalid values first
   210 Testing the interactive prompt with invalid values first
   213   $ hg evolve --all <<EOF
   213   $ hg evolve --all <<EOF
   214   > foo
   214   > foo
   215   > EOF
   215   > EOF
   216   ancestor 'd48a30875f01' split over multiple topological branches.
   216   ancestor 'd48a30875f01' split over multiple topological branches.
   217   choose an evolve destination:
   217   choose an evolve destination:
   218   0: [f2632392aefe] added a b c
   218   1: [f2632392aefe] added a b c
   219   1: [7f87764e5b64] added a b c
   219   2: [7f87764e5b64] added a b c
   220   q: quit the prompt
   220   q: quit the prompt
   221   enter the index of the revision you want to select: foo
   221   enter the index of the revision you want to select: foo
   222   invalid value 'foo' entered for index
   222   invalid value 'foo' entered for index
   223   could not solve instability, ambiguous destination: parent split across two branches
   223   could not solve instability, ambiguous destination: parent split across two branches
   224 
   224 
   225   $ hg evolve --all <<EOF
   225   $ hg evolve --all <<EOF
   226   > 4
   226   > 4
   227   > EOF
   227   > EOF
   228   ancestor 'd48a30875f01' split over multiple topological branches.
   228   ancestor 'd48a30875f01' split over multiple topological branches.
   229   choose an evolve destination:
   229   choose an evolve destination:
   230   0: [f2632392aefe] added a b c
   230   1: [f2632392aefe] added a b c
   231   1: [7f87764e5b64] added a b c
   231   2: [7f87764e5b64] added a b c
   232   q: quit the prompt
   232   q: quit the prompt
   233   enter the index of the revision you want to select: 4
   233   enter the index of the revision you want to select: 4
   234   invalid value '4' entered for index
   234   invalid value '4' entered for index
   235   could not solve instability, ambiguous destination: parent split across two branches
   235   could not solve instability, ambiguous destination: parent split across two branches
   236 
   236 
   237   $ hg evolve --all <<EOF
   237   $ hg evolve --all <<EOF
   238   > -1
   238   > -1
   239   > EOF
   239   > EOF
   240   ancestor 'd48a30875f01' split over multiple topological branches.
   240   ancestor 'd48a30875f01' split over multiple topological branches.
   241   choose an evolve destination:
   241   choose an evolve destination:
   242   0: [f2632392aefe] added a b c
   242   1: [f2632392aefe] added a b c
   243   1: [7f87764e5b64] added a b c
   243   2: [7f87764e5b64] added a b c
   244   q: quit the prompt
   244   q: quit the prompt
   245   enter the index of the revision you want to select: -1
   245   enter the index of the revision you want to select: -1
   246   invalid value '-1' entered for index
   246   invalid value '-1' entered for index
   247   could not solve instability, ambiguous destination: parent split across two branches
   247   could not solve instability, ambiguous destination: parent split across two branches
   248 
   248 
   249   $ hg evolve --all <<EOF
   249   $ hg evolve --all <<EOF
   250   > q
   250   > q
   251   > EOF
   251   > EOF
   252   ancestor 'd48a30875f01' split over multiple topological branches.
   252   ancestor 'd48a30875f01' split over multiple topological branches.
   253   choose an evolve destination:
   253   choose an evolve destination:
   254   0: [f2632392aefe] added a b c
   254   1: [f2632392aefe] added a b c
   255   1: [7f87764e5b64] added a b c
   255   2: [7f87764e5b64] added a b c
   256   q: quit the prompt
   256   q: quit the prompt
   257   enter the index of the revision you want to select: q
   257   enter the index of the revision you want to select: q
   258   could not solve instability, ambiguous destination: parent split across two branches
   258   could not solve instability, ambiguous destination: parent split across two branches
   259 
   259 
   260 Doing the evolve with the interactive prompt
   260 Doing the evolve with the interactive prompt
   262   $ hg evolve --all <<EOF
   262   $ hg evolve --all <<EOF
   263   > 1
   263   > 1
   264   > EOF
   264   > EOF
   265   ancestor 'd48a30875f01' split over multiple topological branches.
   265   ancestor 'd48a30875f01' split over multiple topological branches.
   266   choose an evolve destination:
   266   choose an evolve destination:
   267   0: [f2632392aefe] added a b c
   267   1: [f2632392aefe] added a b c
   268   1: [7f87764e5b64] added a b c
   268   2: [7f87764e5b64] added a b c
   269   q: quit the prompt
   269   q: quit the prompt
   270   enter the index of the revision you want to select: 1
   270   enter the index of the revision you want to select: 1
   271   move:[7] added d
   271   move:[7] added d
   272   atop:[10] added a b c
   272   atop:[8] added a b c
   273   working directory is now at 1c6caa7c902a
   273   working directory is now at 71e4d45a7aaa