Commit Graph

1047 Commits

Author SHA1 Message Date
Denis Laxalde
21cd66f96c log: switch to FROMLINE:TOLINE syntax for -L/--line-range
This is more consistent with the followlines() revset.
2017-10-19 12:37:26 +02:00
Denis Laxalde
7b3941db14 log: handle binary files in --line-range patterns
When a file is binary patch.trydiff() would yield None for 'hunkrange'. Handle
this case in the hunksfilter() callback.
Add tests with and without diff.git option as binary handling differs
depending on this option's value.
2017-10-18 19:00:33 +02:00
Boris Feld
540b37e2a9 obsfate: rename obsfate into obsolete in changeset_printer
Yuja's comment on the original obsfate about how we would translate obsfate
and the recent discussions about exposing users to new concepts and names lead
have led me to think that 'obsfate' should be treated as internal jargon. End-
users should not be aware of obsfate, so we replace 'obsfate' by 'obsolete' in
changeset_printer.

It will be easier to understand for end-users, easier to translate and closer
to the original Evolve obsfate output.

I'm aware it's extremely late in the cycle but I think it's an UX improvement
for the end-users.

Differential Revision: https://phab.mercurial-scm.org/D1189
2017-10-19 12:32:42 +02:00
Augie Fackler
28d451ef21 cmdutil: fix status tersing on Python 3
Differential Revision: https://phab.mercurial-scm.org/D1183
2017-10-18 18:30:02 -04:00
Denis Laxalde
75398ab7ec log: add -L/--line-range option to follow file history by line range
We add an experimental -L/--line-range option to 'hg log' taking file patterns
along with a line range using the (new) FILE,FROMLINE-TOLINE syntax where FILE
may be a pattern (matching exactly one file). The resulting history is similar
to what the "followlines" revset except that, if --patch is specified,
only diff hunks within specified line range are shown.

Basically, this brings the CLI on par with what currently only exists in hgweb
through line selection in "file" and "annotate" views resulting in a file log
with filtered patch to only display followed line range.

The option may be specified multiple times and can be combined with --rev and
regular file patterns to further restrict revisions. Usage of this option
requires --follow; revisions are shown in descending order and renames are
followed. Only the --graph option is currently not supported.

The UI is the result of a consensus from review feedback at:

  https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-October/106749.html


The implementation spreads between commands.log() and cmdutil module.
In commands.log(), the main loop may now use a "hunksfilter" factory (similar
to "filematcher") that, for a given "rev", produces a filtering function
for diff hunks for a given file context object.
The logic to build revisions from -L/--line-range options lives in
cmdutil.getloglinerangerevs() which produces "revs", "filematcher" and
"hunksfilter" information. Revisions obtained by following files' line range
are filtered if they do not match the revset specified by --rev option. If
regular FILE arguments are passed along with -L options, both filematchers are
combined into a new matcher.

.. feature::

   Add an experimental -L/--line-range FILE,FROMLINE-TOLINE option to 'hg log'
   command to follow the history of files by line range. In combination with
   -p/--patch option, only diff hunks within specified line range will be
   displayed. Feedback, especially on UX aspects, is welcome.
2017-10-17 21:15:31 +02:00
Denis Laxalde
356644ac1a diff: pass a diff hunks filter function from changeset_printer to patch.diff()
We add a 'hunksfilterfn' keyword argument in all functions of the call
stack from changeset_printer.show() to patch.diff(). This is a callable
that will be used to filter out hunks by line range and will be used in
the "-L/--line-range" option of "hg log" command introduced in the
following changesets.
2017-10-06 14:45:17 +02:00
Boris Feld
d09c69f7b8 log: add obsfate by default in changeset printer
Having an obsfate by default in log will be useful for users to understand why
they have obsolete and unstable changesets. Obsfate will only be shown for
obsolete changesets, which only happens if people opt-in to experimental feature.

But when obsolete changeset are visible, it is very useful to understand where
they are. Having it in log could be sufficient for most people, so they don't
have to learn a new command (like obslog which is itself useful in case of
divergences).

For example, when pulling and working directory parent become obsolete:

  $ hg pull
  ...
  working directory parent is obsolete! (f936c1697205)

This message comes from the Evolve extension.

