Commit Graph

2062 Commits

Author SHA1 Message Date
Martin Geisler
90ff407862 debugbuilddag: escape backslash properly in help string 2010-08-15 17:33:03 +02:00
Greg Ward
b38d220736 commit: explicitly document the existence of "last-message.txt" 2010-08-14 14:57:33 +02:00
Martin Geisler
fb68103f19 Merge with stable 2010-08-13 10:28:59 +02:00
Mark Edgington
f3ee05373b resolve: updated help documentation for improved clarity 2010-08-12 22:48:22 +02:00
Martin Geisler
c3f9a46ceb Merge with stable 2010-08-11 12:30:18 +02:00
Martin Geisler
eeae22999b commands: use round parenthesis in 'hg head --active' help
This is the style used in the rest of the help strings.
2010-08-11 12:21:27 +02:00
Matt Mackall
9cc346f0b4 help: fix bytes/digit confusion for hashes
spotted by FUJIWARA Katsunori <fujiwara@ascade.co.jp>
2010-07-31 18:27:03 -05:00
Matt Mackall
272a0b3fc3 Merge with stable 2010-07-27 16:04:00 -05:00
Benjamin Pollack
728f9bcc7e tag: do not allow tag names to consist solely of whitespace (issue2307)
(simplification and test by mpm)
2010-07-27 14:40:25 -04:00
Patrick Mezard
14211b6209 debugbuilddag: build repository content in binary mode 2010-07-26 23:26:15 +02:00
Nicolas Dumazet
7a95a27065 bundle: lookup revisions after addbranchrevs
When addbranchrevs extends revs, it adds changeset hashes, and not node ids.
Which means that we have to lookup for revisions _after_ the addbranchrevs
call, instead of before.
2010-07-20 18:29:00 +09:00
Mads Kiilerich
b098dc8c48 revert: rename original to .orig instead of copying (issue2282)
By renaming before reverting the content of the file we ensure that we handle
and break hardlinks properly.

Handling of other hardlinks to .orig is somebody elses problem.
2010-07-13 03:04:14 +02:00
Steve Losh
aaac1bb52d commands: fix update's help to be more accurate
Branches can have multiple heads, so it doesn't make sense to speak of "the
head of the current branch". What update really does is try to update to the
*tip* of the current branch.
2010-07-14 18:28:12 -04:00
FUJIWARA Katsunori
2f9dbb12f7 i18n: use encoding.colwidth() for correct column width
Some encoding and language combinations (e.g.: UTF-8 and Japanese)
cause encoding characters into sequence of bytes more than column
width of them.

So, encoding.colwidth() should be applied instread of len() on i18n
strings.

In addition to it, formatting by '%*s'/'%-*s' also uses "number of
bytes" to calculate space padding size, and should be fixed, too.
2010-07-18 01:06:50 +09:00
Nicolas Dumazet
517eb64655 merge with stable 2010-07-22 15:14:22 +09:00
Matt Mackall
33994da433 Merge with stable 2010-07-20 15:07:10 -05:00
Martin Geisler
7f537e599c Merge with stable 2010-07-19 00:43:34 +02:00
Martin Geisler
138130c348 archival: move commands.archive.guess_type to archival.guesskind
The list of suffixes for each kind of archive belongs in archival.
Renamed function to fit with out code style.
2010-07-14 20:25:31 +02:00
Dirkjan Ochtman
e647af81b9 commands: addremove does similarity 100 by default 2010-07-13 17:30:29 +02:00
Martin Geisler
5fbbb27c25 Merge with stable 2010-07-09 14:21:45 +02:00
Arnab Bose
a9ac0e99d7 commands: mention "hg status -C" in addremove help 2010-07-09 13:31:37 +02:00
Steve Losh
c2cf2592b2 dispatch: add shell aliases
This patch adds git-style "shell aliases" to Mercurial.

Any alias with a definition beginning with a '!' will be treated as a shell
alias. For example:

    [alias]
    echo = !echo
    qempty = !hg qrefresh -X "`hg root`" ; echo Emptied patch "`hg qtop`"

    $ hg echo foo
    foo
    $ hg qempty
    Emptied patch foo
    $
2010-07-07 18:49:43 -04:00
Robert Bauck Hamar
d6a84c6ef2 commands: only warn when reopening the workdir's branch
When commiting, a check is made to see if one of the parents is a
closed head. However this did not check that the branch of the commit
is the same as the closed head, so one could get a warning message on
the sequence

  hg commit --close-branch
  hg branch new-branch
  hg commit

or when merging in a closed head.
2010-07-07 14:11:59 +02:00
Yuya Nishihara
910c40b6b6 log: fix missing diff output for hg log -p in sub directory
prep(ctx, fns) receives paths relative to repository root, not cwd.
2010-07-02 23:49:06 +09:00
Nicolas Dumazet
1624d50ea1 commands: document return values of add and paths commands 2010-07-04 17:05:17 +09:00
Mads Kiilerich
812bb21f4d log: follow filenames through renames (issue647)
In commands.log a displayer was initialized from
cmdutil.show_changeset() with the initial matchfn (which designates
the specified files which only is correct in the highest revision in
the range). prep() is handed the correct list of files, but
displayer.show() didn't use that list but keept using the original
matchfn.

The matchfn argument to cmdutil.show_changeset() wasn't specified in
other places and is only used in .show(), so now we give the matchfn
as an optional parameter to .show().

We do however still have to detect --patch and --stat from opts in
show_changeset() and let it imply a matchall, but that can now be
overruled with the new .show() matchfn parameter.
2010-06-29 12:12:34 +02:00
Mads Kiilerich
07f64c28d2 revert: Make it clearer when not to use revert 2010-06-28 15:08:01 +02:00
Matt Mackall
5c92f50408 merge: document how to 'undo' a merge 2010-06-27 17:41:43 -05:00
Matt Mackall
e4cf775b71 addchangegroup: pass in lock to release it before changegroup hook is called
Currently, callers of addchangegroup first acquire the repository
lock, usually to check that an unbundle request isn't racing. This
means that changegroup hook actions that might write to a repo get
stuck waiting for a lock. Here, we add a new optional lock parameter
and update all the callers. Post-1.6 we may make it non-optional.
2010-06-25 13:47:28 -05:00
Martin Geisler
547f89d8a5 commands: advertise "hg help revsets" in help for log 2010-06-18 21:35:21 +02:00
Matt Mackall
3902a6d8f6 pushkey: add debugpushkey command for testing 2010-06-16 16:05:47 -05:00
Greg Ward
20b557f443 merge: when current branch has 1 or > 2 heads, actually abort.
Currently merge just prints abort-like messages to stderr and then
exits with a misleading status 0 (cleverly disguised as "False").
With this change it raises Abort, just like every other fatal error.
2010-06-14 16:06:52 -04:00
Martin Geisler
e996783e84 commands: get rid of generic exception in debugbuilddag 2010-06-15 09:53:50 +02:00
Martin Geisler
96576cd383 commands: format is a Python2.6 function 2010-06-11 18:54:10 +02:00
Peter Arrenbrecht
b9ce7f49a5 debugbuilddag: build a changelog dag from a concise description
Useful in tests to quickly build a complex DAG in an empty repo.
Handles local tags and named branches.
Options to, at each rev,
 - create a new file,
 - overwrite the same file,
 - append to the same file,
 - write to a specific line in a mergeable file.
