Commit Graph

22196 Commits

Author SHA1 Message Date
Kevin Bullock
6cd9563e40 merge with stable 2014-09-07 11:46:11 -05:00
Augie Fackler
f41d193435 merge with stable 2014-09-04 09:59:23 -04:00
Siddharth Agarwal
ca3e00a8e3 histedit: abort gracefully on --continue/--abort with no state
Previously we'd print an ugly message saying that the histedit-state file
doesn't exist in the repo.
2014-09-03 20:42:51 +02:00
Matt Mackall
01496efef0 Added signature for changeset c2e80605b621 2014-09-02 03:41:01 +02:00
Matt Mackall
8d49d252a8 merge with i18n 2014-09-01 23:43:33 +02:00
Wagner Bruna
aef4c89e3e i18n-pt_BR: synchronized with 359fb11497a4 2014-09-01 10:57:27 -03:00
Wagner Bruna
3853b731ce merge with i18n 2014-09-01 10:54:49 -03:00
FUJIWARA Katsunori
645a149940 i18n-ja: synchronized with 86be79fee795 2014-08-31 20:49:13 +09:00
Gregory Szorc
a57721695a help: only call doc() when it is callable
`hg help -k` on my machine was aborting because the hg-prompt extension
was inserting a string and not a function into help.helptable and help
was blindly calling it.

This patch changes keyword searching to be more robust against
unexpected types.
2014-08-30 20:06:24 +02:00
Mike Hommey
edf6a59652 repoview: fix typo in repoview.changelog
Incidentally, this avoids the changelog cache being invalidated each time
it's accessed on a repoview.

On a filtering experiment on a repository the size of mozilla-central,
this makes a significant difference:

Before, running hg log -l 10 --time with about 8k changesets filtered out:
time: real 1.490 secs (user 1.450+0.000 sys 0.040+0.000)

After:
time: real 0.540 secs (user 0.530+0.000 sys 0.010+0.000)
2014-08-31 19:43:03 +09:00
Kevin Bullock
13972d0b4a bookmarks: refer to "the" active bookmark to clarify that there's only one
This is a follow-on to c6533daf7fc4 that just makes a slight clarification.
2014-08-30 15:13:02 +02:00
Wagner Bruna
e74e5f203b i18n-pt_BR: synchronized with 86be79fee795 2014-08-30 09:40:31 -03:00
FUJIWARA Katsunori
5c74f6bc14 import: show the warning message for failure of merging
Before this patch, no message is shown for failure of merging at "hg
import".

In such case, merging patch is imported as a normal revision silently,
and it may confuse users.

For simplicity, this patch recommends just using "--exact", even
though importing the merging patch itself is possible without it if:

  - the hash of the 1st parent in the patch is equal to one of the
    patch imported just before (or the parent of the working
    directory, for the 1st patch of the series), and

  - the hash of the 2nd parent in the patch is known in the local
    repository
2014-08-27 23:10:06 +09:00
Mads Kiilerich
bb5bc3c743 graft: fix collision detection with origin revisions that are missing
When grafting something with a matching origin, it would normally be skipped:
  skipping already grafted revision 123 (23 also has origin 12)

But after stripping a graft origin, graft could fail with a reference to the
origin that no longer exists:
  abort: unknown revision '5c095ad7e90f871700f02dd1fa5012cb4498a2d4'!

Instead, detect that the origin is unknown and skip it anyway, like:
  skipping already grafted revision 8 (2 also has unknown origin 5c095ad7e90f871700f02dd1fa5012cb4498a2d4)
2014-08-27 15:30:09 +02:00
Durham Goode
37c75eb0f0 bookmarks: allow pushkey if new equals current
Previously a bookmark pushkey would be rejected if the specified 'old' value
didn't match the servers 'current' value. This change allows this situation, as
long as the 'current' server value equals the 'new' pushkey value already.

We are trying to write a hook that forces a server bookmark to move forward,
using a changegroup hook. If the user also pushed the bookmark, they would get
an error, since they computed their pushkey (old,new) pair before the server
moved the bookmark. Long term, bundle2 will let us do this more smartly, but
this change seems reasonable for now.
2014-08-26 04:58:41 -07:00
Mads Kiilerich
9f8f9204ca tests: improve test coverage of branch command and existing branches 2014-08-29 12:17:53 +02:00
Angel Ezquerra
129d376917 localrepo: make it possible to pass multiple path elements to join and wjoin
This makes join and wjoin behave in the same way as os.path.join. That is, it
makes it possible to pass more than one path element to them.