Obsfate would comes handy:

  $ hg log -G
  o  changeset:   2:6f91013c5136
  |  tag:         tip
  |  parent:      0:4ef7b558f3ec
  |  user:        Boris Feld <boris.feld@octobus.net>
  |  date:        Mon Oct 09 16:00:27 2017 +0200
  |  summary:     A
  |
  | @  changeset:   1:f936c1697205
  |/   user:        Boris Feld <boris.feld@octobus.net>
  |    date:        Mon Oct 09 16:00:27 2017 +0200
  |    obsfate:     rewritten using amend as 2:6f91013c5136
  |    summary:     -A
  |
  o  changeset:   0:feb4dd822b8c
     user:        Boris Feld <boris.feld@octobus.net>
     date:        Tue Oct 09 16:00:00 2017 +0200
     summary:     ROOT

And once we update, we don't have an obsolete changeset in the log anymore so
we don't show obsfate anymore, most users won't see obsfate often if they
don't have obsolete changeset often:

  @  changeset:   2:6f91013c5136
  |  tag:         tip
  |  parent:      0:4ef7b558f3ec
  |  user:        Boris Feld <boris.feld@octobus.net>
  |  date:        Mon Oct 09 16:00:27 2017 +0200
  |  summary:     A
  |
  o  changeset:   0:feb4dd822b8c
     user:        Boris Feld <boris.feld@octobus.net>
     date:        Tue Oct 09 16:00:00 2017 +0200
     summary:     ROOT
2017-10-05 15:25:18 +02:00
Pulkit Goyal
8fe8ec1089 cmdutil: pass metadata from amend() to cleanupnodes
`commit --amend` and amend command in core and extensions rely on
cmdutil.amend() for amending a commit. So the logic to add a note to amend must
reside here. This patch assumes that note will be passed in opts dictionary to
the function and it will be passed to cleanupnodes and then createmarkers to
store the note in the obsmarker metadata.

After this patch, note can be stored on an amend changeset by passing notes as a
part of opts to cmdutil.amend().

Differential Revision: https://phab.mercurial-scm.org/D1094
2017-10-15 15:32:03 +05:30
Denis Laxalde
6c2c086e11 tersestatus: rework dirnode and tersedir docstrings
Follow-up on refactorings 6a96abee0045 and b8c13fc92233 of the original
changeset 8c58ee1e5fa4 by updating the docstrings of dirnode class and tersedir
function:

* rewrite dirnode.iterfilepaths()'s docstring (the method got
  renamed and reimplemented in b8c13fc92233);
* simplify and update dirnode.tersewalk() to remove reference to 'self' and
  'tersedict';
* use the imperative form of verbs in the first sentence of all docstrings.

Differential Revision: https://phab.mercurial-scm.org/D1072
2017-10-14 13:33:37 +02:00
Denis Laxalde
6ff583b949 tersestatus: avoid modifying tersedict
Turn dirnode's methods into generators which can be used to update "tersedict"
in caller. So instead of passing the "tersedict" to be mutated here and there,
it's now clearer where it is updated as it's purely a local variable to
tersedir() function.

While I was here, I renamed _processtersestatus to tersewalk and
_addfilestotersed to iterfilepaths.

Differential Revision: https://phab.mercurial-scm.org/D1043
2017-10-13 04:02:06 +05:30
Denis Laxalde
e623051ee4 tersestatus: make methods part of the dirnode class
Differential Revision: https://phab.mercurial-scm.org/D1042
2017-10-11 21:19:19 +02:00
Pulkit Goyal
4b9eb4d057 tersestatus: re-implement the functionality to terse the status
The previous terse status implementation was hacking around os.listdir() and was
flaky. There have been a lot of instances of mercurial buildbots failing
and google's internal builds failing because of the
hacky implementation of terse status. Even though I wrote the last
implementation but it was hard for me to find the reason for the flake.

The new implementation can be slower than the old one but is clean and easy to
understand.

In this we create a node object for each directory and create a tree
like structure starting from the root of the working copy. While building the
tree like structure we store some information on the nodes which will be helpful
for deciding later whether we can terse the dir or not.
Once the whole tree is build we traverse and built the list of files for each
status with required tersing.

There is no behaviour change as the old test, test-status-terse.t passes with
the new implementation.