Can run shell commands during DAG buildup.
2010-06-10 11:49:48 +02:00
Peter Arrenbrecht
a9d00c7c41 debugdag and debugindexdag: emit changelog/revlog DAGs as concise text
Mainly useful for reusing DAGs somewhere else, for example for attaching
them to a bug report, or for importing them into other environments
(like my test environment for incoming/outgoing discovery).
2010-06-10 11:48:45 +02:00
Matt Mackall
1cf1295d6e summary: report copies and renames 2010-06-09 16:39:25 -05:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Gilles Moris
54d30f05ab commit: fix display of 'created new head' message (issue2186)
To avoid recurrent fixes for the display of this message, a summary table with
all case combinations has been added to the code.
Basically, there is two condition for the message to be printed:
* this is not an initial (named branch or topo) root
* none of the parents are in the current branch heads
2010-06-08 22:28:42 +02:00
Steve Borho
0d0e614fc9 Merge backout 2010-06-08 15:52:56 -05:00
Steve Borho
b82bd4f289 Backed out changeset: 1bfde817782c 2010-06-08 15:52:41 -05:00
Dirkjan Ochtman
af6b696f0f move working dir/dirstate methods from localrepo to workingctx 2010-06-07 20:03:32 +02:00
Steve Borho
e91613380a color: labeled text should be passed to ui.write() as ui.labeled
Some implementations of ui.label() (HTML versions in particular) must escape
the provided text and then markup the text with their tags.  When this marked
up text is then passed to ui.write(), we must label the text as 'ui.labeled'
so the implementation knows not to escape it a second time (exposing the initial
markup).

This required the addition of a 'ui.plain' label for text that is purposefully
not marked up.

I was a little pedantic here, passing even ' ' strings to ui.label() when it
would be included with other labeled text in a ui.write() call.   But it seemed
appropriate to lean to the side of caution.
2010-06-03 23:18:18 -05:00
Dirkjan Ochtman
cf1de649bd move discovery methods from localrepo into new discovery module 2010-06-07 18:35:54 +02:00
FUJIWARA Katsunori
9cce255bec replace Python standard textwrap by MBCS sensitive one for i18n text
Mercurial has problem around text wrapping/filling in MBCS encoding
environment, because standard 'textwrap' module of Python can not
treat it correctly. It splits byte sequence for one character into two
lines.

According to unicode specification, "east asian width" classifies
characters into:

   W(ide), N(arrow), F(ull-width), H(alf-width), A(mbiguous)


W/N/F/H can be always recognized as 2/1/2/1 bytes in byte sequence,
but 'A' can not. Size of 'A' depends on language in which it is used.

Unicode specification says:

   If the context(= language) cannot be established reliably they
   should be treated as narrow characters by default

but many of class 'A' characters are full-width, at least, in Japanese
environment.

So, this patch treats class 'A' characters as full-width always for
safety wrapping.

This patch focuses only on MBCS safe-ness, not on writing/printing
rule strict wrapping for each languages

MBCS sensitive textwrap class is originally implemented
by ITO Nobuaki <daydream.trippers@gmail.com>.
2010-06-06 17:20:10 +09:00
Matt Mackall
a1c4034fda revset: add a debugrevspec command 2010-06-01 11:18:57 -05:00
Matt Mackall
86ebd43d71 remoteui: move from cmdutil to hg 2010-06-01 11:18:57 -05:00
Martin Geisler
02f8de2883 commands: document --new-branch flag for push 2010-05-25 09:57:19 +02:00
Martin Geisler
c5e5ad33a2 Merge with stable 2010-05-25 09:56:26 +02:00
Faheem Mitha
f0ea5d41d2 commands: updates to push docstring.
With contributions from mg, hstuart, timeless, and vsh.
2010-05-24 21:52:33 +05:30
Sune Foldager
f9f5488566 push: add --new-branch option to allow intial push of new branches
Compare this to --force which allows anything to be pushed. With --new-branch,
only changesets to named branches not present on the and changesets not
introducing additional heads on existing branches are allowed.

Developed by
  Henrik Stuart <henrik.stuart@edlund.dk>
  Sune Foldager <cryo@cyanite.org>
2010-05-21 15:22:29 +02:00
Martin Geisler
efb4a38a04 Use our custom hg reStructuredText role some more
I missed these occurrences on my first scan through the source.
2010-05-18 16:31:10 +02:00
Steve Losh
6c5a8fed4b tag: add -e/--edit option for modifying the commit message 2010-05-15 23:33:22 -04:00
Henri Wiechers
7134ed3f0f help: add -e/--extension switch to display extension help text 2010-01-20 20:24:20 +02:00
Martin Geisler
c1f08a81f6 debugbuilddag: read DAG from stdin if not given on cmdline 2011-05-09 18:11:08 +02:00
Martin Geisler
08ab74f879 debugbuilddag: output progress information 2011-05-09 14:40:49 +02:00
Adrian Buehlmann
4163cf2e6f rename util.find_exe to findexe 2011-05-08 20:35:46 +02:00
Patrick Mezard
e0378ee5bd patch: make patch()/internalpatch() always update the dirstate 2011-05-08 17:48:31 +02:00
Patrick Mezard
88e958194e patch: move updatedir() from cmdutil into patch
Also, create an artificial wdutil.py to avoid import cycles between patch.py
and cmdutil.py.
2011-05-08 17:48:30 +02:00
Sune Foldager
bae0240022 debugindex: change output for generaldelta revlogs
For generaldelta revlogs, reporting the deltaparent instead of the chain base
makes more sense, since that's what's actually stored in the revlog.
2011-05-07 23:14:36 +02:00
Sune Foldager
88485e9322 revlog: calculate base revisions iteratively
This is in preparation for generaldelta, where the revlog entry base field is
reinterpreted as the deltaparent. For that reason we also rename the base
function to chainbase.

Without generaldelta, performance is unaffected, but generaldelta will suffer
from this in _addrevision, since delta chains will be walked repeatedly.
A cache has been added to eliminate this problem completely.
2011-05-07 22:40:14 +02:00
Patrick Mezard
da2bf866c1 debugbuilddag: simplify tags serialization a bit 2011-05-07 17:25:02 +02:00
Wagner Bruna
8d97c7a927 commands, i18n: add translation hint for split message 2011-05-06 15:48:04 -03:00
Matt Mackall
ac5d056e58 merge with abuehl 2011-05-06 13:04:24 -05:00
Matt Mackall
05c3219fba merge with crew 2011-05-06 11:50:58 -05:00
Adrian Buehlmann
b79bd6d178 rename util.set_signal_handler to setsignalhandler 2011-05-06 15:41:04 +02:00
Peter Arrenbrecht
635fef062f summary: run discovery only once for in/out against same repo
Reuses the result of findcommonincoming if default and default-push
are the same.
2011-05-06 14:45:13 +02:00
Peter Arrenbrecht
d4abc4d642 discovery: resurrect findoutgoing as findcommonoutgoing for extension hooks
discovery.findoutgoing used to be a useful hook for extensions like
hgsubversion. This patch reintroduces this version of findcommonincoming
which is meant to be used when computing outgoing changesets.
2011-05-06 14:44:18 +02:00
Adrian Buehlmann
e981d64ef2 rename path_auditor to pathauditor
The Mercurial 1.9 release is moving a lot of stuff around anyway and we are
already moving path_auditor from util.py to scmutil.py for that release.

