Commit Graph

2168 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
7c3a892f08 export: catch exporting empty revsets (issue3353)
Additionally add tests for empty revsets and unknown revisions.
2012-04-04 12:31:31 +02:00
Matt Mackall
f2a652218a i18n: fix all remaining uses of % inside _() 2012-03-08 13:35:27 -06:00
Javi Merino
826c30884c update: don't translate the abort message twice
The string representation of util.Abort() is translated when
merge.update() raises the exception.  For languages with characters
out of the valid ascii range, if we feed them again to i18n.gettext()
mercurial dies with:

[...]
  File "/home/javi/src/mercurial/mercurial/hg-mpm/mercurial/commands.py", line 4287, in postincoming
    ui.warn(_("not updating: %s\n" % str(inst)))
  File "/home/javi/src/mercurial/mercurial/hg-mpm/mercurial/i18n.py", line 42, in gettext
    u = u'\n\n'.join([p and t.ugettext(p) or '' for p in paragraphs])
  File "/usr/lib/python2.7/gettext.py", line 404, in ugettext
    return unicode(message)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 14: ordinal not in range(128)

To reproduce this error, just try to pull a changeset that crosses
branches with LANG=ru_RU.UTF-8
2012-03-07 23:21:11 +00:00
Wagner Bruna
0c54f0439f debugbuilddag: fix starting a dag on a non-default branch 2012-03-02 11:46:18 -03:00
Idan Kamara
263be8e6a2 update: delete bookmarks.current when explicitly updating to a rev (issue3276) 2012-02-28 23:47:46 +02:00
Idan Kamara
0aba016d12 update: don't move the active bookmark if a rev is specified with -r 2012-02-28 01:07:55 +02:00
Patrick Mezard
aa60a56d96 log: restore cache used by --copies
The {filelog -> linkrev -> copyfrom} cache was refactored and broken by:

  changeset:   10060:cc8d195282c7
  user:        Patrick Mezard <pmezard@gmail.com>
  date:        Sun Dec 13 18:06:24 2009 +0100
  summary:     templatekw: change {file_copies} behaviour, add
               {file_copies_switch}

With --copies, this cache is accessed for every touched file of every revision.
Unfortunately it is recreated for every revision, which means filelogs are
parsed again. This patch makes the cache global again for all revisions.

A couple of indicative timings of "hg log --copies", before and after:

hg:                       44s /     5s
mozilla --limit 10000:  3m51s /  2m32s
mozilla:               23m46s / 12m23s

I do not know any good tool to trace memory consumption of these runs for
comparisons. Watching the full mozilla run in top, the process did not seem to
misbehave.
2012-02-25 19:39:55 +01:00
Matt Mackall
ea01a95d30 graft: use proper revisions for copy detection (issue3265) 2012-02-24 16:09:15 -06:00
Matt Mackall
31ad230c52 pull: backout change to return code
This bit a number of people.
2012-02-10 16:09:30 -06:00
Matt Mackall
902bee47a8 pull: return 1 when no changes found (BC)
Currently we have the following return codes if nothing is found:

                commit   incoming    outgoing      pull     push
intended           1        1           1            1       1
documented         1        1           1            0       1
actual             1        1           1            0       1

This makes pull agree with the rest of the table and makes it easy to
detect "nothing was pulled" in scripts.
2012-01-30 16:01:54 -06:00
Matt Mackall
1c8e8627b0 push: don't treat bookmark as a found change
Treating bookmarks as a found change results in confusing
documentation or output and is less useful for scripting.
2012-01-30 15:56:35 -06:00
Pierre-Yves David
605e1c8bba phase: accept old style revision specification 2012-01-30 18:06:57 +01:00
Matt Mackall
2157179ce3 push: return 1 if no changes found (issue3228)
Currently we have the following return codes if nothing is found:

                commit   incoming    outgoing      pull     push
intended           1        1           1            1       1
documented         1        1           1            0       1
actual             1        1           1            0       0

This fixes the lower-right entry.
2012-01-30 11:32:09 -06:00
Matt Mackall
79aca17050 push: more precise failure check on subrepo push
This will let us distinguish between nothing to push and push failed
2012-01-30 11:26:20 -06:00
Matt Mackall
8c3fad2adc push: return 0 when updating bookmarks 2012-01-30 11:23:17 -06:00
Matt Mackall
b7fe2d0ec5 bookmarks: move current bookmark on update -u and bare pull -u (issue3222)
Currently, this won't update when a #branch spec is in the URL
2012-01-29 14:07:45 -06:00
Kevin Bullock
d1f8c5d7da update: note updated bookmark
This brings update in line with pull: we notify the user when an action
indirectly updates a bookmark.
2012-01-27 13:12:56 -06:00
Augie Fackler
4a3654d428 resolve: mention merge-tools topic in help 2012-01-27 14:19:32 -06:00
Matt Mackall
e4d11ad28c scmutil: unify some 'no changes found' messages
This keeps the wording more consistent for secret csets
2012-01-25 17:14:08 -06:00
Alain Leufroy
b62e38b78d bundle: display info about secret changets while no sharable changeset found 2012-01-25 19:05:16 +01:00
Jens Bäckman
a286708816 help: mark strings for translation 2012-01-25 14:06:04 -06:00
Pierre-Yves David
489da655c0 phase: alway return a value
With the previous code, the phase command was returning None when displaying
phase and 0 or 1 when moving them.

