Commit Graph

55 Commits

Author SHA1 Message Date
Matt Harbison
7d8bebd9c1 tests: remove (glob) annotations that were only for '\' matches
# skip-blame because this was mechanically rewritten the following script.  I
ran it on both *.t and *.py, but none of the *.py changes were proper.  All *.t
ones appear to be, and they run without addition failures on both Windows and
Linux.

  import argparse
  import os
  import re

  ap = argparse.ArgumentParser()
  ap.add_argument('path', nargs='+')
  opts = ap.parse_args()

  globre = re.compile(r'^(.*) \(glob\)(.*)$')

  for p in opts.path:
      tmp = p + '.tmp'
      with open(p, 'rb') as src, open(tmp, 'wb') as dst:
          for line in src:
              m = globre.match(line)
              if not m or '$LOCALIP' in line or '*' in line:
                  dst.write(line)
                  continue
              if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'):
                  dst.write(line)
                  continue
              dst.write(m.group(1) + m.group(2) + '\n')
      os.unlink(p)
      os.rename(tmp, p)
2017-12-10 22:50:57 -05:00
Rodrigo Damazio Bovendorp
80a38c9b47 help: adding a topic on flags
This is a short topic to explain how command-line flags can be specified.

Some users have been confused by hg offerring different flag syntax than some
other libraries, so it'd be nice to point them to this rather than explaining
it every time.

Differential Revision: https://phab.mercurial-scm.org/D1270
2017-10-30 20:35:30 -07:00
Denis Laxalde
9efc7f05e3 transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Upon pull or unbundle, we display a message with the range of new revisions
fetched. This revision range could readily be used after a pull to look out
what's new with 'hg log'. The algorithm takes care of filtering "obsolete"
revisions that might be present in transaction's "changes" but should not be
displayed to the end user.
2017-10-12 09:39:50 +02:00
Saurabh Singh
f6be9e54c3 test-globalopts: make the test compatible with chg
The test fails when run with the '--chg' option. Therefore, this
commit modifies the test to make it compatible with chg.

Test Plan:
Ran 'test-globalopts.t' with and without the '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D913
2017-10-03 11:10:03 -07:00
Gregory Szorc
04c3125727 commands: update help for "unbundle"
Similar to the recent change to "bundle," this command no longer
just deals with "changegroup" data.
2017-04-01 13:43:52 -07:00
Gregory Szorc
5c890f5f16 commands: update help for "bundle"
We now have a dedicated help topic to describe bundle specification
strings. Let's update `hg bundle`'s documentation to reflect its
existence.

While I was hear, I also tweaked some wording which I felt was out
of date and needed tweaking. Specifically, `hg bundle` no longer
just deals with "changegroup" data: it can also generate files
that have non-changegroup data.
2017-04-01 13:43:43 -07:00
Gregory Szorc
2f6dff3311 help: document bundle specifications
I softly formalized the concept of a "bundle specification" a while
ago when I was working on clone bundles and stream clone bundles and
wanted a more robust way to define what exactly is in a bundle file.

The concept has existed for a while. Since it is part of the clone
bundles feature and exposed to the user via the "-t" argument to
`hg bundle`, it is something we need to support for the long haul.

After the 4.1 release, I heard a few people comment that they didn't
realize you could generate zstd bundles with `hg bundle`. I'm
partially to blame for not documenting it in bundle's docstring.

Additionally, I added a hacky, experimental feature for controlling
the compression level of bundles in 054e64c4d837. As the commit
message says, I went with a quick and dirty solution out of time
constraints. Furthermore, I wanted to eventually store this
configuration in the "bundlespec" so it could be made more flexible.

Given:

a) bundlespecs are here to stay
b) we don't have great documentation over what they are, despite being
   a user-facing feature
c) the list of available compression engines and their behavior isn't
   exposed
d) we need an extensible place to modify behavior of compression
   engines