Note that the first path element is still required, as it was before this patch,
and as is the case for os.path.join.
2014-08-28 17:23:05 +02:00
Gregory Szorc
6f5ee93aca run-tests: make --interactive work with --view 2014-08-31 12:22:44 +02:00
Mads Kiilerich
a390d842c5 convert: don't use multi-argument set.update
Mumble mumble 2.4 mumble.
2014-08-31 11:11:42 +02:00
Mike Edgar
be835fe233 error: use docstrings, not bare strings, for error classes 2014-08-30 12:22:20 +02:00
Mads Kiilerich
03327f4889 osx: create dmg with installer instead of zip
OS X would offer to expand the zip so the (multi file) installer inside it
could be run ... but that would leave the expanded zip folder around.

Instead, use a .dmg file that automatically will be mounted - that seems more
common on OS X.

Still, there is two levels of levels of clicking before actually launching the
installer. Having a single file installer would be better ... but seems to be
hard. A more feasible improvement would be some fancy layout inside the .dmg .
2014-08-31 10:24:25 +02:00
Pierre-Yves David
5b2a89c72f branchmap: pre-filter topological heads before ancestors based filtering
We know that topological heads will not be ancestors of anything, so we filter
them out to potentially reduce the range of the ancestors computation.

On a strongly headed repo this gives humble speedup:

    from 0.1984 to 0.1629
2014-08-30 12:33:12 +02:00
Pierre-Yves David
fa154e4139 branchmap: issue a single call to ancestors for all heads
There is no reason to make multiple calls. This provides a massive speedup for
repo with a lot of heads.

On a strongly headed repo this gives humble speedup in simple case:

    from 8.1097 to 5.1051

And massive speedup in other case:

    from 7.8787 to 0.1984
2014-08-30 12:20:50 +02:00
Pierre-Yves David
1f9120a498 test-ancestor: add a test for ancestor with ancestry within the initset
I was wondering if revisions in the initial set that are still ancestors of other
elements in the initial set were yielded by `changelog.ancestors`. I now have my
answer (they do) and Mercurial has a new test.
2014-08-30 11:39:15 +02:00
Pierre-Yves David
cb0b9120c1 bundle2: pull obsmarkers relevant to the pulled set through bundle2
We use the new `obsheads` argument to retrieve them in a bundle2 part at the
same time as the changegroup.
2014-08-26 12:47:41 +02:00
Pierre-Yves David
e65921cdf4 getbundle: add obsmarkers argument to getbundle
This argument triggers the retrieval of all markers relevant to the set of
changesets defined by the nodes in `heads`.
2014-08-29 12:36:17 +02:00
Pierre-Yves David
4fa8350ddd pull: use the "cg" argument when pulling a bundle2
We use the `cg` argument to disable the generation of a changegroup part. This
is useful to pull information when changesets are already in sync (phases,
obsmarkers).
2014-08-29 12:28:58 +02:00
Pierre-Yves David
d291149b10 wireprotocol: fix 'boolean' handling
The encoding and decoding code were swapped. This is now fixed.
2014-08-29 12:51:00 +02:00
Sean Farley
a5ff857520 log: use correct phase info for parent field (issue4347)
Previously, there was a copy / paste error with using the current changeset's
phase information. We now look up the parent context explicitly.

The line was too long so it is stored into a variable first.
2014-08-23 17:03:08 -05:00
Thomas De Schampheleire
1c23ea4c79 help: add pad function to template help
Commit 89145c35f76e introduced a pad function for use in templates, but did
not add the corresponding documentation to 'hg help templating'.
2014-08-25 15:10:09 +02:00
Pierre-Yves David
81f365f70c push: only push obsmarkers relevant to the "pushed subset"
We should only exchange obsolete markers related to the changesets
that are being exchanged. For example, if `A'` is a successor of `A`,
we do not want to push the marker if we are not exchanging
`A'`. Otherwise `A` would disappear without a successor, leading to confusion
for both users and the evolution mechanism.

