Commit Graph

20800 Commits

Author SHA1 Message Date
Pierre-Yves David
bb4442ac82 statichttp: respect localrepo _restrictcapabilities
The static http repository was doing his own filtering of capability ignoring
the filtering done in the local repo main class. This led to static http using
the current draft of bundle2. We now apply both.
2014-04-07 11:45:50 -07:00
Mads Kiilerich
4622fdf46c tests: make unshelve tests more tricky - don't depend on size change
One reason shelve and largefiles doesn't work could be rapidly changing standin
files. Prove that shelve in general doesn't have problems with that.
2014-04-07 23:10:20 +02:00
Mads Kiilerich
7e476308af shelve: introduce secret option for using fixed date for temporary commit
Using a fixed date makes hashes stable and makes debugging simpler. The date
and hashes of this changeset are normally not exposed.
2014-04-07 23:10:20 +02:00
Mads Kiilerich
a0586f61a1 mq: repo['.'] is not a wctx, repo[None] is
The parameters passed to subrepo.submerge are confusing anyway.
2014-04-07 23:10:20 +02:00
Mads Kiilerich
e41d76e8d3 shelve: repo['.'] is not a wctx but a pctx
Don't confuse hackers!
2014-04-07 23:10:20 +02:00
Durham Goode
50829c1b45 exchange: pass bundlecaps through to changegroup
The bundlecaps passed to exchange.getbundle were being dropped completely. We
should pass them on through to the changegroup.

This affected the remotefilelog extension, since it relies on those bundlecaps.
2014-04-04 16:41:51 -07:00
Pierre-Yves David
6feac7d5c2 bundle2: allow pulling changegroups using bundle2
This changeset refactors the pull code to use a bundle2 when available. We keep
bundle2 disabled by default. The current code is not ready for prime time.

Ultimately we'll want to unify the API of `bunde10` and `bundle20` to have less
different code. But for now, testing the bundle2 exchange flow is an higher
priority.
2014-04-01 23:41:32 -07:00
Pierre-Yves David
6bd17e6e6c bundle2: add an exchange.getbundle function
This function can return a `HG10` or `HG20` bundle. It uses the `bundlecaps`
parameters to decides which one to return.

This is a distinct function from `changegroup.getbundle` for two reasons. First
the APIs of `bundle10` and `bundle20` are not compatible yet. The two functions
may be reunited in the future. Second `exchange.getbundle` will grow parameters
for all kinds of data (phases, obsmarkers, ...) so it's better to keep the
changegroup generation in its own function for now.

This function will be used it in the next changesets.
2014-04-04 01:51:54 -07:00
Pierre-Yves David
c2ce1e9068 localpeer: propagate bundlecaps in getbundle call
Best arguments are the ones in use...
2014-04-04 01:33:20 -07:00
Pierre-Yves David
ece6aaecdb bundle2: make it possible have a global transaction for the unbundling
We use the `gettransaction` method approach already used for pull. We
need this because we do not know beforehand if the bundle needs a
transaction to be created. And (1) we do not want to create a
transaction for nothing. (2) Some bundle2 bundles may be read-only and
do not require any lock or transaction to be held.
2014-04-02 23:56:49 -07:00
Matt Mackall
9d9be85bf6 tests: fix test output typo 2014-04-04 17:47:19 -05:00
Pierre-Yves David
11a11c0625 bundle2: first crude version of bundling changeset with bundle2
The current changegroup format is put in a "changegroup" part and processed by
an appropriate handlers.

This is not production ready code, but let us start smoke testing.
2014-03-24 19:37:59 -07:00
Pierre-Yves David
5ab0b5facf bundle2: record processing results in the bundleoperation object
Part handlers can now add records to the `bundleoperation` object. This can be
used to help other parts or to let the caller of the unbundling process react
to the results.
2014-04-02 22:37:50 -07:00
Pierre-Yves David
15e3869bad bundle2: introduce a bundleoperation object
This object will hold all data and state gathered through the processing of a
bundle. This will allow:

- each handler to be aware of the things unbundled so far
- the caller to retrieve data about the execution
- bear useful object and logic (like repo, transaction)
- bear possible bundle2 reply triggered by the unbundling.

For now the object is very simple but it will grow at the same time as the
bundle2 implementation.
2014-04-02 22:24:44 -07:00
Pierre-Yves David
ef32c25a27 bundle2: feed a unbundle20 to the processbundle function
The unbundle can comes from multiple sources. (on disk file, peer, etc) and
(ultimately) of multiple type (bundle10, bundle20). The `processbundle` is no
longer in charge of creating the bundle.
2014-04-02 13:50:57 -07:00
Pierre-Yves David
4446fb0dd2 bundle2: lock the repo during unbundle test
We forgot the lock the repo. It's not too bad during tests, but the lock also
still carry some transaction logic. (yes we need to get rid of this)
2014-04-03 17:25:47 -07:00
Mads Kiilerich
a0f70f6a56 merge: keep destination filename as key in filemerge actions
Gives more readable debug output and makes it possible to compare/merge actions
later.
2014-03-02 18:52:16 +01:00
Mads Kiilerich
897b2ac8d9 merge: keep destination filename as key in actions for merge with dir rename
Avoids
   None: local renamed directory to b/c -> d
  updating:None 1/1 files (100.00%)
