Matt Mackall
f84252f879
simplify dirstate walking
...
- kill walkhelper
- stop passing dc around
- remove unused stat arg from statmatch (renamed imatch)
2006-10-26 23:54:24 -05:00
Thomas Arendsen Hein
0a7b982aa6
Whitespace/Tab cleanup
2006-10-01 19:26:33 +02:00
Matt Mackall
cf29118af5
dirstate: add copies function
...
rename copies to copymap
2006-09-25 17:53:17 -05:00
Alexis S. L. Carvalho
d7eab34ed8
dirstate.py: when comparing mtimes, use only the integer part.
...
Python 2.5 can return timestamps with subsecond resolution.
2006-08-20 01:13:11 -03:00
Vadim Gelfer
853998bf60
fix issue 322.
...
do not allow to add files that shadow files or directories already in dirstate.
2006-08-18 21:03:29 -07:00
Vadim Gelfer
dc377b58c1
update copyrights.
2006-08-12 12:30:02 -07:00
Matt Mackall
7c0506a4f5
Merge manifest refactor work
2006-08-09 15:03:46 -05:00
Benoit Boissinot
e8d38e08fe
self.root == '/': prefix length computation out of the loop
...
- put the computation out of the loop
- change the variable to a more meaningful name
2006-07-25 21:22:56 +02:00
Gil
82203eb025
Fix dirstate.walkhelper removing first char of nd when self.root == '/'.
2006-07-25 11:09:17 -07:00
Vadim Gelfer
9738466350
status: add -c (clean) and -A (all files) options
...
also add new localrepo.status what is more uniform than localrepo.changes.
localrepo.changes is deprecated and will go away soon.
2006-07-20 16:21:07 -07:00
Matt Mackall
4e6cb39019
Start using manifestflags methods
2006-07-16 03:14:17 -05:00
Benoit Boissinot
231afefcb6
simplify filterfiles when filtering based on a directory
...
since an unkown files cannot be an exact match, we bisect
for a <path>/ instead of <path> and we get only the files
below the directory.
2006-06-23 08:09:48 +02:00
Brendan Cully
4c25b98467
filterfiles: Search as long as the target is a prefix of current.
...
filterfiles was failing to find files for directory arguments if
another file existed that started with the directory name and
sorted earlier. For example, a manifest of ('foo.h', 'foo/foo')
would cause filterfiles('foo') to return nothing. This resolves
issue #294 .
2006-06-23 00:11:53 +02:00
Vadim Gelfer
9a0c813fdc
use demandload more.
2006-06-20 23:58:21 -07:00
Vadim Gelfer
6144b74dd7
replace os.stat with os.lstat in some where.
2006-06-16 12:58:24 -07:00
Vadim Gelfer
ae14071210
dirstate: fix call to os.lstat when st is None
2006-06-13 14:56:01 -07:00
Vadim Gelfer
a7a6090062
dirstate.read: make 15% faster.
...
time to read dirstate for my kernel repo goes from 0.22s to 0.18s.
2006-06-12 22:09:50 -07:00
Vadim Gelfer
6ee0c5dc9f
dirstate: speed up inner loop of read.
2006-06-12 09:36:23 -07:00
Benoit Boissinot
72acadbf1d
dirstate: refactor the dirstate binary format, remove magic numbers
2006-06-04 02:25:27 +02:00
Vadim Gelfer
9dc134b879
benoit asked for comment to make avoid of recursive repo clearer.
2006-04-13 13:46:05 -07:00
Vadim Gelfer
384a97c85e
merge with crew.
2006-04-13 12:44:40 -07:00
Vadim Gelfer
0279e68d84
small changes to revert command.
...
fix bug 93: work with files that are in target manifest but not
dirstate.
2006-04-03 10:02:09 -07:00
Vadim Gelfer
16c52d7c61
support nested repositories.
...
mercurial will not recurse into a subdirectory that contains a .hg
directory. it is treated as a separate repository.
2006-03-31 17:00:09 -08:00
Thomas Arendsen Hein
f0fd01b209
New option -i/--ignored for 'hg status' to show ignored files.
...
localrepo.changes() now returns an additional list of ignored files if
it is called with show_ignored=True.
2006-03-29 22:58:34 +02:00
Thomas Arendsen Hein
2aaeef325d
Don't ignore everything if all hgignore files are empty.
2006-03-26 22:32:44 +02:00
Thomas Arendsen Hein
694e91d66d
Show reason why an ignore file can't be read and state that it is skipped.
2006-03-25 10:31:06 +01:00
mcmillen@cs.cmu.edu
eb8285512e
On error parsing hgignore file, print the correct filename.
2006-03-25 10:12:23 +01:00
mcmillen@cs.cmu.edu
33e91a5d4e
Add warning if user-configured hgignore file isn't found
2006-03-25 10:02:39 +01:00
mcmillen@cs.cmu.edu
dc6517d798
Implementation of per-user .hgignore.
...
Reference: http://www.selenic.com/mercurial/bts/issue166
If the [ui] section of .hgrc contains keys like "ignore" or
"ignore.something", the values corresponding to these keys are
treated as per-user hgignore files. These hgignore files apply to all
repositories used by that user.
2006-03-24 20:18:02 +01:00
Benoit Boissinot
b04984b4a2
only write the dirstate when something changed
2006-02-23 02:17:08 +01:00
Benoit Boissinot
aa994e6598
add 'debugrebuildstate' to rebuild the dirstate from a given revision
...
- added and removed files will be lost while recreating the dirstate
- modifications are not lost
2006-02-20 19:04:56 +01:00
Benoit Boissinot
9ea87984bc
fix warnings from pychecker (unused variables and shadowing)
2006-02-19 19:43:03 +01:00
Thomas Arendsen Hein
ac4248da86
Make localrepo.changes() internally distinguish between removed and deleted.
2006-01-12 12:22:28 +01:00
Vadim Gelfer
859b47ca42
if hgignore contains errors, print message that is not confusing.
2006-01-02 15:48:16 -08:00
Benoit Boissinot
c6b2943998
Re: [PATCH 2 of 3] remove walk warning about nonexistent files
...
On 11/15/05, Robin Farine <robin.farine@terminus.org> wrote:
> # HG changeset patch
> # User Robin Farine <robin.farine@terminus.org>
> # Node ID ce0a3cc309a8d1e81278ec01a3c61fbb99c691f4
> # Parent feb77e0951e74d75c213e8471f107fdcc124c876
> remove walk warning about nonexistent files
>
> diff -r feb77e0951e7 -r ce0a3cc309a8 mercurial/dirstate.py
> --- a/mercurial/dirstate.py Tue Nov 15 08:42:45 2005 +0100
> +++ b/mercurial/dirstate.py Tue Nov 15 08:59:50 2005 +0100
> @@ -336,9 +336,6 @@
> try:
> st = os.lstat(f)
> except OSError, inst:
> - if ff not in dc: self.ui.warn('%s: %s\n' % (
> - util.pathto(self.getcwd(), ff),
> - inst.strerror))
> continue
> if stat.S_ISDIR(st.st_mode):
> cmp1 = (lambda x, y: cmp(x[1], y[1]))
this break some tests,
a better fix would be to check if ff can be a directory prefix from files in dc
you can try the attached patch.
Benoit
2005-12-01 10:48:29 -06:00
Christian Boos
b837e9f668
Fix walkhelper on windows.
...
The ''seen'' dictionary stores paths in canonical form,
so the walkhelp must also provide paths in that form,
otherwise the changed files are listed twice.
2005-12-01 10:48:18 -06:00
Eric Hopper
dd6718fc31
Convert all classes to new-style classes by deriving them from object.
2005-11-18 22:48:47 -08:00
twaldmann@thinkmo.de
55d74a6b77
fixed some stuff pychecker shows, marked unclear/wrong stuff with XXX
2005-11-14 03:59:35 +02:00
Benoit Boissinot
0406904c8d
add dirstate.lazyread, write atomically the dirstate
...
- add a dirstate.lazyread function that read only if it wasn't read before and
update all callers
- use the atomic keyword from util.opener to atomically write the dirstate
mercurial/dirstate.py
2005-11-11 15:34:06 -08:00
Benoit Boissinot
0bb141c937
don't print anything about file of unsupported type unless
...
the file was specified on the command line
2005-11-11 15:33:08 -08:00
Benoit Boissinot
b39fbd5ced
use self.{w,}join when possible
2005-11-08 10:34:50 -08:00
Benoit Boissinot
9db56d4cdb
fix a bug in dirstate.changes when cwd != repo.root
...
- use lstat instead of stat
- add a testcase (thanks to Johannes Hofmann)
2005-11-02 16:13:41 -08:00
Benoit Boissinot
02edb6c65e
only files in normal state should be marked as deleted
...
fix a traceback when you removed an added file
2005-11-02 16:08:48 -08:00
Benoit Boissinot
0bbf5d2b87
fix handling of files of unsupported type in the walk code
...
if a file was of unsupported type, it was considered as 'seen' while
walking. this way it was possible to have file in the dirstate not
yielded by the walk function.
2005-11-02 15:46:31 -08:00
Benoit Boissinot
64b4619845
fix dirstate.change: it should walk ignored files
2005-10-28 10:57:40 -07:00
Benoit Boissinot
1a6aabcbb0
rewrote changes function in dirstate to use generic walk code
...
now, file with unsupported type will not show up in status anymore
2005-10-27 13:29:35 -07:00
Benoit Boissinot
06e39e559b
i18n part2: use '_' for all strings who are part of the user interface
2005-10-18 18:38:39 -07:00
Benoit Boissinot
e38e94088a
i18n first part: make '_' available for files who need it
2005-10-18 18:37:48 -07:00
Benoit Boissinot
809d7cd761
check if a file is ignored before complaining if it is an unsupported type
2005-10-18 00:45:27 -07:00
Matt Mackall
3806a62caf
dirstate: make sure we read the dirstate before setting parents
2005-10-18 00:43:19 -07:00