I want to move forward with formalizing bundlespecs as a user-facing
feature. This commit does that by introducing a "bundlespec" help
page. Leaning on the just-added compression engine documentation
and API, the topic also conveniently lists available compression
engines and details about them. This makes features like zstd
bundle compression more discoverable. e.g. you can now
`hg help -k zstd` and it lists the "bundlespec" topic.
2017-04-01 13:42:06 -07:00
Pierre-Yves David
c15f0613a0 color: update the help table
We also need to reference the new topic in the great old help table.
2017-03-01 20:22:04 +01:00
Augie Fackler
2e832efca3 pager: move most help to a new help topic and deprecate extension 2017-02-07 00:07:53 -05:00
Martin von Zweigbergk
1840263a8c help: merge revsets.txt into revisions.txt
Selecting single and multiple revisions is closely related, so let's
put it in one place, so users can easily find it. We actually did not
even point to "hg help revsets" from "hg help revisions", but now that
they're on a single page, that won't be necessary.
2017-01-11 11:37:38 -08:00
Martin von Zweigbergk
8f2ed099c1 help: make multirevs just an alias for revsets
The multirevs topis seems to be covered well by the revsets topic, so
just make it an alias and remove multirevs.txt.
2016-12-16 09:48:14 -08:00
Augie Fackler
8bed0bf30f merge with stable 2016-10-01 15:10:38 -04:00
Kevin Bullock
9eb7f2dc02 grep: rewrite help to better document current (confusing) behavior 2016-09-23 12:45:10 -05:00
timeless
5fd9e9e1b5 help: use single quotes in use warning 2016-09-20 23:47:46 +00:00
Gregory Szorc
82617319e9 help: add "internals" topic
We introduce the "internals" help topic, which renders an index of
available sub-topics. The sub-topics themselves are still not
reachable via the help system.
2015-12-13 10:35:03 -08:00
Gregory Szorc
db719a7a87 help: scripting help topic
There are a lot of non-human consumers of Mercurial. And the challenges
and considerations for machines consuming Mercurial is significantly
different from what humans face.

I think there are enough special considerations around how machines
consume Mercurial that a dedicated help topic is warranted. I concede
the audience for this topic is probably small compared to the general
audience. However, lots of normal Mercurial users do things like create
one-off shell scripts for common workflows that I think this is useful
enough to be in the install (as opposed to, say, a wiki page - which
most users will likely never find).

This text is by no means perfect. But you have to start somewhere. I
think I did cover the important parts, though.
2015-07-18 17:10:28 -07:00
Matt Harbison
9085702dae pathutil: hint if a path is root relative instead of cwd relative (issue4663)
Given that this path is going to abort, it seems OK to spend the time to do an
alternate lookup to better inform the user.  The path returned by util.pathto()
ends with '/' at least in some cases, so os.path.relpath() is used instead,
which requires python 2.6.
2015-05-11 21:26:13 -04:00
Yuya Nishihara
53f1e7866c commands: replace "working copy" with "working directory" in help/messages
"working directory" is the standard term, we should use it consistently.

But I didn't touch the hint, "run 'hg update' to get a working copy", because
"get a working directory" sounds a bit odd.
2015-03-17 22:47:08 +09:00
anatoly techtonik
6abd5e7bc0 merge: be precise about what merged into what in short desc 2014-11-26 17:22:09 +03:00
Jordi Gutiérrez Hermoso
a7cc108c20 log: do not hide the public phase in debug mode (BC)
When 62900f2373fa introduced phases to the `hg log --debug` output, it
also disabled outputting public phase. At the same time, it always
shows phases in the default template, `hg log --debug -T default`.
Those two should produce the same output, but they don't.

I think it makes a lot more sense to always show all phases. There's
already loss of backwards compatibility in this case when using a
newer hg on an old hg repo, since draft commits will show up in the
output of `hg log --debug`.

