Patchwork [stable] test-mq-strip.t: add a test for strip --keep with clean working dir

login
register
mail settings
Submitter Siddharth Agarwal
Date April 27, 2013, 5:41 a.m.
Message ID <9ea9ded9d5345f7eabf5.1367041309@sid0x220>
Download mbox | patch
Permalink /patch/1489/
State Accepted
Commit ff01506c68523a92dc7df97e2853f4382300efb1
Headers show

Comments

Siddharth Agarwal - April 27, 2013, 5:41 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1367039245 25200
#      Fri Apr 26 22:07:25 2013 -0700
# Branch stable
# Node ID 9ea9ded9d5345f7eabf53301fe4ef928dadd028b
# Parent  ee107e97fdceba3fb0eab9f2a70edb7470c41e93
test-mq-strip.t: add a test for strip --keep with clean working dir

This helped uncover a bug in a patchset I've been writing.
Matt Mackall - April 27, 2013, 5:19 p.m.
On Fri, 2013-04-26 at 22:41 -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1367039245 25200
> #      Fri Apr 26 22:07:25 2013 -0700
> # Branch stable
> # Node ID 9ea9ded9d5345f7eabf53301fe4ef928dadd028b
> # Parent  ee107e97fdceba3fb0eab9f2a70edb7470c41e93
> test-mq-strip.t: add a test for strip --keep with clean working dir

Queued for stable, thanks.

Patch

diff -r ee107e97fdce -r 9ea9ded9d534 tests/test-mq-strip.t
--- a/tests/test-mq-strip.t	Tue Apr 23 14:16:33 2013 -0700
+++ b/tests/test-mq-strip.t	Fri Apr 26 22:07:25 2013 -0700
@@ -427,9 +427,25 @@  Strip adds, removes, modifies with --kee
   $ hg add b
   $ hg commit -mb
   $ touch c
+
+... with a clean working dir
+
   $ hg add c
   $ hg rm bar
   $ hg commit -mc
+  $ hg status
+  $ hg strip --keep tip
+  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
+  $ hg status
+  ! bar
+  ? c
+
+... with a dirty working dir
+
+  $ hg add c
+  $ hg rm bar
+  $ hg commit -mc
+  $ hg status
   $ echo b > b
   $ echo d > d
   $ hg strip --keep tip