Alexis S. L. Carvalho
64a37442ed
dirstate.status: if a file is marked as copied, consider it modified
...
After a "hg copy --force --after somefile cleanfile", cleanfile
shouldn't be considered clean anymore.
2007-06-21 23:42:06 -03:00
Alexis S. L. Carvalho
d4cae7d8a5
dirstate.invalidate: clear dirty flag
2007-06-21 00:34:14 -03:00
Alexis S. L. Carvalho
3beeb3356f
dirstate: fix typo
2007-06-21 00:34:14 -03:00
Thomas Arendsen Hein
4d29c6dc8e
Updated copyright notices and add "and others" to "hg version"
2007-06-19 08:51:34 +02:00
Thomas Arendsen Hein
483231d996
Cleanup of whitespace, indentation and line continuation.
2007-06-19 08:06:37 +02:00
Matt Mackall
b99ae11550
dirstate: pull ignore smarts out of ui
2007-06-18 13:24:34 -05:00
Matt Mackall
2033c5f43d
dirstate: refactor checkinterfering
2007-06-18 13:24:34 -05:00
Matt Mackall
be01255569
dirstate: hide some more internals
2007-06-18 13:24:34 -05:00
Matt Mackall
c71a2b10a7
dirstate: hide internal vars
...
Add an __iter__ method so commands don't need to poke at _map.
2007-06-18 13:24:34 -05:00
Matt Mackall
e957b05434
localrepo and dirstate: rename reload to invalidate
...
We want to avoid actually reloading if possible.
2007-06-18 13:24:34 -05:00
Matt Mackall
5b067f098a
dirstate: simplify dirty handling
2007-06-18 13:24:34 -05:00
Matt Mackall
dd962fae26
dirstate: lazify and lambdafy _slash
2007-06-18 13:24:34 -05:00
Matt Mackall
12c1ce4938
dirstate: simplify state()
2007-06-18 13:24:34 -05:00
Matt Mackall
38474db3cb
dirstate: move ignore to its own file
2007-06-18 13:24:34 -05:00
Matt Mackall
c0a4aebd3c
dirstate: replace clear()
2007-06-18 13:24:34 -05:00
Matt Mackall
90c0194d9b
dirstate: fold parse into read
2007-06-18 13:24:33 -05:00
Matt Mackall
dd38b9f308
dirstate: make reload lazy
2007-06-18 13:24:33 -05:00
Matt Mackall
6a2d255741
dirstate: lazify initdirs
2007-06-18 13:24:33 -05:00
Matt Mackall
bb39ad22fb
dirstate: lazify copymap, _branch, and _pl
2007-06-18 13:24:33 -05:00
Matt Mackall
3da450bd87
dirstate: use getattr rather than lazyread
2007-06-18 13:24:33 -05:00
Alexis S. L. Carvalho
af3964b248
Add ui.slash hgrc setting
...
This will make most commands print paths using "/", regardless of
the value of os.sep.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
e1bf8e80c5
Add dirstate.pathto and localrepo.pathto.
...
Every time util.pathto is called, we have to pass the repo root and the
repo cwd.
dirstate.pathto is a simple convenience function that knows about the
root and the cwd arguments. It's still possible to pass the cwd as an
optimization.
localrepo.pathto is a convenience function that just calls
dirstate.pathto, just like localrepo.getcwd.
dirstate.pathto becomes a single point that converts most (all?) paths
from the internal representation to some OS-specific relative path for
display purposes.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
b53e571f31
Use atomictemp files to write the dirstate.
...
atomic files are not safe in all cases.
2007-06-05 19:55:27 -03:00
Patrick Mezard
0bf2bda86a
Merge with crew-stable.
2007-05-19 22:51:43 +02:00
Patrick Mezard
6db235d2bb
Fix issue 562: .hgignore requires newline at end.
...
End-of-lines characters where discarded without any check for existence.
2007-05-19 22:47:01 +02:00
Bryan O'Sullivan
06ea864877
When reloading the dirstate, recompute ignore information if needed.
2007-04-24 12:02:51 -07:00
Bryan O'Sullivan
3b15a417aa
dirstate: speed up write by 50%.
2007-04-24 12:02:42 -07:00
Bryan O'Sullivan
6518558080
dirstate: make parents() faster.
...
This allows localrepository.status() to avoid reading all but the
first 40 bytes of the dirstate in the common case of running "hg
status".
2007-04-24 11:46:15 -07:00
Matt Mackall
e293a4cd6d
Merge with stable
2007-04-10 14:05:15 -05:00
Alexis S. L. Carvalho
9497591b05
use atomictemp files to write the dirstate
2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
ec44599dd1
Merge additional fixes for my matcher changes
2007-03-20 22:21:05 -03:00
Alexis S. L. Carvalho
6f408bf4cd
Pass normalized directory names to the ignore function
...
This fixes a bad performance regression caused by b959487f328c.
2007-03-20 22:09:53 -03:00
Alexis S. L. Carvalho
47cb22b5a2
Merge with crew-stable
2007-03-16 00:45:18 -03:00
Alexis S. L. Carvalho
e488c0e84f
Fix handling of paths when run outside the repo.
...
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root". It now returns
an absolute path.
The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
Alexis S. L. Carvalho
fcb39243b1
pass repo.root to util.pathto() in preparation for the next patch
2007-03-16 00:22:57 -03:00
Matt Mackall
e896adead6
Merge with -stable, fix small test failure
2007-03-14 01:26:09 -05:00
Matt Mackall
c2bb73121f
Move branch read/write to dirstate where it belongs
2007-03-13 18:50:02 -05:00
Alexis S. L. Carvalho
641d95a966
Merge a bunch of matcher and locate fixes.
2007-03-10 23:21:33 -03:00
Alexis S. L. Carvalho
393022dbbb
dirstate.statwalk: explicitly test for ignored directories
...
This removes a hack where we appended '/' to a dirname so that:
- it would not appear on the "dc" dict
- it would always be matched by the match function
This was a contorted way of checking if the directory was matched by
some hgignore pattern, and it would still fail with some uses of
--include/--exclude patterns.
Things would still work fine if we removed the check altogether and
just appended things to "work" directly, but then we would end up
walking ignored directories too, which could be quite a bit of work.
This allows further simplification of the match function returned by
util._matcher, and fixes walking the working directory with a
--include pattern that matches only the end of a name.
2007-03-10 23:00:54 -03:00
Brendan Cully
5641becd5a
Merge with crew-stable
2007-03-10 17:45:32 -08:00
Alexis S. L. Carvalho
0458b30ebf
statwalk: don't put self.root in the files list
...
That list is supposed to contain internal, normalized names ("/"-separated,
relative to the repo root), not OS-native paths.
2007-03-10 22:03:22 -03:00
Emanuele Aina
de446cd10b
Yield directories in dirstate.statwalk()
2007-03-06 17:45:39 -03:00
Andrei Vermel
d789a5b4fc
Fix dirstate fail at drive root on Windows
2007-02-09 20:50:41 +03:00
Alexis S. L. Carvalho
744364abd4
merge with crew-stable
2007-02-13 10:25:45 -02:00
Matt Mackall
770d679638
symlinks: don't complain about symlinks
2006-12-29 20:04:31 -06: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
Benoit Boissinot
89233a98c7
remove unnecessary call to umask
2006-12-09 18:49:24 +01:00
Thomas Arendsen Hein
3982b314a6
issue228: Fix repositories at the filesystem root (/ or C:\)
...
Thanks to Robert Shaw and other people on the list for the suggestions.
2006-11-09 21:53:45 +01:00
Benoit Boissinot
7d00e37112
issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
2006-11-01 17:56:55 +01:00