and makes it possible to compare/merge actions later.
2014-03-02 18:49:36 +01:00
Mads Kiilerich
71486dc145 merge: include ancestor node in merge actions 2014-02-28 02:38:33 +01:00
Matt Mackall
e10cab8769 merge with stable 2014-04-04 14:01:25 -05:00
Sean Farley
750f67f948 tests: remove unused variables from test-pathencode.py caught by pyflakes 2014-04-03 20:35:56 -05:00
Sean Farley
3c09c4d895 shelve: remove unused variable caught by pyflakes 2014-04-03 20:32:56 -05:00
Sean Farley
90ccd3ca5f changegroup: remove unused variable caught by pyflakes 2014-04-03 20:29:03 -05:00
Matt Mackall
71fa6b44a6 Added signature for changeset bced32a3fd6c 2014-04-01 17:57:04 -05:00
Sean Farley
320875017e repoview: use _gethiddenblockers in computehidden
No functionality has changed, since we've only extracted the code into its own
function. Now extensions can wrap _gethiddenblockers to provide their own
blocker without polluting bookmarks or local tags.
2014-03-28 12:51:05 -05:00
Sean Farley
844f2d5df4 repoview: add _gethiddenblockers method
This is a standalone function that will provide the ability for extensions to
wrap.
2014-04-03 20:07:42 -05:00
Sean Farley
13250b1f33 repoview: improve performance for computehidden (issue4206)
For repos with a large number of heads (including hidden heads), a stale tag
cache would cause computehidden to be drastically slower because of a the call
to repo.tags() (which would build the tag cache).

We actually don't need the tag cache for computehidden because we filter out
global tags. This patch replaces the call to repo.tags with readlocaltags so
as to avoid the tag cache.
2014-03-27 20:14:55 -05:00
Andrew Shadura
eb789f07b1 hgk: use hg export to write commits
Instead of calling internal command, use hg export to produce changeset
diffs compatible with hg import directly.
2014-03-15 18:27:51 +01:00
Andrew Shadura
7953c9bd23 hgk: add .diff extension when exporting commits
Append the .diff extension automatically.
2014-03-25 22:47:59 +01:00
Pierre-Yves David
6b9778c026 localrepo: move the addchangegroup method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had few callers, not enough to be kept in local repo.
2014-04-01 15:27:53 -07:00
Pierre-Yves David
4d81b98c1e localrepo: move the addchangegroupfiles method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had a single caller, far too few for being kept in local repo.
2014-04-01 15:21:56 -07:00
Pierre-Yves David
8e0876686d localrepo: move the changegroup method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had few callers, not enough to be kept in local repo.

The peer API stay unchanged.
2014-04-01 15:08:27 -07:00
Pierre-Yves David
30f24fdb7a localrepo: move the getbundle method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had few callers, not enough to be kept in local repo.

The peer API remains unchanged.
2014-04-01 14:40:35 -07:00
Matt Mackall
9f82e04c09 store: drop unused existing list 2014-04-03 12:59:12 -05:00
Pierre-Yves David
47880ff5c9 localrepo: move the getlocalbundle method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had 3 callers total, far too few for being kept in local repo.
2014-04-01 14:33:23 -07:00
Pierre-Yves David
f14b79a23f localrepo: move the changegroupsubset method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had few callers, not enough to be kept in local repo.

The peer API remains unchanged.
2014-04-01 14:25:03 -07:00
Pierre-Yves David
eb9e40c9b6 localrepo: move the changegroupinfo method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had a single caller... already in this changegroup module.
2014-04-01 14:13:34 -07:00
Pierre-Yves David
691e520cd5 localrepo: move the _changegroupsubset method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.

The method had 3 callers total, far too few for being kept in local repo.
2014-04-01 13:59:55 -07:00
Pierre-Yves David
8ab4eab6ab push: pass a pushoperation object to localrepo.checkpush
The `pushoperation` object contains strictly more data the arguments currently
passed to `localrepo.checkpush` we pass the new object instead. This function is
used by MQ to abort push that includes MQ changesets.

Note: extension that may use this function will have to align.
2014-04-01 13:45:48 -07:00
Pierre-Yves David
c6617aef8a wireproto: use decorator for the ubundle command 2014-03-28 14:43:30 -07:00
Pierre-Yves David
04af30a7a2 wireproto: use decorator for the stream command 2014-03-28 14:43:11 -07:00
Pierre-Yves David
5dd8ba7d3d wireproto: use decorator for the pushkey command 2014-03-28 14:42:55 -07:00
Pierre-Yves David
99c03cd1e0 wireproto: use decorator for the lookup command 2014-03-28 14:42:38 -07:00
Pierre-Yves David
fe6ed0903b wireproto: use decorator for the listkeys command 2014-03-28 14:42:21 -07:00
Pierre-Yves David
32d30d0970 wireproto: use decorator for the known command 2014-03-28 14:42:06 -07:00
Pierre-Yves David
8a8b960d73 wireproto: use decorator for the hello command 2014-03-28 14:40:44 -07:00
Pierre-Yves David
997e84e937 wireproto: use decorator for the heads command 2014-03-28 14:40:31 -07:00
Pierre-Yves David
73981cbf16 wireproto: use decorator for the getbundle command 2014-03-28 14:40:07 -07:00
Pierre-Yves David
a82db7631c wireproto: use decorator for the debugwireargs command 2014-03-28 14:39:06 -07:00
Pierre-Yves David
d39b82219d wireproto: use decorator for the changegroupsubset command 2014-03-28 14:38:40 -07:00