Commit Graph

22787 Commits

Author SHA1 Message Date
Martin von Zweigbergk
1a4e0a3d51 dirstate: separate 'lookup' status field from others
The status tuple returned from dirstate.status() has an additional
field compared to the other status tuples: lookup/unsure. This field
is just an optimization and not something most callers care about
(they want the resolved value of 'modified' or 'clean'). To prepare
for a single future status type, let's separate out the 'lookup' field
from the rest by having dirstate.status() return a pair: (lookup,
status).
2014-10-03 21:44:10 -07:00
Martin von Zweigbergk
ff5a03e917 commit: update file nodeid and flags in the same place
Now that we have a separate variable for the original 'm1' manifest,
we can safely update the nodeid of the file in the new manifest in the
same place as we update the flags.
2014-10-13 14:18:47 -07:00
Martin von Zweigbergk
00bbada8de commit: use separate variable for p1 manifest and new manifest
In localrepo.commitctx(), p1's manifest is copied and used as the
basis for the manifest that is about to be committed. The way the copy
is updated makes it safe to use it where the original p1's manifest is
wanted. For readability, though, a separate variable for each purpose
would be clearer. Make it so.
2014-10-13 14:11:47 -07:00
Martin von Zweigbergk
d74577dbf4 commit: remove dead initialization of 'lock'
The 'lock' variable is initialized to None, but before it's ever read,
it's assigned again.
2014-10-13 14:34:53 -07:00
Martin von Zweigbergk
28d3f795f0 commit: reduce scope of 'removed' variable
The variable is closely related to 'added' and 'changed', so it makes
sense to have it declared next to them.
2014-10-13 16:43:37 -07:00
Matt Mackall
7872571fea rebase: fix some weird mixed-case naming 2014-10-13 18:00:39 -05:00
Matt Mackall
f3ce636a9c rebase: move duplicatecopies next to merge
This is preparation for removing open-coded rebase/graft operations.