So this seems like a good opportunity to do such a rename. It also strengthens
the current project policy to avoid underbars in names.
2011-05-06 09:54:06 +02:00
Martin Geisler
42c642ca22 annotate: use real Booleans instead of 0/1 2011-05-06 11:11:55 +02:00
Martin Geisler
823fefa7a6 commands: use util.Abort's hint some more 2011-05-05 14:57:21 +02:00
Martin Geisler
686a64c49c commands: use double-quotes for strings with single-quotes
The globalopts table contain a couple of \' still, but it was
normalized like that in cd2bb3dda566.
2011-05-05 12:16:43 +02:00
Kevin Bullock
c38d0cc58b bookmarks: allow deactivating current bookmark with -i 2011-05-04 10:43:47 -05:00
Kevin Bullock
b95625191f bookmarks: allow to create/move bookmark without making it current (issue2788)
Adds a -i/--inactive flag to the bookmarks command to create or move a
bookmark without making it the current one. This lets you use a bookmark
like a shareable, movable 'tag' and less like a 'branch'.

Thanks to Alexander Solovyov <alexander@solovyov.net> for most of the
work of implementation, and Matt Mackall <mpm@selenic.com> for
suggesting the option name.
2010-12-11 18:08:55 +01:00
Dan Villiom Podlaski Christiansen
511c941422 prevent transient leaks of file handle by using new helper functions
These leaks may occur in environments that don't employ a reference
counting GC, i.e. PyPy.

This implies:
 - changing opener(...).read() calls to opener.read(...)
 - changing opener(...).write() calls to opener.write(...)
 - changing open(...).read(...) to util.readfile(...)
 - changing open(...).write(...) to util.writefile(...)
2011-05-02 10:11:18 +02:00
Peter Arrenbrecht
75fa0e5ea9 discovery: add new set-based discovery
Adds a new discovery method based on repeatedly sampling the still
undecided subset of the local node graph to determine the set of nodes
common to both the client and the server.

For small differences between client and server, it uses about the same
or slightly fewer roundtrips than the old tree-based discovery. For
larger differences, it typically reduces the number of roundtrips
drastically (from 150 to 4, for instance).

The old discovery code now lives in treediscovery.py, the new code is
in setdiscovery.py.

Still missing is a hook for extensions to contribute nodes to the
initial sample. For instance, Augie's remotebranches could contribute
the last known state of the server's heads.

Credits for the actual sampler and computing common heads instead of
bases go to Benoit Boissinot.
2011-05-02 19:21:30 +02:00
Peter Arrenbrecht
8960775f93 debugbuilddag: use memctx for speed
This drops the options to run arbitrary shell commands within
commits and the option to create a file that gets appended to
in every revision. It now supports to not write file data at
all, which is very fast for generating a pure 00changelog.i
(useful for discovery tests, for instance).

Timings for 1000 linear nodes:
 * Old `hg debugbuilddag -o '+1000'` took 4.5 secs.
 * New `hg debugbuilddag -o '+1000'` takes 2 secs.
 * New `hg debugbuilddag '+1000'` takes 0.8 secs.

(The last one creates only 00changelog.i).
2011-05-02 19:21:30 +02:00
Yuya Nishihara
bb70e72628 bisect: fix indent level 2011-05-02 01:29:51 +09:00
Benoit Boissinot
b805aced54 unbundler: separate delta and header parsing
Add header parsing for changelog and manifest (currently no headers might
change for next-gen bundle).
2011-04-30 19:01:24 +02:00
Benoit Boissinot
c5f5260aea bundler: make parsechunk return the base revision of the delta 2011-04-30 10:00:41 +02:00
Alexander Solovyov
2f6ab6bf04 revset aliases 2011-04-30 18:30:14 +02:00
Brodie Rao
b7f0d2a103 url: move URL parsing functions into util to improve startup time
The introduction of the new URL parsing code has created a startup
time regression. This is mainly due to the use of url.hasscheme() in
the ui class. It ends up importing many libraries that the url module
requires.

This fix helps marginally, but if we can get rid of the urllib import
in the URL parser all together, startup time will go back to normal.

perfstartup time before the URL refactoring (707e4b1e8064):

! wall 0.050692 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

current startup time (9ad1dce9e7f4):

! wall 0.070685 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

after this change:

! wall 0.064667 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
2011-04-30 09:43:20 -07:00
Peter Arrenbrecht
b867e650e6 discovery: drop findoutgoing and simplify findcommonincoming's api
This is a long desired cleanup and paves the way for new discovery.
To specify subsets for bundling changes, all code should use the heads
of the desired subset ("heads") and the heads of the common subset
("common") to be excluded from the bundled set. These can be used
revlog.findmissing instead of revlog.nodesbetween.

This fixes an actual bug exposed by the change in test-bundle-r.t
where we try to bundle a changeset while specifying that said changeset
is to be assumed already present in the target. This used to still
bundle the changeset. It no longer does. This is similar to the bugs
fixed by the recent switch to heads/common for incoming/pull.
2011-04-30 17:21:37 +02:00
Alexander Solovyov
0eb3836642 remove unused imports and variables 2011-04-30 13:59:14 +02:00
Alexander Solovyov
23228e2ea0 drop {short,hex}(ctx.node()) calls in favor of ctx methods 2011-04-30 12:55:07 +02:00
Peter Arrenbrecht
9855dca4f8 wireproto: add test for new optional arg missing on server
New argument is silently ignored by both HTTP and SSH servers.
This means we can, for instance, add new flags to getbundle()
to request advanced features (like lightweight-copy-aware bundles),
and older servers will silently ignore this request and send back
a plain bundle.
2011-04-29 14:54:01 +02:00
Martin Geisler
539e56249b merge with stable 2011-04-26 13:13:35 +02:00
Adrian Buehlmann
9a67b02dba move rcpath from util to scmutil 2011-04-21 20:14:29 +02:00
Adrian Buehlmann
307196b733 move path_auditor from util to scmutil 2011-04-20 22:43:31 +02:00
Adrian Buehlmann
cf126bb7dd move opener from util to scmutil 2011-04-20 19:54:57 +02:00
Matt Mackall
27af4239ba merge with stable 2011-04-20 12:44:32 -05:00
Idan Kamara
392e524251 update: fix check for no rev when a date is given
The previous check caught a corner case in which rev
was pointing to 0.
2011-04-19 14:56:46 +03:00
Matt Mackall
3960f4de1d merge with stable 2011-04-18 20:52:08 -05:00
Idan Kamara
3adc383a95 identify: restructure code to make it more readable 2011-04-19 01:08:35 +03:00
Adrian Buehlmann
3efb31d590 help: do not show full help text for command on option errors
Example

  $ hg clone --jump foo bar
  hg clone: option --jump not recognized
  hg clone [OPTION]... SOURCE [DEST]

  make a copy of an existing repository

  options:

   -U --noupdate           the clone will include an empty working copy (only a
                           repository)
   -u --updaterev REV      revision, tag or branch to check out
   -r --rev REV [+]        include the specified changeset
   -b --branch BRANCH [+]  clone only the specified branch
      --pull               use pull protocol to copy metadata
      --uncompressed       use uncompressed transfer (fast over LAN)
   -e --ssh CMD            specify ssh command to use
      --remotecmd CMD      specify hg command to run on the remote side
      --insecure           do not verify server certificate (ignoring
                           web.cacerts config)

  [+] marked option can be specified multiple times

  use "hg help clone" to show the full help text

