Commit Graph

21921 Commits

Author SHA1 Message Date
FUJIWARA Katsunori
26c1da5c46 largefiles: put whole rollback-ing process into the same "wlock" scope
Before this patch, there are three distinct "wlock" scopes in
"overriderollback":

  1. "localrepository.rollback" via original "rollback" command,
  2. "merge.update" for reverting standin files only, and
  3. "overriderollback" specific "wlock" scope (to synchronize
     largefile dirstate)

But these should be executed in the same "wlock" scope for
consistency.
2014-08-11 22:29:43 +09:00
Matt Mackall
74cb506481 tests: use a decorator for hghave checks 2014-08-11 09:35:24 -05:00
Matt Mackall
e82fc40f9c hg-test-mode: colorize HGFOO and TESTFOO environment variables 2014-08-10 23:13:12 -05:00
Matt Mackall
db1bb65a94 merge with stable 2014-08-10 15:26:33 -05:00
Matt Mackall
2bfc2c18d4 tests: more bundle2 non-binary file test fixes 2014-08-10 15:26:12 -05:00
Matt Mackall
93db32d337 merge with stable 2014-08-10 14:30:30 -05:00
Matt Mackall
7a68007f38 hgweb: avoid config object race with hgwebdir (issue4326)
Turns out hgwebdir passes full repo objects to each hgweb request
instance, but with a shared baseui. We explicitly break the sharing.
2014-08-10 13:53:36 -05:00
Matt Mackall
8bff782c4b test-commandserver.py: filter path separator
Was failing on Windows:

-bundle.mainreporoot=$TESTTMP/repo
+bundle.mainreporoot=$TESTTMP\repo
2014-08-09 16:15:52 -05:00
Matt Mackall
f2f76a2aa6 merge with stable 2014-08-09 16:06:01 -05:00
Matt Mackall
4c8a0f6ac6 merge with i18n 2014-08-09 16:05:03 -05:00
Matt Mackall
c4175c9947 i18n-ru: fix RST breakage spotted by test-gendoc
test-gendoc complained:

   % extracting documentation from ru
   checking for parse errors
+  gendoc-ru.txt:5686: (WARNING/2) Field list ends without a blank
   line; unexpected unindent.
+  gendoc-ru.txt:8327: (WARNING/2) Definition list ends without a
   blank line; unexpected unindent.
2014-08-09 16:04:36 -05:00
Matt Mackall
b1763500b3 i18n-ru: undo fix buildbot breakage
Buildbot complained:

   $ python check-translation.py *.po
+  ru.po:9576:fatal(promptchoice): number of choices differs between
msgid and msgstr
+  [1]

Prompt text was obviously wrong.. because it didn't include a prompt.
2014-08-09 15:46:54 -05:00
Matt Mackall
d5b665f1bb contrib: add emacs mode for *.t files 2014-08-08 17:45:36 -05:00
Pierre-Yves David
db81cffcdc phase: attach phase to the transaction instead of the lock
The phase cache file is no longer written on lock release, it is now handled by
the transaction (as changesets and obsolescence markers are).

(Hooray)

As we stop relying on the lock to write phase, repos with no existing phase
information will need to wait for a phase move or a strip to happen in order to
get the first write in the `phaseroots` file. This explain the change in
test-inherit-mode.t.

This should not have any side effects but in very obscure cases where
people interact with pre-2.1 and post-2.1 versions of Mercurial on the
same repo while having MQ patches applied but the MQ extension
disabled from time to time. A case unlikely enough to not be worth
preserving the old behavior with awful hacks.
2014-08-07 14:11:36 -07:00
Pierre-Yves David
60e760ea53 phase: extract the phaseroots serialization in a dedicated method
In most case, the file creation logic will be handled by the
transaction itself. The write method has to stay around for the case
where the repository is modified outside a transaction (strip).
2014-08-07 14:41:00 -07:00
Pierre-Yves David
3f8b890149 transaction: add a file generation mechanism
A new `transaction.addfilegenerator` function is added. It allows external code
to register files to be generated. See inline documentation for details.