Differential Revision: https://phab.mercurial-scm.org/D985
2017-10-06 20:54:23 +05:30
Augie Fackler
b6ffc23eeb cmdutil: remove superfluous pass statements 2017-09-30 07:43:26 -04:00
Martin von Zweigbergk
38828a858a dirstate: use keyword arguments to clarify walk()'s callers
The arguments are especially non-obvious because the order is
different from dirstate.status().

Differential Revision: https://phab.mercurial-scm.org/D846
2017-09-29 14:19:36 -07:00
Yuya Nishihara
b009eae820 scmutil: extract helper functions that returns human-readable change id
We do "'%d:%s' % (ctx...)" at several places, so let's formalize it. A low-
level function, formatrevnode(ui, rev, node), is extracted so we can pass
a manifest rev/node pair.

Note that hex() for manifest output can be replaced with hexfunc() because
it is printed only when debugflag is set.

i18n/de.po is updated so test-log.t passes with no error.
2017-09-24 12:43:57 +09:00
Pulkit Goyal
0c2eb79e40 tersestatus: sort the dictionary before iterating on it
There has report of flakiness in test-status-terse.t. In the terse code, we are
iterating on a dictionary without sorting and since python dicts are unordered,
that can be a reason behind the flakiness. Before we have a better
implementation for the terse thing, let's make sure current implementation
possess minimum bugs.

Differential Revision: https://phab.mercurial-scm.org/D740
2017-09-20 07:46:55 +05:30
Yuya Nishihara
b772b7f536 error: move patch.PatchError so it can easily implement __bytes__ (API) 2017-09-03 16:45:33 +09:00
Gregory Szorc
c904fe4a55 cmdutil: allow extra properties to be added to each context
The changeset displayer allows setting extra keywords to be available
to the templating layer. This patch adds an argument to displaygraph()
to pass a dict of extra properties to be available to every changeset.

Differential Revision: https://phab.mercurial-scm.org/D555
2017-08-03 21:13:27 -07:00
Boris Feld
60d92de7ba cmdutil: fix amend when passing a date
Following https://phab.mercurial-scm.org/D636, passing the same date that the
changeset to amend would results in no new commits but the output changed
from:

  $ hg amend -d '0 0'
  nothing changed
  [1]

to:

  $ hg amend -d '0 0'

Restore the old behavior by parsing the date passed as parameter so the
condition "date == old.date()" correctly works in cases both dates are
identical.

Add a test for covering this regression.

This bug was found thanks to Evolve test suite.

Differential Revision: https://phab.mercurial-scm.org/D691
2017-09-11 18:07:29 +02:00
Saurabh Singh
63cd1bdef8 cmdutil: remove redundant commitfunc parameter in amend (API)
Since the redundant commit during the amend has been been removed, there is no
need for commit callback function in amend now. Therefore, this commit removes
the unused parameter "commmitfunc" which was being used for this purpose.

Test Plan:
Ensured that all the tests pass

Differential Revision: https://phab.mercurial-scm.org/D635
2017-09-01 12:34:36 -07:00
Saurabh Singh
d207bf8f86 cmdutil: remove the redundant commit during amend
There was an extra commit made during the amend operation to track the
changes to the working copy. However, this logic was written a long time back
and newer API's make this extra commit redundant. Therefore, I am removing the
extra commit. After this change, I noticed that

  - Execution time of the cmdutil.amend improved by over 40%.
  - Execution time of "hg commit --amend" improved by over 20%.

Test Plan:
I ensured that the all the hg tests passed after the change. I had
to fix a few tests which were aware of the extra commit made during the amend.

Differential Revision: https://phab.mercurial-scm.org/D636
2017-09-01 12:34:36 -07:00
Martin von Zweigbergk
cb8b36b8aa cleanup: rename "matchfn" to "match" where obviously a matcher
We usually call matchers either "match" or "m" and reserve "matchfn"
for functions.

Differential Revision: https://phab.mercurial-scm.org/D641
2017-09-05 15:06:45 -07:00
Martin von Zweigbergk
e34765d999 amend: use context manager for config override
Differential Revision: https://phab.mercurial-scm.org/D639
2017-09-06 10:41:13 -07:00
Martin von Zweigbergk
f238d550cd amend: delete dead assignment to "newid"
Differential Revision: https://phab.mercurial-scm.org/D638
2017-09-06 10:42:02 -07:00
Saurabh Singh
d84d216df1 amend: moving first assignment of newid closer to its use
newid was needlessly further away from where its intended to be used
leading to bad readability. This commit moves it to address the same. The end
goal is to remove the redundant commit in the amend code path and this commit
takes care of cleaning up some unrelated code before that change.

