Patchwork D6699: tests: add test for unshelve --interactive --keep

login
register
mail settings
Submitter phabricator
Date July 27, 2019, 4:11 a.m.
Message ID <differential-rev-PHID-DREV-4gmfstxxl5pwmswlpqk7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41087/
State Superseded
Headers show

Comments

phabricator - July 27, 2019, 4:11 a.m.
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-shelve.t

CHANGE DETAILS




To: navaneeth.suresh, #hg-reviewers
Cc: mercurial-devel
phabricator - Aug. 6, 2019, 11:12 a.m.
pulkit added inline comments.

INLINE COMMENTS

> test-shelve.t:1476
> +  
> +  $ hg shelve --list
> +  default         (1s ago)    changes to: add B to foo

Can you show what the new shelve contains? Also add a test when there is partial unshelving going.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - Aug. 7, 2019, 10:18 p.m.
pulkit added a comment.


  You are already working on improving things with `--keep` and `--interactive`, so let's have this patch as a part of that patch.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - Aug. 9, 2019, 6:55 p.m.
pulkit added inline comments.

INLINE COMMENTS

> shelve.py:971
> +    if interactive and opts.get('keep'):
> +        raise error.Abort(_('--keep on interactive is not yet supported'))
>  

`--keep on --interactive ...`

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - Aug. 15, 2019, 2:48 p.m.
This revision is now accepted and ready to land.
pulkit added inline comments.
pulkit accepted this revision.

INLINE COMMENTS

> shelve.py:970
>          basename = shelved[0]
> +    if interactive and opts.get('keep'):
> +        raise error.Abort(_('--keep on --interactive is not yet supported'))

Sorry for missing this earlier, let's move this check above. Maybe before line 944 on this side.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel

Patch

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1420,7 +1420,7 @@ 
   
 #endif
 
-  $ hg unshelve --continue <<EOF
+  $ hg unshelve --continue --keep <<EOF
   > y
   > y
   > EOF
@@ -1437,3 +1437,6 @@ 
   (enter ? for help) [Ynesfdaq?] y
   
   unshelve of 'default-01' complete
+  $ hg shelve --list
+  default-01      (1s ago)    changes to: add A to bars
+  default         (1s ago)    changes to: add B to foo