Motivation for this change

  If the user already has specified the command, he probably already knows
  the command to some extent. Apparently, he has a problem with the options,
  so we show him just the synopsis with the short help and the details about
  the options, with a hint on the last line how to get the full help text.

Why is Mercurial better with this change?

  Experts who just forgot about the details of an option don't get that
  much text thrown at them, while the newbies still get a hint on the last
  line how to get the full help text.
2011-04-17 11:37:11 +02:00
Md. O. Shayan
475f1c2d09 grep: don't print data from binary files for matches (issue2614) 2011-04-09 23:13:17 +05:30
Idan Kamara
17914fe278 bookmarks: change error messages to match those given by 'hg tag' commands 2011-04-07 17:57:38 +03:00
Martin Geisler
43d795e497 commit: note when files are missing
Before, you could experience the following strange interaction:

  $ hg commit
  nothing changed
  $ hg merge
  abort: outstanding uncommitted changes

which confused at least one user in #mercurial.
2011-04-06 16:21:12 +02:00
Idan Kamara
bcbd1c4dc5 tags: no need to check for valid nodes
_findtags in localrepo checks that nodes exist in the revlog so we
can't get a LookupError here.

The output of 'hg tags' stays the same since tags to unknown nodes
didn't get printed before anyway due to 734bab2916a6.
2011-04-04 23:43:22 +03:00
Arne Babenhauserheide
8fe2ac6071 merge: added info that hg help merge-tools shows the options for --tool 2011-04-05 19:48:44 +02:00
Matt Mackall
a8dd64dcb0 misc: replace .parents()[0] with p1() 2011-04-04 16:21:59 -05:00
Adrian Buehlmann
9db9ae7e0e revert: note that added files are left as is 2011-04-01 22:44:58 +02:00
Kevin Berridge
58214a3429 pull: new output message when there are multiple branches
Pull outputs a slightly new message when there are multiple branches and
the current branch has many heads:
(run 'hg heads .' to see heads, 'hg merge' to merge)

This message adds the "." in hg heads to encourage you to consider only the
current branch's heads.
2011-03-28 20:56:56 -04:00
Kevin Berridge
87ae31d662 pull: don't suggest running hg merge when new heads are on different branches
After a pull when new heads are added but no head is added on the current
branch, the "run 'hg merge'" message can be misleading.  This patch doesn't
output the merge message in that scenario.
2011-03-11 20:43:12 -05:00
Adrian Buehlmann
af6e59941f debugstate: add new --datesort option
sorts the output lines by mtime, then by filename
2011-03-26 10:59:33 +01:00
Patrick Mezard
92074cd441 patch: deprecate ui.patch / external patcher feature
Why?
- Mercurial internal patcher works correctly for regular patches and git
  patches, is much faster at least on Windows and is more extensible.
- In theory, the external patcher can be used to handle exotic patch formats. I
  do not know any and have not heard about any such use in years.
- Most patch programs cannot handle git format patches, which makes the API
  caller to decide either to ignore ui.patch by calling patch.internalpatch()
  directly, or take the risk of random failures with valid inputs.
- One thing a patch program could do Mercurial patcher cannot is applying with
  --reverse. Apparently several shelve like extensions try to use that,
  including passing the "reverse" option to Mercurial patcher, which has been
  removed mid-2009. I never heard anybody complain about that, and would prefer
  reimplementing it anyway.

And from the technical perspective:
- The external patcher makes everything harder to maintain and implement. EOL
  normalization is not implemented, and I would bet file renames, if supported
  by the patcher, are not correctly recorded in the dirstate.
- No tests.

How?
- Remove related documentation
- Clearly mark patch.externalpatch() as private
- Remove the debuginstall check. This deprecation request was actually
  triggered by this last point. debuginstall is the only piece of code patching
  without a repository. When migrating to an integrated patch() + updatedir()
  call, this was really a showstopper, all workarounds were either ugly or
  uselessly complicated to implement. If we do not support external patcher
  anymore, the debuginstall check is not useful anymore.
- Remove patch.externalpatch() after 1.9 release.
2011-03-24 10:28:29 +01:00
Patrick Mezard
4e7e0fa921 code indentation fixes 2011-03-23 23:33:14 +01:00
Peter Arrenbrecht
6646f48826 wireproto: add getbundle() function
getbundle(common, heads) -> bundle

Returns the changegroup for all ancestors of heads which are not ancestors of common. For both
sets, the heads are included in the set.

Intended to eventually supercede changegroupsubset and changegroup. Uses heads of common region
to exclude unwanted changesets instead of bases of desired region, which is more useful and
easier to implement.

Designed to be extensible with new optional arguments (which will have to be guarded by
corresponding capabilities).
2011-03-23 16:02:11 +01:00
Matt Mackall
70da923d41 debugbundle: fix up long line caught by check-code 2011-03-22 21:27:51 -05:00
Peter Arrenbrecht
4e49d0830f commands: add debugbundle command
Lists ids contained in a bundle file. Useful for testing bundle-related commands.
2011-03-22 09:22:29 +01:00
Peter Arrenbrecht
d542bac8c7 wireproto: add known([id]) function
known([Node]) -> [1/0]

Returns 1/0 for each node, indicating whether it's known by the server.
Needed for new discovery protocols introduced in later patches.
2011-03-22 09:22:21 +01:00
Peter Arrenbrecht
375ab88b9f debug: add debugwireargs to test argument passing over the wire
Tests argument passing locally, via HTTP, and via SSH. This is mainly preparation
for the next patch.
2011-03-22 07:38:32 +01:00
Matt Mackall
ca9fdc1884 annotate: catch nonexistent files using match.bad callback (issue1590) 2011-03-19 01:34:49 -05:00
Matt Mackall
9bb3fa8c69 merge with stable 2011-03-17 17:08:13 -05:00
Bernhard Leiner
baf797018e revset: report a parse error if a revset is not parsed completely (issue2654) 2011-03-16 23:09:14 +01:00
David Soria Parra
10510a0de1 bundle: update current bookmark to most recent revision on current branch
We check if the current bookmark is set to the first parent of the
dirstate. Is this the case we move the bookmark to most recent revision
on the current branch (where hg update will update you to).
2011-03-14 23:03:56 +01:00
David Soria Parra
4e5087c547 bookmarks: separate bookmarks update code from localrepo's pull.
We explicitly want to update bookmarks from a remote. This will avoid
duplicate calls to listkeys if we clone (which calls pull) and keep
bookmark related code together.
2011-03-14 00:10:43 +01:00
Nils Adermann
8a18a9288e identify: list bookmarks for remote repositories 2011-03-12 18:15:14 +01:00
Steve Borho
89afb35fbf diff: make diff -c aware of revision sets 2011-03-14 13:11:26 -05:00
Benoit Boissinot
48b6ee837f merge with stable 2011-03-13 15:59:50 +01:00
Dirkjan Ochtman
cbdd758cb8 help: limit documentation width to at most 80 characters
Reading long lines is suboptimal no matter how wide the terminal is.
2011-03-13 13:38:44 +01:00
Benoit Boissinot
8292de5b35 bisect: new command to extend the bisect range (issue2690)
When bisect ends in a merge point, and one of the parent wasn't checked,
this usually means the culprit is in a branch that wasn't scanned.
For this case we provide a new command which extends the range of the bisect
search to the common ancestor of the parents of the merge.
2011-03-12 17:08:42 +01:00
Patrick Mezard
daf132553b templatefilters: move doc from templates.txt to docstrings 2011-03-12 12:46:31 +01:00
Patrick Mezard
77482b30d5 templates: generate keyword help dynamically 2011-03-12 12:46:31 +01:00
Martin Geisler
583f21144f ui: yield unchanged values in walkconfig
Ever since walkconfig was introduced back in 4cc9ef8cd232, the values
yielded has been mutated by replacing "\n" with "\\n". This makes
walkconfig less useful than it could and there is no other way to
iterate over all config sections.