Test Plan:
ran the test suite

Differential Revision: https://phab.mercurial-scm.org/D597
2017-09-01 12:34:36 -07:00
Saurabh Singh
27a654fdd5 amend: rectify comment
Comment was ambiguous as there can be two parents of a changeset in mercurial.
This commit fixes the comment to clarify that the first parent is being
considered.

Test Plan:
ran the test suite

Differential Revision: https://phab.mercurial-scm.org/D595
2017-08-31 18:35:39 -07:00
Saurabh Singh
2e3d37be51 amend: removing redundant if condition
There is needless checking for the new commit hash not being equal to
the old commit hash. This condition will always be true at this point in the
code path and thus, can be removed safely. This commit removes the redundant
condition.

Test Plan:
ran the test suite.

Differential Revision: https://phab.mercurial-scm.org/D594
2017-09-01 15:08:54 -07:00
Michael Bolin
094c271fff editor: use an unambiguous path suffix for editor files
Changes the API of `ui.edit()` to take an optional `action` argument,
which is used when constructing the suffix of the temp file.
Previously, it was possible to set the suffix by specifying a `suffix` to the
optional `extra` dict that was passed to `ui.edit()`, but the goal is to
drop support for `extra.suffix` and make `action` a required argument.
To this end, `ui.edit()` now yields a `develwarn()` if `action` is not set
or if `extra.suffix` is set.

I updated all calls to `ui.edit()` I could find in `hg-crew` to specify the
appropriate `action`. This means that when creating a commit, instead
of the path to the editor file being something like:

`/tmp/hg-editor-XXXXXX.txt`

it is now something like:

`/tmp/hg-editor-XXXXXX.commit.hg.txt`

Some editors (such as Atom) make it possible to statically define a [TextMate]
grammar for files with a particular suffix. For example, because Git reliably
uses `.git/COMMIT_EDITMSG` and `.git/MERGE_MSG` as the paths for commit-type
messages, it is trivial to define a grammar that is applied when files of
either name are opened in Atom:

https://github.com/atom/language-git/blob/v0.19.1/grammars/git%20commit%20message.cson#L4-L5

Because Hg historically used a generic `.txt` suffix, it was much harder to
disambiguate whether a file was an arbitrary text file as opposed to one
created for the specific purpose of authoring an Hg commit message.

This also makes it easier to add special support for `histedit`, as it has its own
suffix that is distinct from a commit:

`/tmp/hg-histedit-XXXXXX.histedit.hg.txt`

Test Plan:
Added an integration test: `test-editor-filename.t`.

Manually tested: ran `hg ci --amend` for this change and saw that it
used `/tmp/hg-editor-ZZjcz0.commit.hg.txt` as the path instead of
`/tmp/hg-editor-ZZjcz0.txt` as the path.

Verified `make tests` passes.

Differential Revision: https://phab.mercurial-scm.org/D464
2017-08-30 20:25:56 +00:00
Augie Fackler
e2774d9258 python3: wrap all uses of <exception>.strerror with strtolocal
Our string literals are bytes, and we mostly want to %-format a
strerror into a one of those literals, so this fixes a ton of issues.
2017-08-22 20:03:07 -04:00
Yuya Nishihara
507a4c9e22 revset: make match function follow given subset if specified (API)
This should be sensible default since mfunc(subset) is roughly equivalent
to 'subset & mfunc'. The order argument is still there so we can specify
'anyorder' if the order doesn't really matter.
2017-08-30 22:51:28 +09:00
Yuya Nishihara
abe6c88072 revset: move order argument to run-time match function
We no longer need the order flag to build a parsed tree.
2017-08-30 22:41:36 +09:00
David Soria Parra
6d9f90fa8d mdiff: add a --ignore-space-at-eol option
Add an option that only ignores whitespaces at EOL. The name of the option is
the same as Git.

.. feature::

   Added `--ignore-space-at-eol` diff option to ignore whitespace differences
   at line endings.

