Commit Graph

17 Commits

Author SHA1 Message Date
Matt Mackall
8568a2cad9 progress: stop excessive clearing (issue4801)
The progress bar was being cleared on every write(), regardless of
whether it was currently displayed. This could foul up the display of
any writes that didn't include a linebreak.

In particular, the win32 mode of the color extension was turning
single prompt string writes into two writes, and the resulting
clear/write/clear/write pattern was making the prompt invisible.

We fix this by insisting that we have shown a progress bar and haven't
just cleared it (setting lastprint to 0).

Conveniently, the test suite already had instances of duplicate
clears.. that are now cleared up.
2016-05-06 17:53:06 -05:00
Matt Harbison
6416635956 test-remove: drop a useless Windows specific conditional
The Windows branch didn't pick up the 'deleting' progress bar addition from
fbfaef28d47c.  But since the Windows branch already globbed the error message,
let's just drop the other branch.
2016-04-12 00:34:02 -04:00
timeless
9ba351b1ab remove: add progress support 2016-03-17 21:03:22 +00:00
timeless
f5abb39053 remove: queue warnings until after status messages (issue5140) (API)
Before this change, warnings were interspersed with (and easily drowned out by)
status messages.

API:
abstractsubrepo.removefiles has an extra argument warnings,
into which callees should append their warnings.
  Note: Callees should not assume that there will be items in the list,
  today, I'm lazily including any other subrepos warnings, but
  that may change.

cmdutil.remove has an extra optional argument warnings,
into which it will place warnings.
If warnings is omitted, warnings will be reported via ui.warn()
as before this change (albeit, after any status messages).
2016-03-17 18:19:36 +00:00
timeless
31b015dd64 tests: include progress for test-remove 2016-03-21 04:01:29 +00:00
Simon Heimberg
180e520fa6 tests: do not skip code-checking on some whole files
In filterpyflakes the term no-check-code was probably by accident.
In the test the intention was not to skip the entire file but only one
line. But any skipping seems to be unnecessary since a longer time.
2013-07-01 06:50:58 +02:00
Mads Kiilerich
00be1ef6f3 rm: drop misleading 'use -f' hint for the rm --after 'not removing' warning
A warning mentioning 'forgetting' or 'recording delete' would be more correct
than 'not removing' but also more confusing.
2012-12-09 23:33:16 +01:00
Adrian Buehlmann
5b12c1cd53 test-remove: adapt to differing error message on Windows
On Windows, this part of the test failed with

     $ hg rm --after nosuch
  -  nosuch: No such file or directory
  +  nosuch: The system cannot find the file specified
     [1]

Fixed by glob-ing away the error message if the test is run on Windows
(see for example test-bad-pull.t line 3 for precedent).

test-remove.t now passes on Windows.
2012-10-24 11:51:24 +02:00
Adrian Buehlmann
36604dded8 test-remove: fix \ vs. / issues on Windows
This part of the test failed with

     $ hg rm --after d1
  -  removing d1/a
  +  removing d1\a

on Windows.
2012-10-24 11:38:31 +02:00
Matt Mackall
f5bc386500 remove: don't return error on directories with tracked files
Spotted by Sergey <sergemp@mail.ru>
2012-10-22 16:06:47 -05:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Adrian Buehlmann
c425afcd4c test-remove-new: integrate into test-remove.t 2012-06-10 18:28:42 +02:00
Mads Kiilerich
8c22a0ec28 tests: make (glob) on windows accept \ instead of /
Globbing is usually used for filenames, so on windows it is reasonable and very
convenient that glob patterns accepts '\' or '/' when the pattern specifies
'/'.
2011-11-07 03:25:10 +01:00
Matt Mackall
35b02109ec remove: suggest forget to undo adds 2011-09-16 17:53:58 -05:00
Matt Mackall
ac660e9f65 tests: cleanup exit code handling in unified tests 2010-09-21 16:00:02 -05:00
Martin Geisler
516e74e526 merge with stable 2010-09-01 12:28:34 +02:00
Nicolas Dumazet
789cb13602 tests: unify test-remove 2010-08-30 13:02:54 +09:00