Patchwork D6078: tests: clarify test setup test in test-uncommit.t

login
register
mail settings
Submitter phabricator
Date March 6, 2019, 11:50 p.m.
Message ID <differential-rev-PHID-DREV-a3rp6y2uh52dq5zpc6pp-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39113/
State Superseded
Headers show

Comments

phabricator - March 6, 2019, 11:50 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I assume the "hg uncommit b" is there to prove that the working copy
  is dirty before we try "hg uncommit --allow-dirty-working-copy b". It
  seems clearer to put that check just before we run the actual test.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-uncommit.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t
--- a/tests/test-uncommit.t
+++ b/tests/test-uncommit.t
@@ -482,10 +482,6 @@ 
   A b
   $ hg unc a
   note: keeping empty commit
-  $ hg unc b
-  abort: uncommitted changes
-  (requires --allow-dirty-working-copy to uncommit)
-  [255]
   $ cat a
   super critical info!
   $ hg log
@@ -498,6 +494,10 @@ 
   
   $ hg ci -Am 'add b'
   $ echo 'foo bar' > b
+  $ hg unc b
+  abort: uncommitted changes
+  (requires --allow-dirty-working-copy to uncommit)
+  [255]
   $ hg unc --allow-dirty-working-copy b
   $ hg log
   changeset:   3:30fa958635b2