Therefore we now exchange only the markers relevant to the subset of nodes
involved in the push (the nodes themselves may be already common but were
selected by --rev (or the lack of --rev)).

Note that all selected markers are still exchanged on each push. We do
not have a discovery protocol for markers in core yet. Such discovery
would save us the exchange of markers known on both side.
2014-08-20 01:15:09 -07:00
Pierre-Yves David
78eab12f44 test-obsolete: sort the output of debugobsolete
The set of relevant markers is currently unordered. Therefore the
markers will be added in arbitrary order. We sort the list of markers
beforehand to ensure stable output for testing.
2014-08-20 19:47:35 -07:00
Pierre-Yves David
56469dc57f test-obsolete: change a marker so it is relevant to the exchanged set
We are going to only exchange markers relevant to the exchanged
changesets. So we need to change this marker to use a known changeset as
a successor instead of a precursor.
2014-08-20 19:42:33 -07:00
Pierre-Yves David
4dda0b0535 push: use bundle2 to push obsmarkers when possible 2014-08-25 19:44:27 +02:00
Pierre-Yves David
64fe90ce39 exchange: add a buildobsmarkerpart function
We'll have to build an obsmarker part for both push and pull. So we build a
function to factor out the common part.
2014-08-25 19:32:51 +02:00
Pierre-Yves David
9c8ad08d12 obsolete: add a commonversion function
This function returns the highest common version between the locally known
formats and a list of remotely known formats. This is going to be useful to
know what format should be used for exchange.
2014-08-26 11:36:23 +02:00
Pierre-Yves David
e2072df9be bundle2: add a obsmarkersversion function to extract supported version
Right next to the function that encodes the supported versions in
capabilities we add a function that decodes the versions out of capabilities.
This is going to be useful to know what formats can be used for exchange.
2014-08-26 11:48:26 +02:00
Pierre-Yves David
661ba0c427 bundle2: advertise the obsmarker part in bundle2 capabilities 2014-08-21 18:18:38 -07:00
Pierre-Yves David
efcf1868b1 bundle2: introduce a getrepocaps to retrieve the bundle2 caps of a repo
This function lets extensions change the bundle2 capabilities of a repository.
2014-08-25 19:21:47 +02:00
Pierre-Yves David
757af06075 obsmarker: move bundle2caps from the localrepo class to the bundle2 module
The localrepo path was quicker, easier, more seductive. We'll soon add a
function in another changeset to alter the capabilities.
2014-08-25 19:17:06 +02:00
Pierre-Yves David
c3dde4235f obsmarker: produce a reply part for markers received through bundle2 2014-08-25 18:35:39 +02:00
Pierre-Yves David
fc6088afa7 obsmarker: record the number of new markers in the transaction
This lets hooks be notified about new markers in the repository.
2014-08-25 18:26:56 +02:00
Pierre-Yves David
417557b6af obssmarker: add a bundle2 record with the number of markers added 2014-08-25 18:10:08 +02:00
Pierre-Yves David
2a117cfbf2 obsmarker: write a message with the number of markers added through bundle2 2014-08-25 18:09:54 +02:00
Pierre-Yves David
fc505cbe59 bundle2: add an obsmarkers part handler
This part contains a binary stream of obsolescence markers. Received markers are
added to the repository.
2014-08-25 18:08:22 +02:00
Pierre-Yves David
d8f05095f7 obsolete: make encodemarkers a public function
We'll need access to it for bundle2.
2014-08-25 16:24:40 +02:00
Pierre-Yves David
460e985627 obsolete: move _encodemarkers next to _readmarkers 2014-08-25 16:21:33 +02:00
Pierre-Yves David
73e94f0411 obsstore: store and preserve ondisk version 2014-08-25 16:18:44 +02:00
Pierre-Yves David
150d8e5d5f obsolete: have _readmarkers return the format version
readmarkers is not returning the version of the format it read from. This will
let callers know about the format and allow them to preserve it.
2014-08-25 16:51:51 +02:00
Pierre-Yves David
2be245bb0d obsolete: support for any known obsstore format when reading or writing
We can now read and write any known format. The list of known formats
currently has one element (0). The obsstore itself is not aware of
multiple formats yet and always uses format 0.
2014-08-25 16:16:01 +02:00