Patrick Mezard
ba0d5cdad9
localrepo: fix status() typos from 854b907527e5a and 51f105e04825
2008-07-20 19:09:00 +02:00
Patrick Mezard
c2be161a5c
context: trigger missing username warning only when necessary
2008-07-20 19:09:00 +02:00
Christian Boos
3bad7927f6
localrepo: do not modify a dictionary being iterated in status()
2008-07-18 12:31:40 +02:00
Patrick Mezard
37536c33c2
dirstate: fix _droppath() typo from be348d0dd417
2008-07-20 19:08:59 +02:00
Matt Mackall
2ff2e83963
fix iso date help
2008-07-11 18:46:02 -05: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
75293bf8bd
status: various cleanups
...
- rename lookup to cmp for formatting reasons
- reduce nesting level of fixup code
- sort fixup results
- group comparison cases in a separate clause
- make list initialization simpler
- delay flag lookup for working directory
- sort removed list in comparison
- avoid sorting already sorted lists
2008-07-11 18:46:02 -05:00
Matt Mackall
7157575a82
status: use contexts
2008-07-11 18:46:02 -05:00
Matt Mackall
21163fdc2f
dirstate: simplify/optimize path checking
...
- add fast _finddirs function
- remove recursion from incpath/decpath
- split changepath into addpath/droppath
- change relax arg to check
- move incpathcheck logic into addpath
- move incpath into addpath
- move decpath into droppath
- inline code in self._dirs creation
2008-07-11 18:46:02 -05:00
Matt Mackall
d8df9690c0
manifest: make checkforbidden take a list
2008-06-27 19:27:00 -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
d22a1c9537
remove: work directly off status
...
This allows us to use a single directory walk and to trivially ignore
unknown files. The resulting code is also easier to follow.
2008-06-27 14:53:30 -05:00
Matt Mackall
d4ab55a92b
status: clean up all users for unknown files
2008-06-27 13:43:29 -05:00
Brendan Cully
f5b1d49e0d
Check that git patches only touch files under root
2008-06-25 14:13:20 -07:00
Matt Mackall
9ae3592d4e
dirstate: improve case-folding logic
...
- return normalized form in directory walk
- track normalized form in known
2008-06-26 15:55:23 -05:00
Matt Mackall
4382d6c797
dirstate: fold statwalk and walk
2008-06-26 14:35:50 -05:00
Matt Mackall
73c76dd164
repo.status: eliminate list_
2008-06-26 14:35:50 -05:00
Matt Mackall
26bd918734
verify: lots of refactoring
...
- simplify finding first bad rev
- no need to count changesets
- add exc function to simplify exception handling
- combine checksize and checkversion to checklog
- unify missing revlog detection in checklog
- add checkentry to consolidate
- linkrev lookup
- detailed check of linkrev
- detailed check of parents
- duplicate checking
- use checkentry for changelog, manifest, and files
- simplify havecl and havemf
- track all changesets refering to a manifest
- move unnamed file check somewhere more useful
- reorder crosschecks
- fix filenodes crosscheck and add exception handling
- check unpacked size field
2008-06-26 14:35:50 -05:00
Matt Mackall
07f882031a
verify: add some local variables
2008-06-26 14:35:50 -05:00
Matt Mackall
bc715be859
add __len__ and __iter__ methods to repo and revlog
2008-06-26 14:35:50 -05:00
Matt Mackall
dcacfb3161
manifest: remove execf/linkf methods
2008-06-26 14:35:50 -05:00
Matt Mackall
ab3d42631a
make debugrename work on p1, not tip
2008-06-26 14:35:50 -05:00
Matt Mackall
fbb5127472
use repo[changeid] to get a changectx
2008-06-26 14:35:46 -05:00
Matt Mackall
b2155285a8
rename checkfolding to checkcase
2008-06-26 13:58:24 -05:00
Matt Mackall
be55fba8f6
dirstate: remove unused folding function
2008-06-26 13:58:22 -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
5867ff1667
use repo.changectx(None) to get a workingctx
2008-06-26 13:46:29 -05:00
Matt Mackall
9d556277c8
context: avoid using None for working parent
2008-06-25 17:35:20 -05:00
Matt Mackall
5001543d15
use repo.changectx rather than context.changectx
2008-06-25 17:34:28 -05:00
Matt Mackall
0a211cf39a
context: consistently return p1 context for None
2008-06-25 17:33:51 -05:00
Matt Mackall
9ab99468a9
lookup: optimize '.'
...
Remove error messages as behavior is documented in hg help revs
2008-06-25 17:33:34 -05:00
Dirkjan Ochtman
8f93fcc6fc
fix default branchheads() argument (69dbb521053b was very broken)
2008-06-25 10:54:48 +02:00
Dirkjan Ochtman
3bd7f09e49
tighter default argument selection in localrepo.branchheads()
2008-06-24 09:36:24 +02:00
Dirkjan Ochtman
bf8b01e844
merge: only in-branch merges can be implicit
2008-06-23 15:02:52 +02:00
Dirkjan Ochtman
0a97daf0e7
get repo.branchheads() to use working directory's branch by default
2008-06-23 15:03:22 +02:00
Dirkjan Ochtman
b5da46f6f1
kill some trailing spaces
2008-06-23 13:12:32 +02:00
Dirkjan Ochtman
423e92c03a
graph: display branch name alongside tags
2008-06-23 12:54:27 +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
0f0fea02fd
localrepo: interpret ctx.filectx() exception as a missing file
2008-06-18 23:23:03 +02:00
Patrick Mezard
da1bc3ab9a
localrepo: do not expose workingctx options
...
These are implementation details and probably of no use to client code.
2008-06-18 23:00:20 +02:00
Patrick Mezard
1d2db00cd1
localrepo: extract _commitctx() from commit()
...
_commitctx() takes a single changectx like argument. It gives way to commits
from memory only.
2008-06-18 22:52:26 +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