Commit Graph

20236 Commits

Author SHA1 Message Date
Lucas Moscovicz
f1e6aec1ef revset: added substraction to baseset class
Added __sub__ method to the baseset class to be able to compare it with other
subsets more efficiently.
2014-01-23 14:20:58 -08:00
Lucas Moscovicz
e0e3b9efa2 revset: implemented set caching for revset evaluation
Added set caching to the baseset class. It lazily builds the set whenever it's
needed and keeps a reference which is returned when the set is requested
instead of being built again.
2014-01-22 10:46:02 -08:00
Simon Heimberg
044892facc i18n: fix non-matching 1st line indentations
When generating documentation, indentation must match for getting the same
view for translated messages. Often an output is generated anyway, but it
can look different. When a syntactically wrong indentation change is done,
runrst will fail (this is detected by test-gendoc.t).

Fix the simple places. When translation knowledge is necessary, the entry is
marked as fuzzy (and therefore skipped when generating translations). A
translator can fix it later.
2014-01-22 16:47:05 +01:00
Simon Heimberg
c6c6a2dd92 i18n: fix some non matching quotation marks in translations
A test for this is in preparation.
2014-01-22 16:35:10 +01:00
Simon Heimberg
889e04cd3a i18n: do not translate rst syntax .. note::
.. note:: is rst syntax which must not be translated. Fix this in the
translations.

This is not the first time this happens, so there should be a note for the
translator. A later patch will change the generation of the po files to
write this automatically.
A test in i18n/check-translation.py could help as well.
2014-01-22 16:34:36 +01:00
Leonardo Bueno Postacchini
b270594f22 i18n-pt_BR: synchronized with f908b17c97cc 2014-01-27 16:34:00 -02:00
Simon Heimberg
77e680884d i18n-de: updated po file with 3d9f67cfdcaf
Do this in a separate patch for easier reviewing of the translation patch.
2014-01-22 16:32:53 +01:00
Simon Heimberg
0c637f44ed i18n-de: remove locations
Strip the locations by running msgcat [1] as the wiki [2] tells to do. Do
this in a separate patch for getting a smaller one when updating from hg.pot.

[1] msgcat --no-location -o de.po de.po
[2] mercurial.selenic.com/wiki/TranslatingMercurial#Updating_a_Translation
2014-01-22 16:32:52 +01:00
Lucas Moscovicz
ef8bd69f5f revset: added baseset class (still empty) to improve revset performance
This class is going to be used to cache the set that is created from this list
in many cases while evaluating a revset.
2014-01-21 11:39:26 -08:00
Simon Heimberg
e7e6984967 i18n: leave out entries which contain only rst syntax
This prevents the danger of translating entries like the following ones:

.. container:: verbose

    .. input:: filename1.txt
2014-02-03 21:34:13 +01:00
Simon Heimberg
436dda1a07 i18n: leave out entries which contain only a rst directive
This prevents the danger of translating entries like ".. note::"
2014-02-03 21:33:48 +01:00
Angel Ezquerra
9d9e80e852 subrepo: make it possible to update to hidden subrepo revisions
When a subrepo revision was hidden it was considered missing and mercurial was
unable to update to the corresponding parent revision. Instead warn the user of
the problem and let it choose what to do (the default is to udpate anyway).
2013-11-24 02:17:17 +01:00
Angel Ezquerra
c5703b123e subrepo: remove unnecessary else clause in hgsubrepo._get
This revision has no behaviour change. It simply removes an unnecessary else
that follows an if / return block. The change looks big because a big chunk of
code has been unindented one level.
2013-11-24 02:13:00 +01:00
Angel Ezquerra
6a8a8a8e21 subrepo: do not try to get hidden revisions
If a subrepo revision is hidden (because it was amended, for example) it does
not make sense to try to "get" it from the remote subrepository.