This seemed an bit odd and displaying phase return 0 too now.
2012-01-22 21:30:09 +01:00
Matt Mackall
a57d42adc3 bookmarks: correct correction of -i 2012-01-20 15:25:39 -06:00
Idan Kamara
9abd35e5ee commands: drop exclamation mark in abort message 2012-01-20 23:05:14 +02:00
Kevin Bullock
0ffedb7ebf update: note ways to avoid moving bookmark 2012-01-19 16:10:26 -06:00
Matt Mackall
e52f0054ce bookmarks: make -i summary simpler and more accurate 2012-01-20 14:19:13 -06:00
Kevin Bullock
c4ab5bfe8b bookmarks: clarify help for -i/--inactive 2012-01-19 16:05:01 -06:00
Matt Mackall
0e96c1d311 bookmarks: automatically advance bookmark on naked update (BC) (issue2894) 2012-01-19 14:07:48 -06:00
David M. Carr
560a2fff89 forget: fix subrepo recursion for explicit path handling
When support for handling explicit paths in subrepos was added to the forget
command (155b89136ae7), subrepo recursion wasn't taken into account.  This
change fixes that by pulling the majority of the logic of commands.forget into
cmdutil.forget, which can then be called from both there and subrepo.forget.
2012-01-17 19:10:59 -05:00
David M. Carr
375e0ca3cf add: fix subrepo recursion for explicit path handling
When support for handling explicit paths in subrepos was added to the add
command (825c4cefde4b), subrepo recursion wasn't taken into account.  This
change adds an explicitonly argument to cmdutil.add to allow controlling which
levels of recursion should include only explicit paths versus all matched
paths.
2012-01-17 19:10:58 -05:00
Pierre-Yves David
1b049b22f5 phase: report phase movement
When used in "set" mode, the phase command now display the number of changeset
who changed phase.
2012-01-17 20:43:41 +01:00
Mads Kiilerich
71865d2b26 tag: lock before tagging 2012-01-13 01:19:07 +01:00
Mads Kiilerich
98451cba89 debugbuilddag: lock repo before starting transaction 2012-01-13 01:19:07 +01: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
Martin Geisler
1c373fe3fb commands: partial backout of 50aa11ad0b77 2012-01-13 14:52:47 +01:00
Martin Geisler
5f85497f3f phase: add metavar to -r help text 2012-01-13 11:53:51 +01:00
Martin Geisler
03f35c36c9 phase: the REV argument can be repeated 2012-01-13 11:50:06 +01:00
Martin Geisler
4c9bf5eec4 commands: no need to rename merge and phases on import 2012-01-13 11:38:49 +01:00
Martin Geisler
f194db061a phase: there is actually no -C option 2012-01-13 11:34:09 +01:00
Martin Geisler
312014ab5d phase: use standard syntax for command line flags
We don't mark them as literal text and we mention the short option the
first time we talk about a given flag.
2012-01-13 11:29:47 +01:00
Martin Geisler
c8fd9fad8f phase: fix RST markup (use `...` for literal text) 2012-01-13 11:26:24 +01:00
Martin Geisler
57ec63f3c0 phase: lowercase option help, rephrase slightly 2012-01-13 11:23:45 +01:00
Pierre-Yves David
e929cd5e49 discovery: introduce outgoing object for result of findcommonoutgoing
Simplifies client logic in multiple places since it encapsulates the
computation of the common and, more importantly, the missing node lists.

This also allows an upcomping patch to communicate precomputed versions of
these lists to clients.
2012-01-09 03:47:16 +01:00
Pierre-Yves David
2362e6fe6c commands: make bundle use heads computed by findoutgoing 2012-01-09 04:16:00 +01:00
Martin Geisler
e0542a7108 commands: bump copyright year 2012-01-11 15:51:02 +01:00
Matt Mackall
7ea3d8e9f3 phase: mark messages for i18n 2012-01-10 16:36:36 -06:00
Matt Mackall
7025e1c3b0 phase: fix up help string 2012-01-10 16:36:33 -06:00
Matt Mackall
ae28263f4b phase: drop reference to working directory phase 2012-01-10 16:36:32 -06:00
Pierre-Yves David
a2fe028df9 phases: add a phases command to display and manipulate phases 2012-01-10 19:45:35 +01:00
Ion Savin
029e0ada33 annotate: append newline after non newline-terminated file listings
The last line of a non newline-terminated file would mix with the first line of
the next file in multiple-file listings before this patch.

Possible compatibility issue: no longer possible to tell from the annotate
output if the file is terminated by new line or not.
2012-01-10 10:18:19 +02:00