The third-party reposettings extension used ui.walkconfig but did not
take the replacement into account -- this change will actually fix a
bug in the extension when a value contains a newline.
2011-03-10 16:49:37 +01:00
Mark Drago
bfd6a0afa0 commands.update() now works properly with a revision of 0
Without this change commands.update() treats an integer 0 as if no revision
was passed and updates to the branch head.  This fix allows an integer 0 to
be detected as a revision number so the working directory is correctly
changed to revision 0 rather than the branch head.
2011-03-08 08:41:39 -05:00
Matt Mackall
73231aa117 commit: fix complaint about branch merge creating new heads (issue2186) 2010-05-15 21:24:23 -05:00
Ori Avtalion
47c45630d8 Fix hg heads -r flag documentation
The command arguments are "[-ac] [-r STARTREV] [REV]..."
2010-05-15 00:34:07 +03:00
Ori Avtalion
1addb571c7 Fix wording in hg pull documentation 2010-05-14 22:29:15 +03:00
Matt Mackall
a02b5a5fd1 commands: initial audit of exit codes
bisect: clarify None return
bundle: return 1 on no changes
clone: return result code
copy: limit errors to 0/1
commit: return 1 on no changes
forget: return 1 on errors
grep: return 1 if no match found
remove: return 1 on errors
resolve: return 1 if something fails to resolve
rollback: return 1 if no rollback data
2010-05-15 17:48:49 -05:00
Matt Mackall
e3ad4f8b46 commit: note new branch heads rather than topological heads
Move to using contexts while we're at it.
2010-05-13 17:24:21 -05:00
Matt Mackall
1748ffa6dd tag: strip whitespace from tag names (issue2174) 2010-05-12 15:40:58 -05:00
Gilles Moris
e35d01d1d4 summary: show if commit will be from a closed head 2010-05-10 22:44:06 +02:00
Gilles Moris
899149fc0b commit: inform the commiter when resurrecting a closed changeset 2010-05-10 08:53:06 +02:00
Gilles Moris
a444a7f860 commit: prevent closing non-head changesets 2010-05-10 08:43:36 +02:00
Martin Geisler
a44b1e166b Merge with stable 2010-05-07 17:03:48 +02:00
Martin Geisler
0f12cdee49 commands: explain that "hg serve" does not do authentication 2010-05-07 17:03:31 +02:00
Martin Geisler
03fe3d3627 commands: explain that "hg serve" is mostly for ad-hoc sharing 2010-05-07 17:01:14 +02:00
Brendan Cully
9a40d342ae Merge with main 2010-05-03 15:28:04 -07:00
Brendan Cully
1efcfabe26 Merge with stable 2010-05-03 15:27:05 -07:00
Brendan Cully
4d11a5bfea grep: clarify help for -r 2010-05-03 15:22:47 -07:00
Matt Mackall
1d338ff2d8 summary: add subrepo status 2010-05-03 17:05:23 -05:00
Matt Mackall
7f6aa6252c Merge with stable 2010-05-01 15:15:35 -05:00
Matt Mackall
53ab4498e1 subrepo: propagate and catch push failures 2010-04-30 18:32:18 -05:00
Nicolas Dumazet
22fdcb45f3 tag: warn users about tag/branch possible name conflicts
As reported recently, Mercurial users can easily find confusion when
using a common name for a tag and a branch. It seems reasonable to warn
them about this potential outcome, to avoid that "surprise".
* Explain briefly the issue in "hg help tag"
* Warn when tagging a revision
2010-04-19 17:41:12 +09:00
Faheem Mitha
a231e38798 commands: revised documentation of 'default' and 'default-push'
This patch was a collaborative effort between faheem, mg, timeless and
ilowe.
2010-04-27 00:44:06 +05:30
Yuya Nishihara
539b379b8c log: add --stat for diffstat output
log --stat shows diffstat in place of patch output.
2010-04-01 00:35:12 +09:00
Yuya Nishihara
e1d422d1b5 commands: refactor diff --stat and qdiff --stat
`opts['unified'] = '0'` can be replaced by `diffopts.context = 0`.
2010-04-07 00:45:20 +09:00
Mads Kiilerich
d0cbf08541 showconfig: show rc paths with --debug 2010-04-26 15:32:23 +02:00
Martin Geisler
75b52a4dce commands: better markup in "hg help paths" 2010-04-26 21:35:09 +02:00
Martin Geisler
11c192e04a Merge with stable 2010-04-26 21:32:46 +02:00
Matt Mackall
0439497509 hgweb: unify hgweb calls in serve 2010-04-26 11:03:40 -05:00
Matt Mackall
7443b42ff2 serve: webdir_conf -> webconf 2010-04-26 11:03:40 -05:00
Matt Mackall
3fea1c3bdd hgweb: make baseui parameter non-positional 2010-04-26 11:03:40 -05:00
Martin Geisler
f1853c5e82 Use hg role in help strings 2010-04-22 10:24:49 +02:00
Benoit Boissinot
e196c3bc8f log -b: use opts.get() instead of assuming opts is correctly filled 2010-04-20 01:08:20 +02:00
Matt Mackall
399ebe1c0f Merge with stable 2010-04-19 17:00:02 -05:00
Steve Losh
8551e0d0f2 commands: add more robust support for 'hg log -b' (issue2078)
Fixes issue2078 and adds tests to cover various 'hg log -b' uses.

This change adds a localrepo.lookupbranch(key, remote=None) function. This
will look up the branch of the revision with the given key. The algorithm
works like this:

    * If a remote repo is given and KEY is the name of a branch in that repo,
      return KEY.
    * If no remote repo is given and KEY is the name of a branch in the local
      repo object, return KEY.
    * Otherwise look up the revision with the identifier KEY in the local repo
      and return its branch.

This change also makes 'hg log -b' use this new functionality and adds a few
tests for it.
2010-04-12 19:33:25 -04:00
Matt Mackall
28f56d970a debugcomplete: don't list deprecated options 2010-04-19 16:47:44 -05:00
Steve Losh
6a47111c36 commands: Add 'hg log --branch' and deprecate 'hg log --only-branch'
Switching to --branch makes log consistent with push/pull and make more sense
given the actual behavior of the option (you can specify -b multiple times to
include multiple branches).

