Commit Graph

17088 Commits

Author SHA1 Message Date
FUJIWARA Katsunori
765d4328c8 localrepo: use "self.wvfs.join()" instead of "os.path.join()"
As a part of migration to vfs, this patch uses "self.wvfs.join()"
instead of "os.path.join()", while initialization of fields in the
constructor of "localrepository" class.
2012-07-06 18:45:27 +09:00
FUJIWARA Katsunori
d20072de6a localrepo: use path expansion API via vfs
As a part of migration to vfs, this patch moves path expansion API
invocations in the constructor of "localrepository" to the constructor
of "opener", because the root path to the repository is very important
to handle paths using non-ASCII characters correctly.

This patch also rearrange initialization order of "wvfs" field,
because it is required to initialize "self.root".
2012-07-06 18:45:27 +09:00
FUJIWARA Katsunori
dad1f854dd localrepo: add "vfs" fields to "localrepository" for migration from "opener"
As a part of migration to vfs, this patch adds "vfs" fields to
"localrepository" class.

This allows new codes to access current "opener" objects related to
repositories via "vfs" fields, so patches referring to "vfs" will
replace referring to "opener" in time.

This patch also adds initializations for "vfs" fields to
"statichttprepository" class derived from it, because its constructor
doesn't invoke the constructor of "localrepository", so "vfs" fields
should be initialized explicitly as same as "opener" fields: it has no
working directory, so "wvfs" field is not added.
2012-07-06 18:45:26 +09:00
Na'Tosha Bard
7bf5bfedef largefiles: optimize status by synchronizing lfdirstate with the largefile on update
This speeds up status on a largefiles repo by synchronizing the largefiles dirstate to the
largefile's mtime upon update, preventing the files from coming back as "unsure" later,
requiring a check of the SHA1 sum.
2012-07-13 14:49:16 +02:00
Matt Mackall
f6c512ceb4 Added signature for changeset 46cdcb89086f 2012-07-01 21:12:36 -05:00
Matt Mackall
921065f3f8 record: fix display of non-ASCII names
spotted by Nikolaj Sjujskij
2012-07-01 13:10:54 -05:00
Wagner Bruna
254de6d1aa i18n-pt_BR: synchronized with ef02254f0cee 2012-07-01 08:09:00 -03:00
Wagner Bruna
dee9edcd33 merge with i18n 2012-07-01 08:08:37 -03:00
FUJIWARA Katsunori
a7672f651e i18n-ja: fix some rst syntax problems 2012-07-01 00:04:46 +09:00
FUJIWARA Katsunori
7c967574b8 i18n-ja: synchronized with 30462c97bcea 2012-06-30 21:59:16 +09:00
Matt Mackall
6a10a5e3e4 merge with i18n 2012-06-26 14:50:16 -05:00
Thomas Arendsen Hein
cc4d20e368 subrepo/svn: make rev number retrieval compatible with svn 1.5 (issue2968)
dbc9f6aea991 introduced "svn info TARGET@REV" to determine if a certain
path exists in the specified revision, but in svn 1.5 the error message
"Not a valid URL" yields exit code 0 so the error is not caught.
Use "svn list TARGET@REV" instead which works with svn 1.5 and is even
faster in some situations.
2012-06-26 14:27:33 +02:00
Thomas Arendsen Hein
90f293b489 convert/bzr: make tests work with bzr 2.0 again
bzr ci --commit-time was introduced in 2.1
bzr add without -q prints "adding" in 2.1, "added" in 2.0
2012-06-26 12:17:40 +02:00
Bryan O'Sullivan
9c4291ed97 store: abstract out how we retrieve a file's size 2012-06-25 15:14:06 -07:00
FUJIWARA Katsunori
54911ad11a mq: check subrepo synchronizations against parent of workdir or other appropriate context
Before this patch, MQ checks each subrepo synchronizations against the
working directory context, so ".hgsubstate" updating is not imported
into MQ revision correctly in cases below:

  - qrefresh when current ".hgsubstate" is already synchronized with
    each subrepos: you can reproduce this easily by just twice or more
    qrefresh invocations

  - qnew just after rollback of commit which updates ".hgsubstate"

This patch resolves this by checking subrepo states against:

  - the parent of "qtop" for qrefresh, or
  - the parent of working context otherwise
2012-06-27 22:03:27 +09:00
FUJIWARA Katsunori
8ecc1d9d04 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
Even though the committed revision contains diff of ".hgsubstate", the
patch file created by qrefresh doesn't contain it, because:

  - ".hgsubstate" is not listed up as one of target files of the patch
    for reasons below, so diff of ".hgsubstate" is not imported into
    patch file

      - status of ".hgsubstate" in working directory is usually "clean"
      - ".hgsubstate" is not specified explicitly by users

  - the patch file is created before commit processing which updates
    or creates ".hgsubstate" automatically, so there is no diff for it
    at that time