It is important to gather all file creation logic on the transaction
as at some point we'll want to mimic the "pre-transaction-commit"
logic that we use for revlog. I'm refering to the logic that lets
hooks see the result of the transaction before it actually gets
committed.
2014-08-07 14:40:02 -07:00
Pierre-Yves David
98693f71e9 transaction: backup file in a dedicated "namespace"
File backup may conflict with other "journal.*" file. We add a fixed part in the
backup name file to prevent it.
2014-08-07 10:54:17 -07:00
Pierre-Yves David
c81f99d5f9 transaction: use self.journal to create backup file
Transaction journal name is "journal" in most case, but it can be something else.
We use the appropriate attribute to create the file.
2014-08-07 11:56:32 -07:00
Alexander Sauta
fcd2aba024 i18n-ru: syncronized with 0c46fc3bf33b 2014-08-04 16:08:42 +01:00
Alexander Sauta
ffd3e9a4f6 merge with i18n 2014-08-04 16:21:58 +01:00
Alexander Sauta
46861b290d i18n-ru: sync with 664883681beb (fuzzies) 2014-08-04 18:51:18 +04:00
Matt Mackall
2cf0973307 Added signature for changeset 58a23aedff03 2014-08-01 18:23:18 -05:00
Pierre-Yves David
f28fa0f221 status: do not reverse deleted and unknown
When reversing a status, trading "added" and "removed" make sense.
Reversing "deleted" and "unknown" does not. We stop doing it.

The reversing is documented in place for the poor soul not even able to remember
the index of all status elements by heart.
2014-08-01 13:01:35 -07:00
Pierre-Yves David
6b79b1a061 status: don't drop unknown and ignored information (issue4321)
By the magic of code movement, we ended up dropping unknown and ignored
information when comparing the working directory with a non-parent revision.

Let's stop doing it and add a test.
2014-08-01 12:49:00 -07:00
Pierre-Yves David
634525fb9a status: explicitly exclude removed file from unknown and ignored
Changeset 83ad0e76acc0 introduced a test to validate that file were not reported
twice when both unknown and removed. This behavior change was introduced by
64d05ea3a10f alongside a bug that dropped ignored and unknown completely
(issue4321). As we are going to fix the bug, we need a proper implementation of
the behavior tested in 83ad0e76acc0.
2014-08-01 13:13:24 -07:00
Sean Farley
822e69ce3a color: pass on key error for win32 (issue4298)
This is a quick fix for some consoles on windows (consoles that are not mingw
based) so that the debugcolor command doesn't throw a KeyError when effects
aren't supported (e.g. italic).
2014-08-01 13:09:06 -05:00
Siddharth Agarwal
171c903a48 context: call normal on the right object
dirstate.normal is the method that marks files as unchanged/normal.

Rev 03dc7365e275 started caching dirstate.normal in order to improve
performance. However, there was an error in the patch: taking the wlock, under
some conditions depending on platform, can cause a new dirstate object to be
created. Caching dirstate.normal before calling wlock would then cause the
fixup calls below to be on the old dirstate object, effectively disappearing
into the ether.

On Unix and Unix-like OSes, the condition under which we create a new dirstate
object is 'the dirstate file has been modified since the last time we opened
it'. This happens pretty rarely, so the object is usually the same -- there's
little impact.

On Windows, the condition is 'always'. This means files in the lookup state are
never marked normal, so the bug has a serious performance impact since all the
files in the lookup state are re-read every time hg status is run.
2014-08-01 18:30:18 -07:00
Matt Mackall
82495c35c1 merge with i18n some more 2014-08-01 11:45:26 -05:00
Matt Mackall
d2743c60f5 merge with i18n 2014-08-01 11:44:50 -05:00
Alexander Sauta
979c9fae76 i18n-ru: sync with 664883681beb (missing strings) 2014-08-01 19:49:28 +04:00
Yuya Nishihara
4d834f9237 log: do not use exact matcher for --patch --follow without file (issue4319)
5d9f39626224 is valid only if file argument is specified.  If no pattern
specified, it can simply fall back to the original matcher.
2014-08-01 21:36:56 +09:00
FUJIWARA Katsunori
609db83006 i18n-ja: synchronized with 79b027f3e471 2014-08-01 17:29:02 +09:00
Wagner Bruna
c6972296d9 i18n-pt_BR: synchronized with 132509f68e6a 2014-08-01 02:02:06 -03:00
Matt Mackall
488f376f73 qimport: record imported revs incrementally (issue3874)
When an import fails, this doesn't lose the state for the earlier
revisions.
2014-07-31 16:32:12 -05:00
Matt Mackall
75584584e7 test-bundle2: add missing os import 2014-07-31 16:01:01 -05:00
Matt Mackall
61d535a9e2 merge with i18n 2014-07-31 14:42:14 -05:00
Matt Mackall
73a6114d2a help: always show command help with -h (issue4240)
Old behavior:
              hg help x    hg x -h    hg help -e x  hg help -c x