This change also adds some tests for 'hg log -b'.
2010-04-18 18:18:19 -04:00
Martin Geisler
5b1e19c3e0 Merge with stable 2010-04-16 22:14:14 +02:00
Faheem Mitha
d7c81ab4be Document 'default' and 'default-push' in paths docstring 2010-04-14 11:59:53 +05:30
Matt Mackall
25e5344b4e commands: improve some command summaries 2010-04-11 14:24:19 -05:00
Steve Borho
8299cbf24b rollback: add dry-run argument, emit transaction description 2010-04-09 17:23:37 -05:00
Martin Geisler
99b9cdb84f commands: leftover from 81707f241814 2010-04-05 13:44:30 +02:00
Martin Geisler
7b10bfabe8 commands: small refactoring in summary 2010-04-05 11:58:54 +02:00
Martin Geisler
00833c6af1 commands: retrieve tags from context object 2010-04-05 11:52:40 +02:00
Eric Eisner
2f5c879650 summary: make use of output labeling
The individual pieces of information use the same labels as the commands
they summarize for better cohesion of commands.
2010-04-04 21:35:00 -04:00
Martin Geisler
e3fc3eac98 commands: fix typo 2010-04-05 01:31:16 +02:00
Brodie Rao
e504a56477 diff: make use of output labeling 2010-04-02 15:22:06 -05:00
Brodie Rao
23d97750d1 status: make use of output labeling 2010-04-02 15:22:05 -05:00
Brodie Rao
94af2427db grep: make use of output labeling 2010-04-02 15:22:03 -05:00
Dan Villiom Podlaski Christiansen
b9377254d9 diffstat: use ui.plain() instead of ui.interactive()
Previously, a default width of 80 is used for non-interactive
sessions. This behaviour was introduced before HGPLAIN was supported.
2010-04-15 18:52:59 +02:00
Martin Geisler
4448069a13 commands: remove extra indentation from list in help text 2010-03-11 14:56:15 +01:00
timeless
3e27f0b8c3 commands: document and test hg clone update priority 2010-03-11 10:06:01 +02:00
Benoit Boissinot
65a86e1b8e bundle: fix bundle generation for empty changegroup 2010-03-09 20:38:23 +01:00
Benoit Boissinot
b1e6cef961 any is not available for python2.4 2010-03-11 19:09:35 +01:00
Benoit Boissinot
3db7df2869 style: use consistent variable names (*mod) with imports which would shadow 2010-03-11 17:43:44 +01:00
David Wolever
d9d667c78e archive: autodetect archive type by extension (issue2058) 2010-03-11 15:52:17 +01:00
Dirkjan Ochtman
1a28729342 merge with stable 2010-03-11 15:38:35 +01:00
Dirkjan Ochtman
ccdb890cae server: initialize wsgi app in command, then wrap server around it 2010-03-11 13:33:29 +01:00
Benoit Boissinot
d9ed059088 serve: fix port config 2010-03-10 22:27:42 +01:00
Thomas Arendsen Hein
353664e4dc drop (default: 8000), non-zero default is automatically added to help 2010-03-10 21:35:38 +01:00
Thomas Arendsen Hein
5820023c69 make expression shorter, now the line fits into 80 chars 2010-03-10 21:21:15 +01:00
Benoit Boissinot
2c7dc781a2 serve: fix options recording, trailing whitespace 2010-03-10 21:14:24 +01:00
Bryan O'Sullivan
523d3acdc2 serve: allow --port=0 to specify "server chooses the port number" 2010-03-10 10:51:37 -08:00
Benoit Boissinot
812d07b742 merge with stable 2010-03-09 20:47:35 +01:00
Benoit Boissinot
04d99f9fbc patch/diff: move patch.export() to cmdutil.export()
This API change will allow us to break a cycle between patch and cmdutil.
2010-03-08 19:43:24 +01:00
Yuya Nishihara
d958341146 branch: help misuse of hg branch to switch branches
Maybe beginners tend to use 'hg branch EXISTING_BRANCH' instead of
'hg update EXISTING_BRANCH' as me.
If so, let's help them to use 'update'.

Also removed '(use --force to override)' because it can mislead them.
2010-01-12 22:49:10 +09:00
Thomas Arendsen Hein
20c8c9dcb9 Make annotate --follow an alias for -f/--file to behave like in older versions
Since 461b5218840e annotate follows copies/renames by default, but the output
of e.g. "annotate --follow --number" should not change without some
deprecation time.
2010-03-03 22:04:59 +01:00
Yuya Nishihara
c01490d7d8 alias: fixes exception when displaying translated help text
__doc__ of aliased command shouldn't cointain non-ASCII characters,
because it'll be gettext-ed later by commands.help_().
Here gettext can raise UnicodeDecodeError.

Once concatenated two translatable strings into one, it become untranslatable.
So this patch moves 'alias for:' from dispatch.cmdalias to commands.help_,
where help texts are translated.

'alias for:' was introduced by 027d5c280eda.
2010-03-01 23:27:44 +09:00
Greg Ward
64f2447d13 resolve: rewrite help to be clearer and more complete (issue2030). 2010-03-01 15:41:21 -05:00
Wagner Bruna
65dc62eef8 commands: clarify --config syntax 2010-02-24 11:04:56 -03:00
timeless
f739d87132 commands: correct diff -c explanation 2010-02-23 06:42:10 +01:00
timeless
bb1742e284 commands: mention diff -c 2010-02-21 01:21:17 +02:00
Dirkjan Ochtman
c2bc65394a identify: don't include unknown in status 2010-02-19 20:34:23 -05:00
Greg Ward
cb143d442a merge: fix --preview to show all nodes that will be merged (issue2043).
Formerly, it omitted nodes that were not descendants of the least
common ancestor of the two merge parents, even though those nodes
contribute to the merge.  The new algorithm uses revlog.findmissing()
instead of ancestor() + nodesbetween().
2010-02-15 15:25:29 -05:00
Benoit Boissinot
213d94e037 bundle: exclude csets given in --base, unless they are in --rev (issue1910)
Thanks Jesse Glick for the first version of this patch.
2009-11-16 16:10:05 -05:00
Martin Geisler
dd4c98e656 commands: correct example in add help text 2010-02-13 22:10:31 +01:00
Martin Geisler
d31befc2e6 commands: add verbose example to help text for add 2010-02-13 18:44:19 +01:00
Martin Geisler
958fb44719 commands: support verbose help 2010-02-13 18:36:24 +01:00
Matt Mackall
a2acbc421b fix up a bunch of check-code warnings 2010-02-09 14:12:22 -06:00
Peter Arrenbrecht
659da7174a whitespace cleanup 2010-02-08 20:51:23 +01:00
Benoit Boissinot
328394047f fix coding style (reported by pylint) 2010-02-08 15:36:34 +01:00
Matt Mackall
70833ec6ad summary: various fixes, add a test
fix breakage from recent parseurl changes
fix reporting of resolved
fix reporting of update in certain cases
2010-02-08 11:04:38 +01:00
Sune Foldager
0d082ae358 fix remaining hg.parseurl uses 2010-02-08 10:32:44 +01:00
Brendan Cully
ce047e9ab3 import: import each patch in a file or stream as a separate change
Supports hg export <revrange>, mail messages, and mailboxes.
Does not support multiple patches in a single MIME attachment.
Closes issue167.
2010-02-07 18:06:52 +01:00
Sune Foldager
3f138e6345 add -b/--branch option to clone, bundle, incoming, outgoing, pull, push 2010-02-07 15:23:46 +01:00
timeless
a4b2e4932b help: Improved body text 2010-02-07 15:08:26 +01:00
timeless@mozdev.org
4cd821593d commands: Try to improve help options text for basic commands
Mostly rewrite -r text
2009-11-20 14:37:36 +02:00
Dirkjan Ochtman
0e0764f0be commands: annotate follows by default, separate -f/--file option 2010-02-07 14:51:52 +01:00
Sune Foldager
5020620fca interpret repo#name url syntax as branch instead of revision
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
2010-02-07 14:29:07 +01:00
Brodie Rao
91c6eab10f dispatch: provide help for disabled extensions and commands
Before a command is declared unknown, each extension in hgext is searched,
starting with hgext.<cmdname>. If there's a matching command, a help message
suggests the appropriate extension and how to enable it.