This patch resolves this problem by:

  - putting ".hgsubstate" into target list of the patch, if needed:
    this allows "patch.diff()" to import diff of ".hgsubstate" into
    patch file.

  - creating the patch file after commit processing:
    this updates ".hgsubstate" before "patch.diff()" invocation.

For the former fixing, this patch introduces "putsubstate2changes()"
to share same implementation with qnew. This is invoked only once per
qnew/qrefresh at most, so there is less performance impact.

This patch also omits "match" argument for "patch.diff()" invocation,
because "patch.diff()" ignores "match" if "changes" is specified.
2012-06-27 22:03:27 +09:00
FUJIWARA Katsunori
fba032044a mq: add ".hgsubstate" to patch target list only if it is not listed up yet
If ".hgsubstate" is already listed up as one of commit targets, qnew
put diff of ".hgsubstate" twice into the patch file stored under
".hg/patches".

It causes rejections at applying such patches.

Other than the case like in added test script, this can also occur
when qnew is executed just after rolling back the committing updated
".hgsubstate".

This patch checks whether ".hgsubstate" is already listed up as one of
commit targets, and put it into the appropriate list only if it is not
listed up yet.
2012-06-27 22:03:22 +09:00
Matt Mackall
5b06da939f backout 94ae81a4e338
This may have allowed unbounded I/O sizes with the current chunk
retrieval code.
2012-07-12 14:20:34 -05:00
Martin Geisler
75be7b05da merge with crew-stable 2012-07-12 13:33:53 +02:00
Adrian Buehlmann
92055c96e6 histedit: use cmdutil.command decorator 2012-07-06 22:43:10 +02:00
Adrian Buehlmann
dad9940448 hgweb: show help with verbose sections included
This makes sure we see the same help info as with 'hg help <command> --verbose'
on the command line, that is, with verbose sections included.
2012-07-10 17:52:43 +02:00
Martin Geisler
0a036ffb67 merge with crew-stable 2012-07-12 10:41:56 +02:00
Martin Geisler
c52341ae3f merge with main 2012-07-12 10:03:50 +02:00
Bryan O'Sullivan
f2f0be709b Merge 2012-07-11 15:39:00 -07:00
Bryan O'Sullivan
f9d692c823 localrepo: make requirements and openerreqs mutable by subclasses
This is necessary for extensions that need to modify a repo's
requirements.
2012-07-11 15:36:00 -07:00
Bryan O'Sullivan
c15e05c67a test-clone: load extensions before doing anything
This makes it possible to run this test using
"--extra-config-opt=extensions.myext=" and have the extension be
loaded as intended.
2012-07-11 15:34:32 -07:00
Bryan O'Sullivan
240694068d test-clone: load extensions before doing anything
This makes it possible to run this test using
"--extra-config-opt=extensions.myext=" and have the extension be
loaded as intended.
2012-07-11 15:34:01 -07:00
Friedrich Kastner-Masilko
a6245a11d3 revlog: fix for generaldelta distance calculation
The decision whether or not to store a full snapshot instead of a delta is done
based on the distance value calculated in _addrevision.builddelta(rev).

This calculation traditionally used the fact of deltas only using the previous
revision as base. Generaldelta mechanism is changing this, yet the calculation
still assumes that current-offset minus chainbase-offset equals chain-length.
This appears to be wrong.

This patch corrects the calculation by means of using the chainlength function
if Generaldelta is used.
2012-07-11 12:38:42 +02:00
Bryan O'Sullivan
48787abe47 Merge 2012-07-11 15:05:06 -07:00
Bryan O'Sullivan
158df87946 tests: reduce spurious failures when run with generaldelta
Quite a few tests fail in noisy but meaningless ways when the test suite
is run with generaldelta enabled:

  ./run-tests.py --extra-config-opt=format.generaldelta=1

This reduces the amount of noise introduced by the debugindex command,
the main source of differences.  In my environment, when testing with
generaldelta enabled, this change reduces the number of completely
failing tests from 21 to 8.
2012-07-11 15:03:10 -07:00
Bryan O'Sullivan
0353e469f1 Merge 2012-07-06 20:28:32 -07:00
Bryan O'Sullivan
ea2526a3d4 setup: disable -mno-cygwin if building under mingw32
This gcc option has been deprecated since at least 2009 (gcc 4.4),
and it causes compilations to fail entirely with gcc 4.6.x.