Differential Revision: https://phab.mercurial-scm.org/D422
2017-08-29 18:20:50 -07:00
Martin von Zweigbergk
9e0298dbb7 morestatus: simplify check for unresolved merge conflicts
Differential Revision: https://phab.mercurial-scm.org/D546
2017-08-28 14:47:18 -07:00
Pulkit Goyal
444d924446 morestatus: check whether the conflict message is None before printing
There are cases like bisect when the conflict message can be None. So we make
sure that we don't print None in that case.

Thanks to Martin for catching this.

Differential Revision: https://phab.mercurial-scm.org/D461
2017-08-21 16:43:37 +05:30
Danny Hooper
54e3286e1e log: add a "graphwidth" template variable
Wrapping text in templates for 'hg log --graph' can't be done very well,
because the template doesn't know how wide the graph drawing is. The edge
drawing function needs to know the number of lines in the template output, so
we need to also determine how wide that drawing would be before we call the
edgefn or evaluate the template.

This patch makes edgefn compute the graph width and pass it into the template
so that we can do something like this:

COLUMNS=10 hg log --graph --template "{fill(desc, termwidth - graphwidth)}"
@  a a a a
|  a a a a
|  a a a a
o    a a a
|\   a a a
| |  a a a
| |  a a a

Using extensions to do this would be relatively complicated due to a lack of
hooks in this area of the code.

In the future it may make sense to have a more generic "textwidth" that tells
you how many columns you can expect to fill without causing the terminal to
wrap your output. I'm not sure there are other situations to motivate this yet,
or if it is entirely feasible.

Differential Revision: https://phab.mercurial-scm.org/D360
2017-08-15 10:15:31 -07:00
Boris Feld
e0873c6bda obsmarker: precnode was renamed into prednode
Update all calls to formatter.write first arguments to remove references to
precnode and use prednode consistently everywhere.

Differential Revision: https://phab.mercurial-scm.org/D414
2017-08-16 10:26:26 +02:00
Martin von Zweigbergk
79f5d2b9d4 commit: use context manager with dirstateguard
When I wrote f33f2b5b4874 (commit: don't let failed commit with
--addremove update dirstate (issue5645), 2017-07-31), Durham's
422ca3501516 (rebase: use one dirstateguard for when using
rebase.singletransaction, 2017-07-20) had not yet landed, so I had to
write it in the old-fashioned way. Now that Durham's patch is in, we
can simplify by using a context manager.

Differential Revision: https://phab.mercurial-scm.org/D406
2017-08-14 23:26:54 -07:00
Martin von Zweigbergk
e037c48f34 commit: move dirstateguard creation out of try-block
This is just a simple refactoring to make the next patch simpler. If
the dirstateguard constructor raises an exception, the finally-block
won't do anything anyway, so this is functionally equivalent (and
there is no except-block).

Differential Revision: https://phab.mercurial-scm.org/D405
2017-08-14 23:26:51 -07:00
Boris Feld
61f35b42fd label: rename log.trouble into log.instability
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Differential Revision: https://phab.mercurial-scm.org/D259
2017-08-03 15:31:54 +02:00
Boris Feld
d833c9f0c7 label: rename trouble.X into instability.X
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Differential Revision: https://phab.mercurial-scm.org/D258
2017-08-03 15:30:41 +02:00
Boris Feld
bd1b933a37 label: rename changeset.troubled into changeset.unstable
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Differential Revision: https://phab.mercurial-scm.org/D257
2017-08-03 14:32:50 +02:00
Pulkit Goyal
3f92988eda morestatus: move fb extension to core by plugging to hg status --verbose
morestatus extension in fbext use to show more context about the state of the
repo like the repository is in a unfinished merge state, or a rebase is going
on, or histedit is going on, listing the files which need to be resolved and
also suggesting ways to handle the situation.

This patch moves the extension directly to core by plugging it into the
--verbose flag of the status command. So now if you are in any unfinished state
and you do hg status -v, it will show you details and help related to the state.

The extension in fbext also shows context about unfinished update state
which is not ported to core as that plug in hooks to update command which need
to be tackled somewhat differently.

The following configuration will turn the behaviour on by default

[commands]
status.verbose = 1

You can also skip considering some states like bisect as follows:

[commands]
status.skipstates=bisect

This patch also adds test for the feature.

.. feature::

   ``hg status -v`` can now show unfinished state. For example, when in
   an unfinished rebase state, ``hg status -v`` might show::

   # The repository is in an unfinished *rebase* state.
   # No unresolved merge conflicts.
   # To continue:                hg rebase --continue
   # To abort:                   hg rebase --abort