As a side-effect, this exposes proper renames in the working copy when
there are conflicts, which shows up in test-shelve.t.
2014-10-13 17:55:45 -05:00
Matt Mackall
a61dbef490 histedit: use merge.graft 2014-10-13 17:12:47 -05:00
Matt Mackall
74cbfe3cf7 graft: use merge.graft 2014-10-13 17:12:31 -05:00
Matt Mackall
0327807819 merge: add merge.graft helper
This will help unify all the open-coded graft/rebase operations.
2014-10-13 17:12:12 -05:00
Matt Mackall
f663e5fc01 duplicatecopies: move from cmdutil to copies
This is in preparation for moving its primary caller into merge.py,
which would be a layering violation in the current location.
2014-10-13 14:33:13 -05:00
Matt Mackall
9286044a06 histedit: fix indent
The duplicatecopies call should be part of the rebase block.
2014-10-13 14:04:11 -05:00
Matt Mackall
32d16e5457 graft: move rebase cleanup code next to actual rebase
This is prep for refactoring the rebase logic.
2014-10-13 13:21:03 -05:00
Matt Mackall
9dcdad50d1 shelve: add a bundlerepo method 2014-10-10 13:44:40 -05:00
Matt Mackall
8e8234eecc dirstate: merge falls through to otherparent
This lets us more correctly fix the state when we use setparents, as
demonstrated in the change in test-graft.t.
2014-10-11 14:05:09 -05:00
Matt Mackall
f7a8e82c62 dirstate: use 'm' state in otherparent to reduce ambiguity
In rebase-like operations where we abandon the second parent, we can
correctly fix up the state in setparents.
2014-10-10 13:31:06 -05:00
Matt Mackall
a44416ab0f dirstate: properly clean-up some more merge state on setparents 2014-10-10 13:05:50 -05:00
Durham Goode
030db2699f phases: move root phase assignment to it's own function
This moves the initial root phase assignment to it's own function. Future
patches which make phase calculations lazy will use this function to pre-fill
certain phases which can be deduced from the roots.
2014-10-07 11:42:37 -07:00
Durham Goode
0d0869f7ae phases: add invalidate function
Phase cache invalidation was spread all over the place. Let's add a function to
unify it. Later more will be added to this function.
2014-10-07 11:37:54 -07:00
Durham Goode
1b30e7ed86 phases: change phase command change detection
A future patch is going to make phase computation lazy, so the phase command can
no longer read and diff the entire phase list directly. This changes the phase
command to build it's own list for diff purposes.
2014-10-12 23:30:04 -07:00
Pierre-Yves David
551481efc6 spanset: remove .set() definition
All my friends are dead.
2014-10-10 13:09:22 -07:00
Pierre-Yves David
cdaf453077 generatorset: remove .set() definition
All my friends are dead.
2014-10-10 13:08:49 -07:00
Pierre-Yves David
9531e16b0d addset: remove .set() definition
All my friends are dead.
2014-10-10 13:08:28 -07:00
Pierre-Yves David
f957be2403 filteredset: remove .set() definition
All my friends are dead.
2014-10-10 13:08:10 -07:00
Pierre-Yves David
fcdeb29add baseset: remove set() definition
All my friends are dead.
2014-10-10 13:07:35 -07:00
Pierre-Yves David
a9fcdb25c5 abstractsmartset: remove set() method definition
Now that all usages have been removed, we can drop this not so useful part of
the API. We can note that the name was wrong all along...
2014-10-10 11:27:57 -07:00
Pierre-Yves David
70851c278d match: check if an object is a baseset using isascending instead of set
The `set()` method is going away.
2014-10-10 14:27:05 -07:00
Pierre-Yves David
0de25934dc getset: check if an object is a baseset using isascending instead of set
The `set()` method is going away.
2014-10-10 14:22:23 -07:00
Pierre-Yves David
c249a728eb fullreposet: detect smartset using "isascending" instead of "set"
The `.set()` function is going away.
2014-10-10 13:24:57 -07:00
Pierre-Yves David
be86e2f6f1 fullreposet: drop custom sets but not smartsets detection
All custom classes use by revsets are smartsets now. We drop the special-casing.
2014-10-10 13:21:05 -07:00
Pierre-Yves David
e0b5b0a127 addset: drop .set() usage during iteration
We can use the containment check directly.
2014-10-10 12:30:00 -07:00
Pierre-Yves David
efff35ee9d baseset: access _set directly for containment check
The `.set()` method is going away.
2014-10-10 12:31:22 -07:00
Pierre-Yves David
5049b858d9 baseset: make _set a property cache
This will remove the need for `baseset.set()`.
2014-10-10 12:30:56 -07:00
Pierre-Yves David
544d621b98 graphnode: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-10 11:27:04 -07:00
Pierre-Yves David
a54d940320 revset-_hexlist: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:52:10 -07:00
Pierre-Yves David
76a0476bf7 revset-_intlist: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:51:54 -07:00
Pierre-Yves David
3094e008ed revset-_list: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:51:16 -07:00
Pierre-Yves David
2c5bccb146 revset-roots: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:50:20 -07:00
Pierre-Yves David
256f11e0d3 histedit: stabilise the order nodes that are stripped
The `nodes` object is a set. We sort it to get stable order. This is going to
prevent revsets from getting confused when removing a `.set()` call in `roots`.
2014-10-10 13:31:00 -07:00
Pierre-Yves David
b1e5f6cb89 revset-origin: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:49:17 -07:00
Pierre-Yves David
29984785df revset-last: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:48:56 -07:00
Pierre-Yves David
113095a6b7 revset-limit: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:48:24 -07:00
Pierre-Yves David
6847074b2d revset-destination: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:47:46 -07:00
Pierre-Yves David
1ecbe47993 revset-children: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:47:24 -07:00
Pierre-Yves David
4186e2d344 revset-branch: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:47:00 -07:00
Pierre-Yves David
afe4b27987 revset-rangeset: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:45:53 -07:00
Pierre-Yves David
ca06344dab revset-only: remove usage of set()
All smartset classes have fast lookup, so this function will be removed soon.
2014-10-08 02:45:43 -07:00
Pierre-Yves David
4e9488a8f8 revset: cache most conditions used in filter
Except when stated otherwise, the condition used in `smartset.filter` will be
cached. A new argument has been introduced to disable that behavior. We use it
for filters created from `and` and `sub` operations.

This gives massive performance boosts for revsets with expensive conditions.

revset: branch(stable) or branch(default)
before) wall 4.329070 comb 4.320000 user 4.310000 sys 0.010000 (best of 3)
after)  wall 2.356451 comb 2.360000 user 2.330000 sys 0.030000 (best of 4)

revset: author(mpm) or author(lmoscovicz)
before) wall 4.434719 comb 4.440000 user 4.440000 sys 0.000000 (best of 3)
after)  wall 2.321720 comb 2.320000 user 2.320000 sys 0.000000 (best of 4)
2014-10-09 22:57:52 -07:00
Pierre-Yves David
372cc7c36d baseset: empty or one-element sets are ascending and descending
The empty set is full of interesting properties. In the ordering case, the one
element set is too.
2014-10-09 04:12:20 -07:00
Pierre-Yves David
090fe27a36 filteredset: drop explicit order management
Now that all low-level smartset classes have proper ordering and fast iteration
management, we can just rely on the subset in filteredset.
2014-10-07 01:33:05 -07:00