Commit Graph

18 Commits

Author SHA1 Message Date
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