Differential Revision: https://phab.mercurial-scm.org/D219
2017-08-03 05:12:35 +05:30
Augie Fackler
ef945af30b merge with stable 2017-08-10 18:55:33 -04:00
Augie Fackler
9a0febea27 merge with stable 2017-08-10 14:23:41 -04:00
Boris Feld
6a8cca1d6e obsmarker: rename precnode into prednode
Rename prednode (predecessors node) into precnode (precursors node) in markers
class. Use util.nouideprecwarn because markers doesn't have easy access to an
ui object.

The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Differential Revision: https://phab.mercurial-scm.org/D243
2017-08-02 19:20:59 +02:00
Boris Feld
b4ef988c72 context: rename troubled into isunstable
As we changed the meaning of unstable between the old vocabulary and the new
one, we can't reuse the unstable method name at the risk of breaking
extensions calling unstable and getting a wrong result.

Instead rename troubled into isunstable so extensions will continue to work.

The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Differential Revision: https://phab.mercurial-scm.org/D242
2017-08-02 19:13:56 +02:00
Boris Feld
b03347ff01 context: rename troubles into instabilities
Rename troubles context method into instabilities.

Copy the old troubles method and add a deprecation warning. This way
extensions calling troubles will see the deprecation warning but will not
break due to new return values.

The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.

Differential Revision: https://phab.mercurial-scm.org/D238
2017-08-02 18:34:39 +02:00
Martin von Zweigbergk
9ce4ef597c commit: don't let failed commit with --addremove update dirstate (issue5645)
Differential Revision: https://phab.mercurial-scm.org/D204
2017-07-31 14:54:57 -07:00
Yuya Nishihara
ba69ca47d4 pathauditor: disable cache of audited paths by default (issue5628)
The initial attempt was to discard cache when appropriate, but it appears
to be error prone. We had to carefully inspect all places where audit() is
called e.g. without actually updating filesystem, before removing files and
directories, etc.

So, this patch disables the cache of audited paths by default, and enables
it only for the following cases:

 - short-lived auditor objects
 - repo.vfs, repo.svfs, and repo.cachevfs, which are managed directories
   and considered sort of append-only (a file/directory would never be
   replaced with a symlink)

There would be more cacheable vfs objects (e.g. mq.queue.opener), but I
decided not to inspect all of them in this patch. We can make them cached
later.

Benchmark result:

- using old clone of http://selenic.com/repo/linux-2.6/ (38319 files)
- on tmpfs
- run HGRCPATH=/dev/null hg up -q --time tip && hg up -q null
- try 4 times and take the last three results

original:
real 7.480 secs (user 1.140+22.760 sys 0.150+1.690)
real 8.010 secs (user 1.070+22.280 sys 0.170+2.120)
real 7.470 secs (user 1.120+22.390 sys 0.120+1.910)

clearcache (the other series):
real 7.680 secs (user 1.120+23.420 sys 0.140+1.970)
real 7.670 secs (user 1.110+23.620 sys 0.130+1.810)
real 7.740 secs (user 1.090+23.510 sys 0.160+1.940)

enable cache only for vfs and svfs (this series):
real 8.730 secs (user 1.500+25.190 sys 0.260+2.260)
real 8.750 secs (user 1.490+25.170 sys 0.250+2.340)
real 9.010 secs (user 1.680+25.340 sys 0.280+2.540)

remove cache function at all (for reference):
real 9.620 secs (user 1.440+27.120 sys 0.250+2.980)
real 9.420 secs (user 1.400+26.940 sys 0.320+3.130)
real 9.760 secs (user 1.530+27.270 sys 0.250+2.970)
2017-07-26 22:10:15 +09:00
Pulkit Goyal
7ea95030b1 status: add a flag to terse the output (issue4119)
This adds an experimental flag -t/--terse which will terse the output. The terse flag
will respect other flags which filters the output. The flag takes a string
whose value can be a subsequence of "marduic" (the order does not matter here.)

Ignored files are not considered while tersing unless -i flag is passed or 'i'
is there is the terse flag value.

The flag is experimental for testing as there may be cases which will produce
strange results with the flag. We can set the terse on by default by simply
passing 'u' to the cmdutil.tersestatus().

This patch also adds a test file with tests covering the new feature.
2017-06-17 20:10:22 +05:30