Commit Graph

39 Commits

Author SHA1 Message Date
Dan Villiom Podlaski Christiansen
cff327a7f7 copies: don't detect copies as "divergent renames"
(For the purposes of this patch copy is defined as a rename where the
source continues to exist.)
2010-10-10 09:48:37 -05:00
Henrik Stuart
0efc07dca7 copies: properly visit file context ancestors on working file contexts 2010-04-07 21:31:47 +02:00
Brodie Rao
892ba5a830 remove unused imports 2010-02-14 01:52:31 -05:00
Benoit Boissinot
2efacc29bb copies: check if revisions are related (bug found with pylint) 2010-02-02 09:05:20 +01:00
Matt Mackall
3c6c4749ee Merge with stable 2010-01-31 13:43:33 -06:00
Matt Mackall
06bae668d4 copies: revert 1f784cae6615
The behavior of rebase both before and after the fix was actually
incorrect, and this change regressed other parts of copy behavior.
2010-01-31 12:19:52 -06:00
Matt Mackall
1f628d9563 copies: fix issue1994
Unscramble divergence test
2010-01-28 22:45:46 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Matt Mackall
525da95fd6 copies: speed up copy detection
On some large repos, copy detection could spend > 10min using
fctx.ancestor() to determine if file revisions were actually related.
Because ancestor must traverse history to the root to determine the
GCA, it was doing a lot more work than necessary. With this
replacement, same status -r a:b takes ~3 seconds.
2010-01-19 22:20:05 -06:00
Patrick Mezard
62d346efa4 copies: don't report copies with unrelated branch 2010-01-01 13:58:30 +01:00
Matt Mackall
417080c789 Merge with stable 2010-01-28 23:13:10 -06:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Matt Mackall
eb6cba34d7 Merge with stable 2009-07-09 19:49:02 -05:00
Matt Mackall
e3dc8aa6db fix memory usage of revlog caches by limiting cache size [issue1639] 2009-07-09 17:10:07 -05:00
Alejandro Santos
b1c42d384b compat: can't compare two values of unequal datatypes 2009-07-05 11:01:01 +02:00
Martin Geisler
0a365d5ca2 use 'x is None' instead of 'x == None'
The built-in None object is a singleton and it is therefore safe to
compare memory addresses with is. It is also faster, how much depends
on the object being compared. For a simple type like str I get:

            | s = "foo" | s = None
  ----------+-----------+----------
  s == None | 0.25 usec | 0.21 usec
  s is None | 0.17 usec | 0.17 usec
2009-05-20 00:52:46 +02:00
Benoit Boissinot
b23ce9123e copies: use set instead of dict 2009-05-17 04:20:59 +02:00
Martin Geisler
110a176288 copies: don't translate untranslatable string 2009-05-09 14:56:06 +02:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Martin Geisler
e2222d3c43 replace set-like dictionaries with real sets
Many of the dictionaries created by dict.fromkeys were emulating sets.
These can now be replaced with real sets.
2009-04-22 00:57:28 +02:00
Peter Arrenbrecht
bc21361ed2 cleanup: drop unused imports 2009-03-23 13:12:07 +01:00
Dirkjan Ochtman
574603a8c0 use dict.iteritems() rather than dict.items()
This should be faster and more future-proof. Calls where the result is to be
sorted using util.sort() have been left unchanged. Calls to .items() on
configparser objects have been left as-is, too.
2009-01-12 09:16:03 +01:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
bc715be859 add __len__ and __iter__ methods to repo and revlog 2008-06-26 14:35:50 -05:00
Matt Mackall
ded6ff0bc4 copies: teach copies about dirstate.copies
When we're using copies() to find changes between the working directory and
its first parent for diff/status/etc., use dirstate.copies() directly.

This avoids doing a full statwalk for simple diffs (issue1090) and
removes a special case from the status command.
2008-06-03 15:41:09 -05:00
Matt Mackall
52b4d9ec25 copies: refactor symmetricdifference as _findlimit
We only need to track the lowest revision seen, which makes things simpler.
2008-03-29 12:39:47 -05:00
Matt Mackall
95434837e1 copies: teach symmetric difference about working revisions
- use changelog.count() as a pseudo revision number
- abort early in copies if revs are the same
- eliminate working dir hacks in copies
- yield results as they're found
2008-03-29 12:39:47 -05:00
Matt Mackall
56e621f7bc symmetricdifference: move back to copies
It's too tightly dependent on known revlog ordering to fit well in ancestors
2008-03-29 12:39:47 -05:00
Matt Mackall
ba8f438e7a copies: don't double-detect items in the directory copy check 2008-03-29 12:39:47 -05:00
Matt Mackall
c9895536f8 copies: skip directory rename checks when not merging
The directory rename checks are not meaningful unless we're moving or copying
files across a branch during a merge.
2008-03-29 12:39:47 -05:00
Matt Mackall
1b20d834b6 copies: sort old names by depth 2008-03-29 12:39:47 -05:00
Matt Mackall
fc40a37304 copies: fix silly precedence bug 2008-03-29 12:39:47 -05:00
Alexis S. L. Carvalho
03368f5190 Revert 854bf5451519, fixing the output of 2 tests 2008-03-15 22:03:18 -03:00
Matt Mackall
45a746ed3d copies: deal with symmetric difference for linear relationships
choose the minimum of symmetric difference and the two revs in question
2008-03-15 16:25:27 -05:00
Matt Mackall
5c5200eb63 diff: use copy smarts from copies.py 2008-03-15 10:02:31 -05:00
Matt Mackall
79c8f65d30 copies: move findcopies code to its own module
- pass in contexts
- fold symmetricdifference check into copies.copies
2008-03-15 10:02:31 -05:00