Every extension could potentially be imported, but for cases like rebase,
relink, etc. only one extension is imported.

For the case of "hg help disabledext", if the extension is in hgext, the
extension description is read and a similar help suggestion is printed.
No extension import occurs.
2010-02-07 14:01:43 +01:00
Benoit Boissinot
221f6cfbd6 merge: add hints about the use of 'hg heads' to find the rev to merge 2010-02-07 00:51:59 +01:00
Dirkjan Ochtman
101a05bdd6 commands: do all branch heads by default, demote topological to -t/--topo 2010-02-06 19:38:39 +01:00
Dirkjan Ochtman
e2c391eeae commands: actually implement --closed for topological heads 2010-02-06 19:33:40 +01:00
Dirkjan Ochtman
a5f8555923 commands: externalize branchheads so we can do it for all branches at once 2010-02-06 19:06:02 +01:00
Dirkjan Ochtman
e228418cb5 commands: move inactive/closed out so they can have more effect 2010-02-06 19:33:33 +01:00
Dirkjan Ochtman
6137e4212c commands: don't do too much work for error messages 2010-02-06 19:33:28 +01:00
Dirkjan Ochtman
50b37f6650 commands: allow --closed even for topological heads displays
But it actually only starts working later on.
2010-02-06 19:00:50 +01:00
Benoit Boissinot
7981695168 merge with main 2010-02-06 17:11:18 +01:00
Steve Losh
3a6ac9b1e1 commands: fix more changeset header information in 'hg help export' 2010-02-06 08:57:57 -05:00
Steve Losh
e1aa468eeb commands: fix the list of changeset header information in 'hg help export' 2010-02-06 08:28:39 -05:00
Dirkjan Ochtman
01ccbb45c0 commands: always order heads recent to oldest 2010-02-06 12:47:33 +01:00
Dirkjan Ochtman
645cbf8b4b commands: fix up stupidly untested heads simplification 2010-02-06 12:47:24 +01:00
Dirkjan Ochtman
56a10eac00 commands: simplify heads a little bit before I start hacking it up 2010-02-06 11:29:48 +01:00
Dirkjan Ochtman
99822443b5 commands: deprecate the heads -a option
Hopefully we can remove it entirely in two releases or so.
2010-02-06 11:28:03 +01:00
Benoit Boissinot
4371f512b2 fix spaces/identation issues 2010-02-05 18:50:08 +01:00
Steve Borho
b14b9d0a38 Merge with stable 2010-02-05 07:07:53 -06:00
Steve Borho
9f38cd0e08 commands: label from user is in local encoding
repo.branchtags().keys() are in UTF-8, so the label should be converted to UTF-8
before checking for a naming conflict.  Keep the original label for ui.status()
2010-02-05 04:33:08 -06:00
FUJIWARA Katsunori
b8e27ea1b4 summary: L10N messages hide clean-ness of workdir from 'hg summary'
'hg summary' recognizes workdir as clean by searching for 'clean' is
in own output text. But 'clean' is one of I18N target texts, so 'hg
summary --quiet' behaves incorrectly in non-English locale.
2010-01-20 13:50:06 +09:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Jens Bäckman
482c7ff3a6 commands: fix typo in help text 2010-01-09 23:03:33 +01:00
Greg Ward
bfaf5baac2 commands: fix help string for pull -u and unbundle -u.
They update to new branch head, not new tip -- same as 'hg update'.
2010-01-05 15:07:38 -05:00
Martin Geisler
cc5314a970 commands: update copyright year to 2010 2010-01-04 01:09:23 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Martin Geisler
a0fd2fa800 Merge with stable 2010-01-20 16:58:48 +01:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Martin Geisler
542da45c3a commands: mark "ssh://" as inline literals in help texts 2009-12-01 00:15:45 +01:00
timeless@mozdev.org
15e268f188 commands: add missing options in command line help 2009-11-28 23:44:18 +01:00
Martin Geisler
7fb918d179 commands: mark strings for translation 2009-11-28 23:23:16 +01:00
Faheem Mitha
1bec9addf2 commands: improve help for "hg clone -r" 2009-11-19 17:33:41 -05:00
Martin Geisler
fe0b7cb0b8 commands, dates: use real lists instead of literal blocks 2009-11-19 23:29:02 +01:00
Martin Geisler
f70df45cf9 commands: use field lists instead of literal blocks in docstrings
The literal blocks were mis-used for alignment, but this of course
changes the font of the entire block to a fixed width font in the HTML
version. Using a proper list solves this.
2009-11-19 23:27:11 +01:00
Martin Geisler
20491e2b07 commands: do not indent list in clone help string 2009-11-19 22:25:38 +01:00
Matt Mackall
aa87974fcd summary: note non-default branches with -q 2009-11-17 16:23:05 -06:00
Martin Geisler
85252bdcb6 diff: change --inverse to --reverse
This fixes an incompatibility with patch(1), which also uses --reverse
for reversed diffs. The --inverse flag was added in 0f0383897d54. That
name was chosen over --reverse since it was thought that --reverse
would make --rev ambiguous.

It turns out that both flags can co-exist, with the cost that --rev
can no longer be shortened to --r and --re. Since one can always use
the short -r option, this is not a real problem.
2009-11-14 14:21:53 +01:00
Dirkjan Ochtman
91d7a1e376 help: don't show extension list on extension help 2009-11-12 13:43:36 +01:00
Stuart W Marks
ee6cd48d72 help: improve wording of update help text 2009-11-10 22:27:31 -08:00
Wagner Bruna
085026ef75 clone: simplify help text 2009-11-09 17:28:40 -02:00
timeless@mozdev.org
9445630fe0 hg help resolve grossly mischaracterizes the --all switch 2009-10-26 02:06:23 +02:00
Martin Geisler
5bd9b1a347 commands: use enumerated lists in help texts 2009-11-07 03:16:23 +01:00
Martin Geisler
c3718b9d5b commands: call ui.username carefully in debuginstall
After 54b67f7bd5df, 'hg debuginstall' would abort halfway through if
no username was set. We now catch and display the exception instead.
2009-11-07 01:46:27 +01:00
Yannick Gingras
ed1d8b7e7a diff: add --inverse option
Most of the time, one can reverse a diff by swapping the revisions passed with
-r but it happens that if you use the global -R, and diff against the tip of
the current repo, you can't swap the revisions. One use-case for that is
reviewing changes from a bundle before unbundling. One could also pipe the
output of `hg diff` to a command line filter that reverses the diff, but that
would remove the benefit from color diffs. Therefore, having an option in
`hg diff` to reverse a diff is a good thing.