config        topic        topic (!)  -             cmd
showconfig    cmd          topic (!)  -             cmd
rebase        cmd          cmd        ext           cmd

New behavior:
              hg help x    hg x -h    hg help -e x  hg help -c x
config        topic        cmd        -             cmd
showconfig    cmd          cmd        -             cmd
rebase        cmd          cmd        ext           cmd
2014-07-31 14:31:31 -05:00
FUJIWARA Katsunori
0365f0be0a templater: add i18n comments to error messages of newly added functions
This patch adds i18n comments to error messages of newly added
functions "startswith" (introduced by 970f27eeba13) and "word" (by
de9bbd245713).
2014-08-01 02:14:24 +09:00
FUJIWARA Katsunori
97d5636e1b commands: make the warning message for "patch --partial" translatable
This patch makes the warning message for "patch --partial"
translatable: this message was introduced by a0ab8b02be69, and there is
no reason to prevent this from being translatable.
2014-08-01 02:14:24 +09:00
FUJIWARA Katsunori
413d1be801 convert: fix argument mismatch at formatting the abort message
This patch fixes argument mismatch at formatting the abort message,
introduced by dcf325a55d85: the last '%s' doesn't have corresponded
argument.

This patch uses "unexpected size" in the abort message, to distinguish
the reason of failure from "unexpected type" failure checked in the
prior code path below:

        if info[1] != type:
            raise util.Abort(_('cannot read %r object at %s') % (type, rev))
2014-08-01 02:14:24 +09:00
FUJIWARA Katsunori
c96cb8047e i18n-ja: synchronized with 30dda0e5f710 2014-08-01 01:13:53 +09:00
Alexandre Garnier
c20b1f5371 debuginstall: handle quoted path for editor (issue4316)
When using an editor path with spaces and options, you can set 'ui.editor'
to '"/path to your/editor" -opt' and it works fine but 'hg debuginstall'
is complaining about it because it simply splits the editor and
tests presence of '"/path'.
Now correctly parse 'ui.editor' string by handling quoted path.
2014-07-31 10:31:56 +01:00
Matt Mackall
888b6892dd test-bundle2: move file mode setting after sys import 2014-07-30 18:28:37 -05:00
Matt Mackall
ebe51daf93 merge with i18n 2014-07-30 14:51:56 -05:00
Vladimir Zakharov
31c92599e4 i18n-ru: update 'revisions' translation 2014-07-30 17:24:08 +04:00
Wagner Bruna
4676efefe3 i18n-pt_BR: synchronized with 664883681beb 2014-07-29 19:29:02 -03:00
FUJIWARA Katsunori
5f213b8584 doc: unify help text for "--edit" option
This patch changes help text for "--edit" option of commands below:

  - fetch
  - qnew
  - qrefresh
  - qfold
  - commit
  - tag

This unification reduces translation cost, too.

This patch chooses not "further edit commit message already specified"
(of "hg commit") but "invoke editor on commit messages" as unified
help text for "--edit" option, because the latter is much older than
the former.
2014-07-30 00:14:52 +09:00
FUJIWARA Katsunori
3c5c28c967 doc: unify help text for "--message" option
This patch changes help text for "--message" option of commands below
for unification.

  - sign (of gpg)
  - tag

This unification reduces translation cost, too.

This patch doesn't change the description for "--message" of "hg
rebase" below, because this should contain "collapse" word to explain
its purpose (only for "--collapse") clearly.

    use text as collapse commit message
2014-07-30 00:13:59 +09:00
Vladimir Zakharov
4b1133e73b i18n-ru: update 'revsets' translation 2014-07-29 19:08:41 +04:00
Augie Fackler
73aafc176d histedit: respect revsetalias entries (issue4311)
We now expand user-provided revsets before using repo.revs() to locate
the root(s) of the user-specified set.
2014-07-28 19:20:13 -04:00