Note that in order to avoid making the change look bigger than it is, this adds
an unnecessary else clause. This will be removed on a follow up patch.
2013-11-24 02:10:14 +01:00
David Soria Parra
e5be8c59d8 parsers: fix 'unsigned expression is always true' warning (issue4142)
On Mac OS gcc-llvm throws an -Wtautological-compare warning because flen
is defined as an unsigned integer, therefore flen < 0 is always true.
2014-01-23 19:08:26 +01:00
Steve Borho
deded2d9ba wix: pull in new templates 2014-01-23 14:06:15 -06:00
Simon Heimberg
0158c849ad i18n: posplit removes the entry "::" from the pot file
We do not gain anything by allowing to translate it.
2013-11-17 20:24:33 +01:00
Simon Heimberg
34690f0c29 i18n-de: update po file for showing the effect of changed posplit 2014-01-29 16:47:00 +01:00
Simon Heimberg
47121c8b9b i18n: posplit writes a warning for translators before rst directives
rst directives like this one have been translated:
.. note::

To help the translator include a comment before such messages.

An entry containing a rst directive now looks like this:

#. do not translate: .. note::
#: path/to/file:75
msgid = ".. note:: to think about"
msgstr = ...
2014-02-03 21:31:35 +01:00
Simon Heimberg
4160576860 Makefile: hg.pot depends on the scripts generating it
This is convenient when editing this scripts. And translators will get updated
translation files even if nothing else has changed.
2013-11-17 20:16:14 +01:00
Matt Mackall
5d2087f28a merge with stable 2014-02-03 18:09:08 -06:00
Pierre-Yves David
971cefa104 push: move bookmarks exchange in the exchange module
The bookmark exchange code was already extracted during a previous cycle. This
changesets moves the extracted function in this module. This function will read
and write data in the `pushoperation` object and It  is preferable to have all
core function collaborating through this object in the same place.

This changeset is pure code movement only. Code change for direct consumption of
the `pushoperation` object will come later.
2014-01-30 17:46:51 -08:00
Pierre-Yves David
49e928ef6b push: move newbranch argument into the push object
One more step toward a more modular push function.
2014-01-30 17:08:29 -08:00
Pierre-Yves David
579d48c27b push: move revs argument into the push object
One more step toward a more modular push function.
2014-01-30 17:04:23 -08:00
Pierre-Yves David
99860f7215 push: move force argument into the push object
One more step toward a more modular push function.
2014-01-30 16:59:25 -08:00
Pierre-Yves David
ab2b4d5db8 push: move remote argument in the push object
One more step toward a more modular push function.
2014-01-30 16:57:01 -08:00
Pierre-Yves David
97abb80300 push: ease access to current ui object
The `pushoperation.repo.ui` attribute is very commonly used. we offer a faster way
to access it directly through the push operation object.
2014-01-30 16:46:30 -08:00
Pierre-Yves David
836dd3b929 push: introduce a pushoperation object
This object will hold all data and state gathered through the push. This will
allow us to split the long function into multiple small one. Smaller function
will be easier to maintains and wrap.  The idea is to blindly store all
information related to the push in this object so that each step and extension
can use them if necessary.

We start by putting the `repo` variable in the object. More migration in other
changeset.
2014-01-30 16:43:11 -08:00
Pierre-Yves David
f35f0a3cb0 exchange: extract push function from localrepo
The localrepo class if far too big. Push and pull logic will be extracted and
reworked to better fit with the fact they now exchange more than plain changeset
bundle.

This changeset extract the push code. later changeset will slowly slice this
over 200 hundred lines and 8 indentation level function into smaller saner
brick.

The localrepo.push method is kept for now to limit impact on user code. But it
will be ultimately removed, now that the public supposed API is hold by peer.
2014-01-30 15:34:01 -08:00
Pierre-Yves David
4a16e8a21b phase: properly compute ancestors of --rev on push (issue3786)
Now that discovery is working on unfiltered changeset, I had a good occasion to
look at that bug again. This let me realise that a trivial node vs rev
comparision was the cause of this two years old bugs…

Happy second birthday phases!
2013-01-28 15:16:49 +01:00
Simon Heimberg
dd6f92d843 hgext: fix one typo in rebase 2014-01-23 01:21:08 +01:00
Simon Heimberg
f9ed3a6ac4 templater: selecting a style with no templates does not crash (issue4140)
Running `hg log --style compact` (or any other style) raised a traceback when
no template directory was there. Now there is a message:

Abort: style 'compact' not found
(available styles: no templates found, try `hg debuginstall` for more info)