The option flag selection was tricky. GNU patch uses -R/--reverse but -R is
already used as a global option and --reverse would make --rev ambiguous.
2009-11-05 15:18:56 +01:00
Stuart W Marks
f27d77ba1d help: describe new cross-branch behavior in update help text, plus cleanups 2009-11-05 10:59:33 +01:00
Adrian Buehlmann
ba9637aae6 clone: add option -u/--updaterev 2009-11-05 11:05:13 +01:00
Martin Geisler
87e32229f6 commands: slightly better help for --traceback 2009-11-02 20:50:57 +01:00
Benoit Boissinot
a5cd832d0e bisect: no need to save the state if it wasn't changed 2009-11-01 03:26:10 +01:00
Benoit Boissinot
b146297220 log --limit: break after a limited number of csets (broken by 37a70f0b3ab8) 2009-11-01 02:54:32 +01:00
Benoit Boissinot
80a458a464 pychecker: remove unused local variables 2009-10-31 17:04:46 +01:00
Benoit Boissinot
f7540399b7 remove unused imports 2009-10-31 16:56:58 +01:00
Benoit Boissinot
77d119c7c3 localrepo/branchcache: remove lbranchmap(), convert users to use utf-8 names
We don't need a "local-charset" aware branchmap() function, we can convert the
names when needed during the output.
2009-10-31 00:31:08 +01:00
Matt Mackall
4d8e4508a9 walkchangerevs: drop ui arg 2009-10-29 19:03:16 -05:00
Matt Mackall
1c290c8b2e log: tidy up some filter tests 2009-10-29 17:07:54 -05:00
Matt Mackall
de712b58f9 walkchangerevs: move 'add' to callback
Now walkchangerevs is a simple iterator over contexts
2009-10-29 17:07:51 -05:00
Matt Mackall
74ca11743b Merge with crew 2009-10-27 17:14:19 -05:00
Matt Mackall
0366236cf5 walkchangerevs: internalize ctx caching 2009-10-27 17:01:32 -05:00
Matt Mackall
67e7c0b434 walkchangerevs: yield contexts 2009-10-25 18:43:59 -05:00
Matt Mackall
201d81ac28 walkchangerevs: kill window step of iterator 2009-10-25 18:43:58 -05:00
Matt Mackall
69f8478d8c walkchangerevs: pull out matchfn
* * *
imported patch mercurial/commands.py
2009-10-25 18:43:56 -05:00
timeless@mozdev.org
1834479e5a minor documentation improvements 2009-10-25 14:45:38 +02:00
timeless
1ed92a7db7 commands: adding --no-status to resolve to match status 2009-10-25 13:27:54 +01:00
timeless@mozdev.org
33195b8982 commands: use rev from remote repo when updating as part of a pull 2009-10-21 12:41:28 +03:00
timeless@mozdev.org
eb0032e7aa commands: highlighting that rev is based on the remote repository 2009-10-21 12:03:14 +03:00
Brodie Rao
7c2f2247c5 diffstat: with --git, mark binary files with Bin
Normally, diffs without any text insertions or deletions are reported
as having 0 lines changed by stock diffstat. Compatibility is
preserved with stock diffstat in this case, but when using --git,
binary files are marked with Bin as a means of clarification.

git diff --stat does something similar, though it also includes the
old and new file sizes.
2009-10-25 02:53:33 +02:00
Brodie Rao
8c7629d9e4 diff: add --stat for diffstat output
diff/qdiff --stat invokes patch.diffstat() on the diff output.

When in interactive mode, the output's maximum width is determined by the
terminal's width.
2009-10-25 02:52:35 +02:00
Martin Geisler
881b938c98 commands: search for translated version of "DEPRECATED"
The option description is already translated at this point, so we must
search for a translation of "DEPRECATED".
2009-10-24 00:29:25 +02:00
Matt Mackall
e4e621eb3d summary: remove reference to -p 2009-10-21 17:42:22 -05:00
Matt Mackall
22f2e128cf summary: add --remote 2009-10-20 11:59:38 -05:00
Matt Mackall
a6af18744b summary: restore briefer commit status 2009-10-20 11:58:09 -05:00
Matt Mackall
a69545dfc3 summary: add empty repository and no revision checked out hints 2009-10-20 11:57:25 -05:00
Matt Mackall
0a74fdabf2 Merge with crew 2009-10-19 23:53:25 -05:00
Matt Mackall
73b30861ca Remove parents from default help in favor of summary 2009-10-19 00:36:52 -05:00
Matt Mackall
e07bd87972 summary: quieter with -q 2009-10-19 00:22:49 -05:00
Matt Mackall
2a9f330665 commands: fix missing empty synopses 2009-10-19 00:21:06 -05:00
Matt Mackall
993bb8325e Introduce summary command 2009-10-18 22:31:05 -05:00
Matt Mackall
207b3fe6fe bisect: use util.system and fix good/bad when using -c
The existing scheme using util.find_exe and subprocess.call meant we
couldn't use simple shell commands in tests. Fix that.

Also, it mistakenly used status from the system() call rather than
good from the bisect call in reporting results.
2009-10-12 18:25:46 -05:00
Martin Geisler
8b8fb723b7 help: un-indent help topics
The help topics are reused in the HTML documentation, and there it
looks odd that whole sections are indented. We now only indent it for
output on the terminal.
2009-10-04 12:18:43 +02:00
Martin Geisler
cb4bdf9a1e commands: simpler sort of help topic names 2009-10-04 10:17:01 +02:00
Matt Mackall
3e6199cea0 Merge with -stable 2009-09-30 21:42:51 -05:00
Martin Geisler
fba2d48279 Merge with main 2009-09-29 00:23:01 +02:00
Adrian Buehlmann
d88b8724c3 mention overlay bundle file in global --repository option
see http://mercurial.selenic.com/wiki/LookingIntoBundles

Drop mentioning symbolic path names for the sake of brevity. This is
a common feature of path options anyway.
2009-09-23 15:57:25 +02:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Greg Ward
b802932aac commands: tweak help for 'heads'.
- prefer "changeset" over "revision" for internal consistency
- clarify explanation of branch heads
- add a line break
- tighten some wording
2009-09-17 18:12:53 -04:00
Martin Geisler
74a6226f22 Merge with crew-stable 2009-09-17 21:52:08 +02:00
Martin Geisler
eb95e5f9c1 commands: expand -c and -C in update error message 2009-09-17 21:50:12 +02:00
Stuart W Marks
fd1368d11d commands: forbid 'hg update --check --clean' 2009-09-17 21:34:05 +02:00
Patrick Mezard
f6c5bd6fa1 Merge with crew-stable 2009-09-05 19:39:46 +02:00
Patrick Mezard
d68b916da4 merge: exclude common ancestor from --preview (issue1818) 2009-09-05 18:56:51 +02:00
Christian Ebert
ebde959a47 log: prevent negative date range from displaying entire log (issue1805) 2009-09-04 11:51:28 +02:00