Finally, I just don't think that any sort of information should be
hidden with --debug. This flag should be about showing as much
information as possible.
2014-10-04 16:28:28 -04:00
Matt Mackall
4821ef7629 commands: deprecate the parents commands
It's replaced by 'hg summary' or hg log -r 'parents(foo)' and
doesn't need to take up space in our command list anymore.
2014-09-22 16:03:07 -05:00
Matt Mackall
2bbf901e2c tests: fix breakage from locate deprecation 2014-09-16 11:08:14 -05:00
Matt Mackall
e7503a440b files: add new command unifying locate and manifest functionality 2014-09-12 18:32:46 -05:00
Matt Mackall
d2e240d48e help: normalize helplist hints 2014-08-12 04:11:32 -05:00
Matt Mackall
c3f187f7c4 bookmarks: improve the bookmark help (issue4244) 2014-06-18 15:26:07 -05:00
Matt Mackall
ae628826e6 config: move showconfig code and add config as primary alias
Preparation for adding config --edit to launch an editor
2014-02-27 12:42:09 -06:00
Matt Mackall
bae7de95b0 heads: modernize documentation (issue3992)
The old docs emphasized topological heads rather than branch heads and
incorrectly defined branch heads as not having children rather than
descendants.
2013-07-21 18:45:42 -05:00
Matt Mackall
90ddfc6b4b rollback: mark as deprecated 2013-07-16 17:10:26 -05:00
Matt Mackall
d487ab0f65 tip: deprecate the tip command 2013-07-11 19:29:23 -05:00
Mads Kiilerich
4f2a779466 tests: fix for windows - slashes and no serve 2013-01-30 19:40:07 +01:00
Mads Kiilerich
84f8ae3223 scmutil: localize and improve 'not under root' message 2013-01-18 01:24:29 +01:00
Mads Kiilerich
db42f91a88 tests: convert some 'hghave no-outer-repo' to #if
In some places we instead use 'hg init' to create a well-known outer repo
without any special extensions or other config settings.
2012-06-20 23:41:21 +02:00
Martin Geisler
65ea7aa7d4 dispatch: lowercase --time message 2012-06-12 14:18:18 +02:00
Martin Geisler
63259931d2 help: consistently use title capitalization for help topics 2012-04-30 11:51:24 +02:00
Matt Mackall
578253989c help: add phases topic 2012-01-26 11:23:14 -06:00
Olav Reinert
c5f1adceef help: fix column alignment in "hg help" output
The output of "hg help" is changed to ensure that the column containing
descriptions of commands, extensions, and other topics is correctly alignmened.
2012-01-11 18:14:55 +01:00
Pierre-Yves David
a2fe028df9 phases: add a phases command to display and manipulate phases 2012-01-10 19:45:35 +01:00
Martin Geisler
cf414756e1 dispatch: lowercase abort message 2012-01-06 16:16:58 +01:00
Matt Mackall
06ac7c8606 graft: add initial implementation 2011-10-12 18:45:36 -05:00
Matt Mackall
c8c26720e0 fileset: add a help topic
Add crosslinking with patterns topic.
2011-06-18 16:53:49 -05:00
Matt Mackall
310bb08a92 revert: rewrite help summary
New users have a tendency to mistake 'revert' as the command to use to
check out old revisions. They also occasionally mistake revert for a
generalized undo (compare rollback).

This version intentionally aims to avoid mentioning 'earlier' and thus
intentionally no longer alludes to the (secondary) -r behavior (which
in fact is not actually limited to 'earlier').

Instead, we mention checkout state, to convey that we can
restore things to the way they were when checked out.
2011-06-06 17:38:32 -05:00
Yun Lee
c6804b1629 help: move hgignore man page into built-in help (issue2769) 2011-04-17 23:08:35 +08:00
Matt Mackall
a33ce77f33 dispatch: improve repository not found message
This should help clarify what the problem is in various problematic
cases like ssh.
2011-04-20 14:28:40 -05:00
Yun Lee
fd8965dcbb help: sort help topics to make the output more readable (issue2751) 2011-04-05 12:40:47 +08:00
Peter Arrenbrecht
8f2d068a05 discovery: avoid discovery when local graph is a subset of remote
Immediately sends local's heads to the server to check whether the server knows them all.
If it does, we can call getbundle immediately.

Interesting test output changes are:

-  added 1 changesets with 0 changes to 1 files (+1 heads)
+  added 1 changesets with 0 changes to 0 files (+1 heads)

-> The new getbundle() actually fixes a bug vs. changegroupsubset() in that it no longer
returns unnecessary files when file revs are reused.

warning: repository is unrelated
+  requesting all changes

-> The new use of common instead of bases correctly indicates that an unrelated pull
gets all changes from the server.
2011-03-23 16:06:55 +01:00
Matt Mackall
d27d1fae16 bookmarks: move push/pull command features to core 2011-02-10 13:46:28 -06:00
Martin Geisler
d2eec2cbbc commands: clarify which aliases "hg help -v" show (issue2572) 2011-01-05 10:47:35 +01:00
Patrick Mezard
4f21d24f6f Add subrepos help topic
Edited by:
Martin Geisler <mg@lazybytes.net>
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
2010-10-24 19:28:44 +02:00
Matt Mackall
9eec9de27b tests: fix up changed output 2010-10-20 15:09:38 -05:00
Brodie Rao
95903377bf dispatch: properly handle relative path aliases used with -R (issue2376)
This ensures the repo config is read relative to the repo root during
dispatch.
2010-10-04 15:07:12 -05:00