There is no test because this would require to rename the template directory.
But this would influence other tests running in parallel. And when the test
would be aborted the wrong named directory would remain, especially a problem
when running with -l.
2014-01-23 01:29:50 +01:00
Matt Mackall
ccdc2e59b8 makefile: add $ to environment variables in help message 2014-01-23 14:31:05 -06:00
Matt Mackall
496d57be29 Added signature for changeset eb40daab10ae 2014-01-21 14:44:40 -06:00
Matt Mackall
4075699ace merge with i18n 2014-01-21 14:44:01 -06:00
Wagner Bruna
a9d7c8df74 i18n: fix trailing '::' on translated messages
Reported by FUJIWARA Katsunori <foozy@lares.dti.ne.jp>.
2014-01-20 11:16:26 -02:00
Mads Kiilerich
ec9b6c203b tests: stop tracking tests/gpg/random_seed
test-gpg.t left the random_seed file as modified. That was slightly confusing
... and it was accidentally changed in 7e8ce69e784d.

The seed is created on demand and there is no reason to track it. There is also
no reason to leak state between test runs so we let the test clean up after
running.
2014-01-20 01:29:54 +01:00
Mads Kiilerich
5be7383671 tests: 'hghave tic' also requires curses support in Python
test-status-color.t would fail when using a Python without curses.
2014-01-20 01:29:54 +01:00
Matt Mackall
805df56652 test-import-merge: mangle file in binary mode
This should fix a test breakage on Windows.
2014-01-20 17:09:20 -06:00
Matt Mackall
47af0ab954 localrepo: drop dead comment 2014-01-19 22:58:33 -06:00
Jordi Gutiérrez Hermoso
aeb19f9922 record: re-enable whitespace-ignoring options
It looks like somewhere down the line, patch.diffopts changed the
names of the options that it recognises, but record.recordfunc wasn't
updated to the new names. Instead of trying to write down names at
all, we now use whatever names are provided in commands.diffwsopts and
pass that along to patch.diffopts, along with a couple of custom
options
2014-01-16 15:05:03 -05:00
Jordi Gutiérrez Hermoso
ccf7869bdf record: use commands.diffwsopts instead of ad-hoc diffopts
The record extension is writing its own version of commands.diffwsopts
which is identical to commands.diffwsopts. Based on the principle that
code duplication increases maintenance burden, this patch removes
record's ad-hoc diffopts in favour of commands.diffwsopts
2014-01-16 14:57:52 -05:00
David Soria Parra
b0e2d02402 i18n-de: rename noun "entfernt" to "Gegenseite"
The German translation for "remote" as "entfernt" can be misleading
in situations where remote is used as a noun. "entfernt" is not a
noun and can also mean "removed". To clarify this we rename "remote"
to "Gegenseite" when used as a noun.
2014-01-08 12:25:00 -08:00
Matt Mackall
258b088046 Added signature for changeset 6b943a1e0510 2014-01-01 21:46:45 -06:00
Matt Mackall
bef1d17e4e merge with i18n 2014-01-01 21:46:03 -06:00
FUJIWARA Katsunori
45d24ef0b8 i18n-ja: synchronized with 9525dc6ef7d6 2013-12-30 21:30:34 +09:00
Yuya Nishihara
cb7a1dd14c fileset, revset: do not use global parser object for thread safety
parse() cannot be called at the same time because a parser object keeps its
states.  This is no problem for command-line hg client, but it would cause
strange errors in multi-threaded hgweb.

Creating parser object is not too expensive.

original:
% python -m timeit -s 'from mercurial import revset' 'revset.parse("0::tip")'
100000 loops, best of 3: 11.3 usec per loop

thread-safe:
% python -m timeit -s 'from mercurial import revset' 'revset.parse("0::tip")'
100000 loops, best of 3: 13.1 usec per loop
2013-12-21 12:44:19 +09:00
Matt Mackall
03adb7cbe4 hgweb: avoid initialization race (issue3953) 2013-12-04 13:42:28 -06:00
Matt Mackall
c4f5764d33 mpatch: rewrite pointer overflow checks 2013-12-11 18:33:42 -06:00
Matt Mackall
68554e4b42 tests: fix missing import in check-translations 2013-12-01 21:24:26 -06:00