Upstream distutils bug: http://bugs.python.org/issue12641
2012-07-06 20:19:55 -07:00
Augie Fackler
0b10b5edb8 histedit: add extension docstring from external README
Made a couple of tweaks to try and fit better with the hg docstring
style and fix up some ReST errors in the README.
2012-07-06 12:17:53 -05:00
Augie Fackler
39b1dce60e histedit: don't crash if the result of fixing up a fold is empty 2012-07-06 11:39:02 -05:00
Augie Fackler
3b175c50a8 histedit: replace hexshort lambda with node.short 2012-07-06 11:06:57 -05:00
Mads Kiilerich
c60c80f534 graphlog: don't truncate template value at last \n
Most uses of templates requires a trailing newline to get vertical output.

Graphlog with a template without trailing newline did however not just create
horisontal output like other commands would but truncated the output at the
last \n. Template values without any \n were ignored completely.

Graphlog will now only eat one trailing newline before it lets the flow of the
graph add the necessary vertical space.
2012-07-06 00:30:18 +02:00
Pierre-Yves David
2fc08a6030 graphlog: display obsolete changeset as "x"
Changeset detected as obsolete will be displayed as "x" instead of 'o':

    o new rewritten changeset
    |
    | x old obsolete changeset
    |/
    |
    o base

This will be useful even when some obsolete changeset will be "hidden" because
not all obsolete changeset can be hidden. If an obsolete changeset have
non-obsolete descendant we can't simply hide it. And having a clear visual hint
that the changeset is obsolete is useful.

The main reason to make this minor change right now is to:

1) introduce an officiel user of the `ctx.obsolete()` method that will detect
   breakage earlier than third party code (mutable, hgview)

2) Do not display any vocabulary related to obsolete. Such vocabulary will
   require discussion.
2012-07-04 17:29:49 +02:00
Pierre-Yves David
5793a07f30 obsolete: fix context.obsolete() method
- obsstore attribut name changed.
- public changeset can't be obsolete
2012-07-04 17:26:51 +02:00
Pierre-Yves David
b187e6bd52 obsolete: fix error message at marker creation
precursors content where printed for invalid successor.
2012-07-04 16:37:00 +02:00
Adrian Buehlmann
388dfb8323 help: explain effect of .hgignore on tracked files 2012-07-02 00:31:22 +02:00
Adrian Buehlmann
f4e0fd8be9 hgignore: simply ignore all *.exe's everywhere
it's not like we're going to add any exe anywhere ever
2012-07-01 10:06:16 +02:00
Mads Kiilerich
43fde17e2d tests: ignore pax_global_header in test-subrepo-git.t
Failure seen on hgbuildbot 2.4 and 2.5 after a62fb0987502.

Hide '../archive_x/s/pax_global_header' with same strange trick as in
686775e575f3.
2012-07-05 02:25:49 +02:00
Mads Kiilerich
8ba44477e6 tests: remove GNU quoting in test-subrepo-deep-nested-change.t
Test failure on non-GNU systems introduced in a62fb0987502.
2012-07-05 01:47:17 +02:00
Mads Kiilerich
b5842551c2 tests: add '(glob)' for Windows paths in test-subrepo-deep-nested-change.t
Test failure was introduced in a62fb0987502.
2012-07-05 00:51:05 +02:00
Mads Kiilerich
2108c6e927 check-code: verify that 'saved backup bundle to ...' is '(glob)'ed
This is the most frequent trivial reason tests fail on Windows.
2012-07-05 00:49:26 +02:00
Mads Kiilerich
2a09e8d38f tests: fix test markup in test-merge-types.t
d727e5b3202b introduced some tests that because of incorrect indentation wasn't
run.
2012-07-05 00:35:42 +02:00
Adrian Buehlmann
7d6945259d test-hgweb-diffs: partially adapt for Windows
Since chmod isn't supported on Windows (or vfat), I'm importing a here-doc
instead (<<EOF ..).

Option --bypass on import of the here-doc is required on Windows (or vfat) to
bypass the working directory (see hg help import). Not using --bypass would
lose the mode changing bits.

I've had to insert a --bypass on the preexisting import call futher down in the
test, because importing a patch with --exact and mode changes will fail on
Windows (and vfat).

As the point of this test is not to test commit, I'm using the import
procedure for all platforms unconditionally, that is, I'm intentionally not
keeping the original sequence of hg and chmod calls for platforms that support
exec either, which saves us having to insert an #if exec ... #else ... #endif.
2012-07-04 12:43:13 +02:00
Augie Fackler
a0a7fde1c9 histedit: mark as a first party extension 2012-06-28 08:45:38 -05:00
Augie Fackler
99e113bc35 histedit: remove use of reduce() builtin spotted by check-code 2012-06-27 18:42:48 -05:00
Augie Fackler
47d370a444 test-histedit-edit: improve coverage of histedit code 2012-06-27 18:41:14 -05:00