Commit Graph

141 Commits

Author SHA1 Message Date
Peter Arrenbrecht
a2d3e23eef cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:

  _junk = foo()
  _junk = None

to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00
Matt Mackall
d15d559b7c errors: move revlog errors
- create error.py for exception classes to reduce demandloading
- move revlog exceptions to it
- change users to import error and drop revlog import if possible
2009-01-11 22:48:28 -06:00
Patrick Mezard
6f86a4092b context: enforce memctx.files() unicity
localrepo.commitctx() expects changed files lists to contain unique items and
does not sort itself. Passing duplicates makes them evaluated more than once
and changes the committed changelog id.
2008-12-14 17:35:19 +01:00
Dirkjan Ochtman
d5bf581a69 context: use descriptors to speed up lazy attributes 2008-11-14 12:44:26 +01:00
Dirkjan Ochtman
c8e4c03aa9 context: special-case changectx setup for integer changeid 2008-11-13 21:09:51 +01:00
Matt Mackall
b2807810c6 linkrev: take a revision number rather than a hash 2008-11-12 15:19:14 -06:00
Patrick Mezard
ad3b5c4ec9 context: improve memctx documentation 2008-10-11 13:07:29 +02:00
Peter Ruibal
30a2036f9e use Exception(args)-style raising consistently (py3k compatibility) 2008-09-08 13:07:00 +02:00
Matt Mackall
08b29d9875 Merge with stable
Simplify the copy search algorithm
2008-08-10 18:38:43 -05:00
Dirkjan Ochtman
26b9b92409 context: get rid of unused changectx.filectxs() method 2008-07-21 13:26:42 +02:00
Dirkjan Ochtman
6b15d82e07 context: fix workingctx's __contains__ method 2008-07-21 13:22:11 +02:00
Matt Mackall
e008b3db94 dirstate.walk: build a dict rather than yield
Since we're already building a seen dict, we might as well put our
results in it to go slightly faster.
2008-07-22 13:03:21 -05:00
Matt Mackall
8cb2b4a288 dirstate.walk: push sorting up 2008-07-22 13:03:19 -05:00
Matt Mackall
9d3da8e0ee dirstate.walk: eliminate src from yield
- restructure 'step two' to stat unseen files
- remove extra stat logic in status
- remove redundant src
2008-07-22 13:02:36 -05:00
Matt Mackall
b4ff221e3e minor status fixups 2008-07-22 13:00:22 -05:00
Patrick Mezard
c2be161a5c context: trigger missing username warning only when necessary 2008-07-20 19:09:00 +02:00
Matt Mackall
b161cadfc8 context: simplify parents code 2008-07-11 18:46:02 -05:00
Matt Mackall
644a7f906e workingctx: add __contains__ method 2008-07-11 18:46:02 -05:00
Matt Mackall
f1402a6652 context: add walk method 2008-06-27 19:25:48 -05:00
Matt Mackall
087987c8d8 context: add __int__ and hex methods 2008-06-27 18:44:43 -05:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
d4ab55a92b status: clean up all users for unknown files 2008-06-27 13:43:29 -05:00
Matt Mackall
fbb5127472 use repo[changeid] to get a changectx 2008-06-26 14:35:46 -05:00
Matt Mackall
25b1f97147 context: remove islink and isexec methods 2008-06-26 13:52:16 -05:00
Matt Mackall
d462e1fc26 simplify flag handling
add _checklink var to dirstate
introduce dirstate.flagfunc
switch users of util.execfunc/linkfunc to flagfunc
change manifestdict.set to take a flags string
change ctx.fileflags to ctx.flags
change gitmode func to a dict
remove util.execfunc/linkfunc
2008-06-26 13:46:34 -05:00
Matt Mackall
2bd0fe0371 context: clean up parents() 2008-06-26 13:46:33 -05:00
Matt Mackall
2d2ae68ba8 context: simplify changeid logic 2008-06-26 13:46:31 -05:00
Matt Mackall
0a211cf39a context: consistently return p1 context for None 2008-06-25 17:33:51 -05:00
Dirkjan Ochtman
b5da46f6f1 kill some trailing spaces 2008-06-23 13:12:32 +02:00
Christian Ebert
11232ed4ba Fix commit date (issue1193)
The None check in workingctx prevents calling util.makedate
when date is not explicitly given.
2008-06-21 15:27:51 +02:00
Patrick Mezard
1ae4077ddd context: add memctx for memory commits 2008-06-19 00:14:23 +02:00
Patrick Mezard
67c45a2700 context: let workingctx.date(), .user() and description() be overriden 2008-06-18 22:52:26 +02:00
Patrick Mezard
767445bf63 localrepo: let commit() get extra data from workingctx 2008-06-18 22:52:26 +02:00
Patrick Mezard
f2fb1d0609 localrepo: hide commit() file selection behind workingctx 2008-06-18 22:52:25 +02:00
Patrick Mezard
d184e29b1c context: let workingctx parents be overriden 2008-06-18 22:52:25 +02:00
Patrick Mezard
1fa87a95fd Merge with crew-stable 2008-06-15 13:05:39 +02:00
Patrick Mezard
af038bed31 context: fix workingctx.fileflags() execute bit 2008-06-15 13:01:01 +02:00
Patrick Mezard
91d2df2c77 Merge with crew-stable 2008-04-12 21:34:01 +02:00
Patrick Mezard
3409e6fdc3 context: handle untracked files in filectx.fileflags() 2008-04-12 21:08:03 +02:00
Paul Moore
0046a32c4b python 2.6 compatibility: add __hash__ to classes that have __eq__ 2008-04-04 22:41:17 +02:00
Alexis S. L. Carvalho
dd492604df filectx.ancestor: use fctx._repopath to cache filelogs (issue1035)
_repopath may be different from _path for workingfilectx when there
are renames involved.
2008-03-16 06:10:47 -03:00
Matt Mackall
865487e7f2 revlog: report node and file when lookup fails 2008-03-11 17:42:29 -05:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Thomas Arendsen Hein
deb94bc7fe Removed trailing spaces from everything except test output 2008-03-07 00:24:36 +01:00
Patrick Mezard
4b9a547de4 context: fix filectx.parents() bug introduced when editing 3fb82bcfc6e3 2008-01-06 15:40:32 +01:00
Maxim Dounin
4d9877b4eb Fix copies reporting in log and convert.
If copy logged in file revision, we report copy for changeset only
if file revisions linkrev points back to the changeset in question
or both changeset parents contain different file revisions.

This fixes extra copies reported when executable bit was changed for
previously copied file.
2007-12-29 17:11:48 +03:00
Maxim Dounin
940a0afd31 context: preserve changeset in filectx if we have one
If we know original changeset we are working with - try hard to
preserve it. Fallback to filelog.linkrev() only if we have no way
to get original changeset, since linkrev() may point to other
changeset.
2007-12-29 16:57:43 +03:00
Thomas Arendsen Hein
347da85c36 Removed tabs and trailing whitespace in python files 2007-12-29 19:49:48 +01:00
Bryan O'Sullivan
d32d6fb57f make LookupError more detailed 2007-11-28 08:36:55 -08:00