D7728: rebase: add test to demonstrate issue6180

2020-02-14 Thread marmoute (Pierre-Yves David)
This revision now requires changes to proceed.
marmoute added a comment.
marmoute requested changes to this revision.


  As per comment of Pulkit and I on D7730 
, please spin this test toward forbiding 
the prune while the rebase is in progress.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7728/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

To: khanchi97, #hg-reviewers, marmoute
Cc: marmoute, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7728: rebase: add test to demonstrate issue6180

2020-02-01 Thread marmoute (Pierre-Yves David)
marmoute added a comment.


  Cf my comment on D7730 , I think the 
bug is more about letting others commands obsoleting things happens (eg, amend, 
pull, etc) than rebase being confused by the result.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7728/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

To: khanchi97, #hg-reviewers
Cc: marmoute, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7728: rebase: add test to demonstrate issue6180

2020-02-01 Thread khanchi97 (Sushil khanchi)
khanchi97 updated this revision to Diff 19815.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7728?vs=19282=19815

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7728/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

AFFECTED FILES
  tests/test-rebase-conflicts.t

CHANGE DETAILS

diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -429,3 +429,66 @@
   |/
   o  0:draft 'A'
   
+Test to make sure that pruning while rebasing doesn't confuse rebase 
(issue6180)
+  $ cat >> $HGRCPATH < [experimental]
+  > evolution.createmarkers=True
+  > evolution.allowunstable=True
+  > [rebase]
+  > experimental.inmemory=1
+  > EOF
+
+The test case below starts a rebase of 2 commits and runs into conflicts on
+the first one. We then decide we don't want the changes from that commit, so
+we revert the changes and also prune the original commit.
+Now what we expect from `hg rebase --continue` is that it skip rebasing first
+one (since it's pruned) but don't skip second one.
+
+  $ hg init issue6180
+  $ cd issue6180
+  $ echo 0 > a
+  $ hg ci -Aqm 'add a'
+  $ echo 1 > a
+  $ hg ci -m 'edit a'
+  $ hg co -q 0
+  $ echo 2 > a
+  $ hg ci -qm 'conflict in a'
+  $ echo 3 > b
+  $ hg ci -Aqm 'add b'
+  $ hg tglog
+  @  3:draft 'add b'
+  |
+  o  2:draft 'conflict in a'
+  |
+  | o  1:draft 'edit a'
+  |/
+  o  0:draft 'add a'
+  
+  $ hg rebase -d 1
+  rebasing 2:06a50ac6b5ab "conflict in a"
+  merging a
+  hit merge conflicts; re-running rebase without in-memory merge
+  rebasing 2:06a50ac6b5ab "conflict in a"
+  merging a
+  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
+  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  [1]
+  $ echo 1 > a
+  $ hg debugobsolete $(hg id -ir 2 --debug)
+  1 new obsolescence markers
+  obsoleted 1 changesets
+  1 new orphan changesets
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg rebase --continue
+XXX: it should have rebased revision 3 since it made changes unrelated to
+destination, so no reason to say "its destination already has all its changes"
+  $ hg rebase -c
+  note: not rebasing 2:06a50ac6b5ab "conflict in a", it has no successor
+  rebasing 3:aea370672fd7 "add b" (tip)
+  note: not rebasing 3:aea370672fd7 "add b" (tip), its destination already has 
all its changes
+  $ hg tglog
+  @  1:draft 'edit a'
+  |
+  o  0:draft 'add a'
+  



To: khanchi97, #hg-reviewers
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7728: rebase: add test to demonstrate issue6180

2020-01-15 Thread khanchi97 (Sushil khanchi)
khanchi97 updated this revision to Diff 19282.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7728?vs=18937=19282

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7728/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

AFFECTED FILES
  tests/test-rebase-conflicts.t

CHANGE DETAILS

diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -429,3 +429,61 @@
   |/
   o  0:draft 'A'
   
+Test to make sure that pruning while rebasing doesn't confuse rebase 
(issue6180)
+  $ cat >> $HGRCPATH < [experimental]
+  > evolution.createmarkers=True
+  > evolution.allowunstable=True
+  > EOF
+
+The test case below starts a rebase of 2 commits and runs into conflicts on
+the first one. We then decide we don't want the changes from that commit, so
+we revert the changes and also prune the original commit.
+Now what we expect from `hg rebase --continue` is that it skip rebasing first
+one (since it's pruned) but don't skip second one.
+
+  $ hg init issue6180
+  $ cd issue6180
+  $ echo 0 > a
+  $ hg ci -Aqm 'add a'
+  $ echo 1 > a
+  $ hg ci -m 'edit a'
+  $ hg co -q 0
+  $ echo 2 > a
+  $ hg ci -qm 'conflict in a'
+  $ echo 3 > b
+  $ hg ci -Aqm 'add b'
+  $ hg tglog
+  @  3:draft 'add b'
+  |
+  o  2:draft 'conflict in a'
+  |
+  | o  1:draft 'edit a'
+  |/
+  o  0:draft 'add a'
+  
+  $ hg rebase -d 1
+  rebasing 2:06a50ac6b5ab "conflict in a"
+  merging a
+  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
+  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  [1]
+  $ echo 1 > a
+  $ hg debugobsolete $(hg id -ir 2 --debug)
+  1 new obsolescence markers
+  obsoleted 1 changesets
+  1 new orphan changesets
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg rebase --continue
+XXX: it should have rebased revision 3 since it made changes unrelated to
+destination, so no reason to say "its destination already has all its changes"
+  $ hg rebase -c
+  note: not rebasing 2:06a50ac6b5ab "conflict in a", it has no successor
+  rebasing 3:aea370672fd7 "add b" (tip)
+  note: not rebasing 3:aea370672fd7 "add b" (tip), its destination already has 
all its changes
+  $ hg tglog
+  @  1:draft 'edit a'
+  |
+  o  0:draft 'add a'
+  



To: khanchi97, #hg-reviewers
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7728: rebase: add test to demonstrate issue6180

2020-01-09 Thread pulkit (Pulkit Goyal)
pulkit added inline comments.

INLINE COMMENTS

> test-rebase-conflicts.t:438
> +  > [alias]
> +  > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
> +  > EOF

You don't need to redefine it.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7728/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

To: khanchi97, #hg-reviewers
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7728: rebase: add test to demonstrate issue6180

2020-01-08 Thread khanchi97 (Sushil khanchi)
khanchi97 added a comment.


  Ping.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7728/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

To: khanchi97, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7728: rebase: add test to demonstrate issue6180

2019-12-27 Thread khanchi97 (Sushil khanchi)
khanchi97 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It will be fixed in next patch.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7728

AFFECTED FILES
  tests/test-rebase-conflicts.t

CHANGE DETAILS

diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -429,3 +429,63 @@
   |/
   o  0:draft 'A'
   
+Test to make sure that pruning while rebasing doesn't confuse rebase 
(issue6180)
+  $ cat >> $HGRCPATH < [experimental]
+  > evolution.createmarkers=True
+  > evolution.allowunstable=True
+  > [alias]
+  > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
+  > EOF
+
+The test case below starts a rebase of 2 commits and runs into conflicts on
+the first one. We then decide we don't want the changes from that commit, so
+we revert the changes and also prune the original commit.
+Now what we expect from `hg rebase --continue` is that it skip rebasing first
+one (since it's pruned) but don't skip second one.
+
+  $ hg init issue6180
+  $ cd issue6180
+  $ echo 0 > a
+  $ hg ci -Aqm 'add a'
+  $ echo 1 > a
+  $ hg ci -m 'edit a'
+  $ hg co -q 0
+  $ echo 2 > a
+  $ hg ci -qm 'conflict in a'
+  $ echo 3 > b
+  $ hg ci -Aqm 'add b'
+  $ hg tglog
+  @  3:draft 'add b'
+  |
+  o  2:draft 'conflict in a'
+  |
+  | o  1:draft 'edit a'
+  |/
+  o  0:draft 'add a'
+  
+  $ hg rebase -d 1
+  rebasing 2:06a50ac6b5ab "conflict in a"
+  merging a
+  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
+  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  [1]
+  $ echo 1 > a
+  $ hg debugobsolete $(hg id -ir 2 --debug)
+  1 new obsolescence markers
+  obsoleted 1 changesets
+  1 new orphan changesets
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg rebase --continue
+XXX: it should have rebased revision 3 since it made changes unrelated to
+destination, so no reason to say "its destination already has all its changes"
+  $ hg rebase -c
+  note: not rebasing 2:06a50ac6b5ab "conflict in a", it has no successor
+  rebasing 3:aea370672fd7 "add b" (tip)
+  note: not rebasing 3:aea370672fd7 "add b" (tip), its destination already has 
all its changes
+  $ hg tglog
+  @  1:draft 'edit a'
+  |
+  o  0:draft 'add a'
+  



To: khanchi97, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel