Brendan Cully
8a6eea2483
Add revlog.LookupError exception, and use it instead of RevlogError.
...
Remove repo.LookupError, which devolves to the revlog version.
2006-12-18 12:22:43 -08:00
Matt Mackall
296d6a7cb8
Simplify i18n imports
2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934
Replace demandload with new demandimport
2006-12-13 13:27:09 -06:00
Matt Mackall
6148417831
context: don't spuriously raise abort when a file goes missing.
2006-12-08 13:14:57 -06:00
Brendan Cully
261404dfe1
Make context __eq__ handle arbitrary RHS values
2006-11-27 15:27:09 -08:00
Benoit Boissinot
97597496aa
context: None is not a valid filenode (revert from ae31fe77b54b)
2006-11-27 20:55:50 +01:00
Thomas Arendsen Hein
411d64ce3e
white space and line break cleanups
2006-11-17 08:06:54 +01:00
Thomas Arendsen Hein
687e4a7111
Define and use nullrev (revision of nullid) instead of -1.
2006-10-29 10:53:51 +01:00
Matt Mackall
e8cb00b8c7
filecontext: report False for missing files
2006-10-18 14:06:48 -05:00
Matt Mackall
bd3a8da1a7
Merge with crew
2006-10-17 18:54:37 -05:00
Matt Mackall
506e5e54f6
Add branch method to contexts
2006-10-17 18:30:12 -05:00
Brendan Cully
7761a89cfe
Fix annotate where linkrev != rev without exporting linkrev
2006-10-15 18:43:46 -07:00
Brendan Cully
63d34eb36b
Back out da2c890e2644 and 278eadc04b61
2006-10-15 18:25:07 -07:00
Brendan Cully
bcf56af444
Add linkrev to filectx
2006-10-15 17:37:04 -07:00
Matt Mackall
e5ce68c388
Merge with crew
2006-10-11 17:37:48 -05:00
Brendan Cully
fb4e783895
changectx: search manifest delta for filenode
2006-10-11 13:56:35 -07:00
Brendan Cully
a3547ef308
context: check self.__dict__ instead of using hasattr
...
hasattr implicitly calls getattr, instantiating the field it is
checking for.
2006-10-11 13:34:12 -07:00
Giorgos Keramidas
b10311c5e9
Revert changeset d48690da3368.
...
It breaks 'hg merge && hg up -c REV' when files exist only in one of the
manifests, making hg throw a traceback like:
2006-10-10 21:03:24 +03:00
Matt Mackall
208002d0f3
context: change workingctx str() from . to <node>+
2006-10-10 02:11:59 -05:00
Matt Mackall
87112abb50
context: add cmp for filectxs
2006-10-10 01:13:03 -05:00
Matt Mackall
7ac4f59673
filectx: add size method
2006-10-09 23:20:48 -05:00
Matt Mackall
12c8fcfa84
fix workingfilectx parents and ancestor functions
2006-10-09 21:04:25 -05:00
Brendan Cully
a7aa2299e4
Make changectx.filenode raise repo.LookupError on failure
2006-10-03 12:28:27 -07:00
Brendan Cully
de0df5a89b
Merge with upstream
2006-10-03 12:14:33 -07:00
Matt Mackall
93a98b345e
merge: use new working context object in update
2006-10-03 01:21:46 -05:00
Matt Mackall
2f06faadef
contexts: add working dir and working file contexts
...
add workingctx
add workingfilectx
extend filectx.annotate for rev=None
extend filectx.ancestor
2006-10-02 22:03:14 -05:00
Brendan Cully
60d934ae0f
Use parentrevs shortcut in filectx.annotate
2006-10-02 17:59:39 -07:00
Matt Mackall
3b7d2a1d20
context: simplify repr methods
2006-10-02 15:28:44 -05:00
Matt Mackall
3ad8369e36
contexts: use __getattr__ rather than try/except in changectx
2006-10-02 15:17:59 -05:00
Matt Mackall
beacc65a8c
context: make filectx remember changectx in changectx.filectx
2006-10-02 15:02:28 -05:00
Matt Mackall
5a468e160f
Make filectx lazier
...
Lazy opening of filelog, lazy lookup of filenode and changeid
2006-10-02 14:23:38 -05:00
Brendan Cully
41ed405b40
Make filectx.__init__ use LookupError
2006-10-01 13:44:08 -07:00
Brendan Cully
238f3e6fdc
Raise LookupError in changectx.filectx if filenode can't be found
2006-10-01 12:42:50 -07:00
Thomas Arendsen Hein
0a7b982aa6
Whitespace/Tab cleanup
2006-10-01 19:26:33 +02:00
Thomas Arendsen Hein
a559deaa8e
merged brendan's hgweb cleanups
2006-09-30 12:34:31 +02:00
Thomas Arendsen Hein
5110ed5266
Merge with upstream
2006-09-30 09:46:03 +02:00
Brendan Cully
9c70192d20
Add lookup method to filectx
2006-09-29 16:26:09 -07:00
Matt Mackall
7af52acdea
context: add __nonzero__ methods
2006-09-29 17:47:51 -05:00
Matt Mackall
8f8ebdaa02
Add str methods to contexts
2006-09-29 16:29:44 -05:00
Matt Mackall
a664a3c8b3
Add equality operators to changectx and filectx
2006-09-29 16:01:46 -05:00
Brendan Cully
2946d7faed
Refactor annotate copy support.
2006-09-27 09:10:21 -07:00
Matt Mackall
05740b8ef1
context: change filectx repr to use @
...
Avoids confusion with rev:nodeid syntax used elsewhere
2006-09-25 16:43:21 -05:00
Matt Mackall
5fc766530e
context: add __repr__ methods
2006-09-22 16:12:39 -05:00
Matt Mackall
bcf2c903fb
filectx: lazy linkrev usage
2006-09-22 16:01:14 -05:00
Matt Mackall
5673fe334f
restore filectx.changectx() method
2006-09-22 15:34:02 -05:00
Brendan Cully
15222c4792
filectx.annotate: return filectx for each line instead of rev
2006-09-22 08:19:25 -07:00
Brendan Cully
5e02efd5d4
Make filectx lazier - some users never use filenode
2006-09-22 08:19:25 -07:00
Brendan Cully
684cd993b8
context: handle fileid or changeid == 0
2006-09-22 08:19:25 -07:00
Matt Mackall
79aed53c85
Abstract ancestor algorithm into generic function
...
Make depth calculation non-recursive
Add simple shortcut for linear ancestry
Convert context to use ancestor function
make memoized parents function
Convert revlog to use ancestor function
2006-09-20 16:50:50 -05:00
Matt Mackall
01ca9fd363
Merge with crew
2006-09-19 15:28:13 -05:00
Matt Mackall
0650997740
filectx: add rename-aware ancestor algorithm
...
This code works but may trigger recursion depth issues
2006-09-19 14:58:54 -05:00
Matt Mackall
19ce6dc65c
changectx: add ancestor function
2006-09-17 22:59:33 -05:00
Matt Mackall
ce81b072ef
filectx: allow passing filelog in init to avoid opening new filelogs
2006-09-17 22:58:11 -05:00
Matt Mackall
50e42b8388
filelog: make metadata method private
2006-09-17 22:38:06 -05:00
Matt Mackall
06695a7cb9
filectx: add rename traversal for parents()
2006-09-17 22:20:44 -05:00
Brendan Cully
8104550ace
Move defaultrev into changectx
...
This also causes tag on a repository with no working directory
to default to tip.
2006-09-15 15:23:52 -07:00
Vadim Gelfer
dc377b58c1
update copyrights.
2006-08-12 12:30:02 -07:00
Benoit Boissinot
bb31345eb8
fix filectxt to really work
...
- use a context instead of changelog.read
- changectx._id is not necessary
2006-07-17 01:59:06 +02:00
Benoit Boissinot
788bbdea72
context.py: various fixes
...
- use a normal changeset instead of a context
- define _filenode instead of _node to match the else clause
2006-07-16 16:40:24 +02:00
Benoit Boissinot
fe197b5f4f
context.py: filectxs was using a keyword arg, add it to filectx
2006-07-16 16:39:03 +02:00
Benoit Boissinot
d9acb13f0c
context.py: self.repo is not defined, change to self._repo
2006-07-16 16:39:02 +02:00
Matt Mackall
b2760f583c
Convert hg annotate to context api
2006-06-28 17:42:17 -05:00
Matt Mackall
092ee51a9a
Add context.py: changeset and file revision contexts
2006-06-28 17:07:46 -05:00