Commit Graph

1718 Commits

Author SHA1 Message Date
Arnab Bose
a9ac0e99d7 commands: mention "hg status -C" in addremove help 2010-07-09 13:31:37 +02: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
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