Commit Graph

342 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
e021806e69 change relglob: patterns to be consistent with glob: patterns
With this change, you have to use "hg locate 'hgweb/**'" to locate
all the files in directories named hgweb.  OTOH, "hg locate '*l'"
will locate only files that end with "l" - e.g. a file called "hg.py"
will not be matched just because it's in a directory whose name ends
with "l" (e.g. "mercurial").
2007-04-04 04:22:06 -03:00
Alexis S. L. Carvalho
8d4f62f9f3 Revert changeset 8e97d9d074da; add another test for glob: patterns
With that changeset, it's impossible to use a glob: pattern to match
e.g. all files ending in .py - glob:**.py would also match all files
in a directory called dir.py.
2007-04-04 04:22:05 -03:00
Alexis S. L. Carvalho
db8accc4c6 glob:<directory> patterns match the files in that directory.
This makes the behaviour of glob: patterns more consistent:
hg status glob:dir  and   hg status -I glob:dir  will match
the same files.

It's also consistent with the fact that {rel,}path patterns
recursively match the contents of a directory.
2007-03-20 22:09:55 -03:00
Alexis S. L. Carvalho
2ed671d3fa util._matcher: remove superfluous variable 2007-03-16 22:48:23 -03:00
Alexis S. L. Carvalho
a782e3309d util._matcher: use "." as the root of empty {rel,}path patterns
Should fix issue332. Really.
2007-03-16 22:48:20 -03:00
Alexis S. L. Carvalho
ec56d01ca6 Optimize return value of util._matcher for hgignore case 2007-03-10 23:01:02 -03:00
Alexis S. L. Carvalho
05eea28e33 Optimize return value of util._matcher for common command line case
This will trigger every time somebody runs something like "hg diff"
or "hg status" without any arguments.

The important part here is returning util.always as the match function,
which is a much simpler (and faster) function than the usual return
value, and allows other code to just skip the filtering if it knows
all files will match.
2007-03-10 23:01:00 -03:00
Alexis S. L. Carvalho
c3d6308137 remove unused "head" hack from util._matcher 2007-03-10 23:00:59 -03:00
Alexis S. L. Carvalho
b53e6f3897 change locate to use relglobs by default
This makes its default behaviour useful again (issue108), and
changes it search the entire repository by default (instead
of just the cwd), just like all other commands.

It also hides issue204 by default, but you'll still see the
same behaviour if you give it a relpath: pattern.
2007-03-10 23:00:57 -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
Alexis S. L. Carvalho
6ccee3793b util._matcher: unify pattern normalization
This should fix issue347.

It also highlights one issue with the directory walking code when
you have an --include pattern that matches the end of a filename.
This is fixed by the next patch.
2007-03-10 23:00:53 -03:00
Alexis S. L. Carvalho
cc4356d95d util.*matcher: change default "names" argument
names=['.'] means "include (recursively) only files from the current subdir";
the function then did a hack to walk the whole tree.  Clean that up.

This also fixes a problem where "--include ." works in a subdir, but not
on the tree root.
2007-03-10 23:00:51 -03:00
Alexis S. L. Carvalho
7a7a8339ec util._matcher: fix handling of path: patterns 2007-03-10 23:00:49 -03:00
Alexis S. L. Carvalho
a2bea59405 util._matcher: fix handling of relglob: patterns 2007-03-10 23:00:48 -03:00
Alexis S. L. Carvalho
c83e2fe93d A 'glob:foo?bar' pattern determines a root - the tree root 2007-03-10 23:00:47 -03:00
Alexis S. L. Carvalho
2f70c57d86 util._matcher: update comments
This should match the code better.  Except for bugs...
2007-03-10 23:00:45 -03:00
Alexis S. L. Carvalho
2593ea959d small globprefix fix 2007-03-10 23:00:42 -03:00
Patrick Mezard
5a74c065fc stdout raises EINVAL when flush() is called on a closed pipe under win32.
Maybe the exception should be caught and translated at raise location instead (sshserver.py).
2007-02-19 10:32:46 +01:00
Alexis S. L. Carvalho
62a7370570 Fix util.shellquote on windows. 2007-02-15 05:38:00 -02:00
Jun Inoue
db15047102 Fix accessing the repo through a symlink. 2007-02-15 05:18:23 -02:00
Andrei Vermel
0483a4d2c4 Fix wrong module reference in copyfile exception 2007-02-06 00:09:36 +03:00
Alexis S. L. Carvalho
93c60f1213 Fallback to ascii if getpreferredencoding raises an exception
Fixes issue478.
2007-01-30 18:32:23 -02:00
Alexis S. L. Carvalho
5b836109d8 docopy: deal with globs on windows in a better way 2007-01-30 18:32:20 -02:00
Alexis S. L. Carvalho
29a5332aa9 Explicitly expand globs on Windows 2007-01-30 18:32:18 -02:00
Alexis S. L. Carvalho
fa687a48e6 add util.lexists 2007-03-26 21:36:26 -03:00
Alexis S. L. Carvalho
6cbf527646 use os.path.islink instead of util.is_link; remove util.is_link 2007-03-23 23:40:25 -03:00
Eric St-Jean
18a4192512 fix util.copyfile to deal with symlinks 2007-03-21 23:20:56 -04: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
dd2869375e Merge some matcher fixes/cleanups and add some more hg locate tests 2007-03-16 22:58:49 -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
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
93eb041452 Merge with crew-stable 2007-03-04 09:03:21 -03:00
Alexis S. L. Carvalho
c235d44d85 util_win32.py: fix user_rcpath
Fixes issue504.
2007-02-16 05:53:03 -02:00
Shane Holloway
79d891fab8 Combined the two os_rcpath methods into a single one near rcpath in mercurial/util.py
The os_rcpath method delegates to system_rcpath and user_rcpath from the
different platform implementations.
2007-02-15 09:51:57 -07:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Shane Holloway
02d303cdfe Unified *_rcpath so the interface is similar across operating systems
Changed os_rcpath to combine system_rcpath and user_rcpath.  Changed
system_rcpath and user_rcpath to both return a list of paths to add to the
combined rcpath for both Windows NT and other platforms.
2007-02-14 15:20:06 -07:00
Alexis S. L. Carvalho
e9dc052e2a allow values that aren't strings in util.configparser 2007-02-09 03:48:26 -02:00
Matt Mackall
28f682beac Merge with stable 2007-02-06 16:12:22 -06:00
Alexis S. L. Carvalho
fff454d591 Merge with crew-stable 2007-01-30 19:36:56 -02:00
Alexis S. L. Carvalho
4f27c0fe1c catch AttributeError in util.checklink
There's no symlink function in the os module on windows.

Fixes issue468
2007-01-05 00:01:51 -02:00
Matt Mackall
2e27ddd82b symlinks: use is_link wherever is_exec is used 2006-12-29 20:04:31 -06:00
Matt Mackall
1dc3ac012f symlinks: add a linkfunc 2006-12-29 20:04:31 -06:00
Matt Mackall
5a767e44a9 symlinks: add basic symlink functions to util.py 2006-12-29 20:04:31 -06:00
Matt Mackall
4b1ae5ef0a symlinks: check whether a filesystem supports symlinks 2006-12-29 20:04:31 -06:00
Matt Mackall
30b8c51a84 exec: remove last flag from is_exec 2006-12-29 20:04:31 -06:00
Matt Mackall
9d8e9305e4 pull umask-checking up 2006-12-29 20:04:30 -06:00
Matt Mackall
b875ad6c04 exec: add execfunc to simplify exec flag support on non-exec filesystems 2006-12-29 20:04:30 -06:00
Matt Mackall
1ee7fd016e pull umask-checking up 2006-12-29 20:04:30 -06:00
Matt Mackall
a76da2edbe exec: checkexec checks whether filesystem supports exec flags 2006-12-29 20:04:30 -06:00
Alexis S. L. Carvalho
d725a42fd8 merge with crew-stable 2006-12-16 02:51:16 -02:00
Alexis S. L. Carvalho
88251bd81b util.system: fix quoting on windows 2006-12-16 02:38:18 -02: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
def42107f3 fix reserved char on windows, '[]+' are allowed 2006-12-10 21:53:01 +01:00
Benoit Boissinot
e5024feef0 fix errors spotted by pychecker 2006-12-10 19:41:57 +01:00
Matt Mackall
6d9bbc8702 Merge Benoit's .hg/store support 2006-12-10 02:11:02 -06:00
Matt Mackall
03f3b2efc4 make transcoding more robust
default to ASCII
abort if unknown encoding
wrap abort strings with _
add test
2006-12-09 12:46:01 -06:00
Alexis S. L. Carvalho
edf9fef62b Allow the user to specify the fallback encoding for the changelog
Example: use EUC-JP instead of ISO-8859-1:

[ui]
fallbackencoding = EUC-JP
2006-12-08 22:01:05 -02:00
Matt Mackall
d589171997 Add --date support to log
Add --date opt
Filter log with matchdate
Fix "-{days}" match format
2006-12-06 15:29:17 -06:00
Matt Mackall
d7141083eb Add date matching support
Add extended date formats (eg "Dec", "2006")
Add a couple missing basic date formats
Improve default date element scheme to parsedate
Add matchdate function to match a date spec
Add -e switch and range matching to debugdate
2006-12-06 15:11:44 -06:00
Matt Mackall
dcf070dde9 parsedate: add UTC and GMT timezones 2006-12-06 13:13:42 -06:00
Matt Mackall
63c91a1801 improve date parsing for numerous new date formats
Add lots of new date formats
Formats without year, month, or day default to current
Strip leading and trailing whitespace
2006-12-06 13:13:31 -06:00
Matt Mackall
fb391fcb13 parsedate: allow '' for epoch 2006-12-06 13:13:27 -06:00
Matt Mackall
9630fc215f parsedate: use Abort rather than ValueError 2006-12-06 13:13:26 -06:00
Benoit Boissinot
e005ffc8c4 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
Benoit Boissinot
31a06c4e2b create the encode and decode functions for the store 2006-12-10 00:07:02 +01:00
Matt Mackall
2356030286 imported patch folding 2006-12-04 17:10:29 -06:00
Matt Mackall
3982f645e8 Add functions for transcoding and manipulating multibyte strings 2006-12-03 16:16:33 -06:00
Matt Mackall
8b091a9c1d Add encoding detection 2006-12-03 16:16:33 -06:00
Thomas Arendsen Hein
9b62ceebc7 Move ellipsis code to util.ellipsis() and improve maxlength handling. 2006-12-02 22:35:17 +01:00
Benoit Boissinot
3bad25e752 only print a warning when no username is specified
- revert most of 8b55c0ba
- display the username during interactive commit
2006-11-28 21:16:05 +01:00
Alexis S. L. Carvalho
6e218edeb5 Avoid looking up usernames if the current user owns the .hgrc file
Converting uids into usernames may be somewhat expensive when NIS
or LDAP is involved.
2006-11-18 23:51:14 -02:00
Thomas Arendsen Hein
411d64ce3e white space and line break cleanups 2006-11-17 08:06:54 +01:00
Alexis S. L. Carvalho
2a74758338 fix util.pathto
All users of this function pass a local path (which uses os.sep) as the
first argument and a "/"-separated path as the second argument.
2006-11-15 18:56:47 -02:00
Matt Mackall
0cc86247a3 util: add copyfile function 2006-11-13 13:26:57 -06:00
Thomas Arendsen Hein
11cdc6b21b Merge with upstream 2006-10-27 23:09:46 +02:00
Matt Mackall
e803b50ef2 Make util.unique return a list 2006-10-27 14:06:32 -05:00
Matt Mackall
24c7fbb0f1 shortname: truncate at '.' too 2006-10-27 11:30:20 -05:00
Thomas Arendsen Hein
a0477d89a5 New UnexpectedOutput exception to catch server errors in localrepo.stream_in
If the unexpected is a string, the empty string will be mentioned, and long
strings are cut to at most 400 chars.
2006-10-27 18:17:12 +02:00
Alexis S. L. Carvalho
c44cea1532 Only read .hg/hgrc files from trusted users/groups
The list of trusted users and groups is specified in the [trusted]
section of a hgrc; the current user is always trusted; "*" can be
used to trust all users/groups.

Global hgrc files are always read.

On Windows (and other systems that don't have the pwd and grp modules),
all .hg/hgrc files are read.

This is essentially the same patch that was previously applied as
revision f077d29b114d.
2006-10-26 19:25:44 +02:00
Benoit Boissinot
dc9483558a makes username mandatory 2006-10-18 22:24:03 +02:00
Alexis S. L. Carvalho
a85d162373 Use a case-sensitive version of SafeConfigParser everywhere
This change has the potential to break existing setups, but the current
behaviour (the keys in configuration files are always lower-cased) can
bite us in a few places:

- no way to use a Command in [defaults]
- hgext.Extension doesn't work in [extensions]
- you can't use an Upper/case/PATH in the [paths] section of hgweb.config
- you can't (easily) protect paths with upper-case letters with the
  acl extension
- you can't specify a /Path/TO/a/rEPO in the [reposubs] section for
  the notify extension
2006-10-16 15:38:53 -03:00
Jose M. Prieto
7670d11c8a Add documentation about the date formats allowed in the command line 2006-10-03 12:33:22 +02:00
Jose M. Prieto
a76c2de547 util.strdate: assume local time when no timezone specified 2006-10-03 12:33:18 +02:00
Jose M. Prieto
06cffb7de4 util.strdate: compute timestamp using UTC, not local timezone 2006-10-03 12:33:14 +02:00
Thomas Arendsen Hein
9b9bf4b064 shortuser should stop before the first space character.
Examples:
"Foo Bar <foo.bar AT example DOT com>" -> "foo.bar"
(instead of "foo.bar AT example DOT com>" as it was before.)
"Foo Bar" -> "Foo"
2006-09-27 20:34:52 +02:00
Benoit Boissinot
38d7621ab8 add comments in cachefunc 2006-09-22 17:58:22 +02:00
Brendan Cully
d30b83d2de Add cachefunc to abstract function call cache 2006-09-22 08:19:25 -07:00
Benoit Boissinot
2caa3e642d fix warnings spotted by pychecker 2006-09-18 17:43:31 +02: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
92dd5b8dc0 move commands.addremove_lock to cmdutil.addremove 2006-08-13 16:57:45 -07:00
Vadim Gelfer
2eab8e108e merge git patch code. 2006-08-12 12:47:18 -07:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Brendan Cully
4f1b3a83bb Move patch-related code into its own module. 2006-08-11 15:50:16 -07:00
Brendan Cully
7601c19932 Teach import to understand git diff extensions.
Vanilla patch chokes on git patches that include files that are copied
or renamed, then modified. So this code detects that case and rewrites
the patch if necessary.
2006-08-11 15:50:07 -07:00
Benoit Boissinot
dc4c4a5959 util.patch: use shellquote 2006-08-06 16:42:36 +02:00
Brendan Cully
5d7f00c97d Add portable shell-quoting function; teach mq to use it. 2006-08-05 15:23:26 -07:00
Vadim Gelfer
74f5dcdc3d import: make patch apply if run in subdir
fix is same as for mq patch. patch apply code should be merged.
2006-08-01 15:51:13 -07:00
Vadim Gelfer
b7a96d1742 clean up hg.py: move repo constructor code into each repo module 2006-07-31 07:11:12 -07:00
Vadim Gelfer
4f0a39d96b util.getuser: better comments 2006-07-24 09:22:47 -07:00
Vadim Gelfer
b5dfaa64f0 util.getuser: raise exception if win32api not available. 2006-07-24 09:19:25 -07:00
Vadim Gelfer
07de9b45fd fix windows username problem. 2006-07-24 09:11:26 -07:00
Vadim Gelfer
9ea4436262 add support for streaming clone.
existing clone code uses pull to get changes from remote repo.  is very
slow, uses lots of memory and cpu.

new clone code has server write file data straight to client, client
writes file data straight to disk.  memory and cpu used are very low,
clone is much faster over lan.

new client can still clone with pull, can still clone from older servers.
new server can still serve older clients.
2006-07-14 11:17:22 -07:00
Chris Mason
e09c656d7d util.parsedate should understand dates from hg export 2006-07-13 09:40:01 -07:00
Vadim Gelfer
a7c3b963b0 move most of tag code to localrepository class. 2006-07-12 08:59:20 -07:00
Benoit Boissinot
7dd019b60b use __contains__, index or split instead of str.find
str.find return -1 when the substring is not found, -1 evaluate
to True and is a valid index, which can lead to bugs.
Using alternatives when possible makes the code clearer and less
prone to bugs. (and __contains__ is faster in microbenchmarks)
2006-07-09 01:30:30 +02:00
Benoit Boissinot
fbf78b7285 str.rsplit does not exist in python 2.3 2006-06-30 23:02:08 +02:00
Benoit Boissinot
eb4253c05c validate the resulting date in parsedate 2006-06-30 18:48:06 +02:00
Jose M. Prieto
9f3a9a5e6e Allow the use of human readable dates (issue 251) 2006-06-30 18:47:35 +02:00
Vadim Gelfer
29a0efc318 fix -I/-X when relative paths used or in subdir 2006-06-21 17:30:31 -07:00
Vadim Gelfer
cbbcaa74fe merge with crew. 2006-06-20 23:58:45 -07:00
Vadim Gelfer
9a0c813fdc use demandload more. 2006-06-20 23:58:21 -07:00
Vadim Gelfer
b1e704337e util: add limit to amount filechunkiter will read 2006-06-20 15:13:17 -07:00
Vadim Gelfer
6144b74dd7 replace os.stat with os.lstat in some where. 2006-06-16 12:58:24 -07:00
Volker Kleinfeld
138d9f83fc Remove quotes from patch command.
When the gpatch fix for solaris was introduced in b67447b909f3 the
patch command was "". For some strange reason windows 2000 is
not happy with those quotes when given in os.popen.
2006-05-18 22:35:41 -07:00
Thomas Arendsen Hein
cfcf8066dd Use platform path for renaming file in util.atomictempfile.rename() 2006-05-18 21:01:38 +02:00
Volker Kleinfeld
94db8d7fec On win98 os.path.expanuser('~') does not result in a useable directory.
The MSDN recommendation for user specific directories is the use of
shell.ShGetSpecialFolder, so use it.

For details see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp
2006-05-14 23:44:50 -07:00
Thomas Arendsen Hein
d8dda7e592 On Windows look for mercurial.ini in $USERPROFILE, too, if available
as os.path.expanduser('~') does not always yield a useful directory.

Based on a patch from Edouard Gomez <ed.gomez@free.fr>
2006-05-14 18:24:32 +02:00
Manpreet Singh
cc6f64ec98 Make hg status work for repositories in root directory on windows (issue 228) 2006-05-13 23:00:05 -07:00
Manpreet Singh
05f4a37fe7 Make it possible to use the root directory as the root of a repository. 2006-05-11 21:55:15 -07:00
Vadim Gelfer
5a3e6d2974 make reason for sys.argv change obvious in code. 2006-05-11 09:01:32 -07:00
Vadim Gelfer
edc07498a2 merge with crew. 2006-05-11 08:48:52 -07:00
Shun-ichi GOTO
876fe3cdc4 Check existance of sys.argv for the use from mod_python. 2006-05-11 08:48:36 -07:00
Vadim Gelfer
20d2979fe8 windows: revlog.lazyparser not always safe to use.
can not use on windows < nt or if win32 api not available.
2006-05-10 11:10:18 -07:00
Vadim Gelfer
4b2d02c52a reduce memory used by util.opener when making a temp copy of a file. 2006-05-09 11:12:45 -07:00
Vadim Gelfer
f337648835 add filename to IOError if read of file fails.
if file replaced with directory or symlink, IOError not fully filled out.
2006-05-08 08:20:56 -07:00
Vadim Gelfer
47101ddc97 add util.samestat function for windows.
windows does not have os.path.samestat, and stat().st_ino is always zero,
so util.samestat always returns false on windows.
2006-05-03 22:47:08 -07:00
Vadim Gelfer
75ddc9a984 merge with crew. 2006-05-02 14:37:55 -07:00
Vadim Gelfer
fad839fb0b fix file handling bugs on windows.
add util.posixfile class that has posix semantics on windows.
fix util.rename so it works with stupid windows delete semantics.
2006-05-02 14:30:00 -07:00
Thomas Arendsen Hein
092be2daa9 Use better names (hg-{usage}-{random}.{suffix}) for temporary files. 2006-04-30 21:11:22 +02:00
Vadim Gelfer
3f5f35a23b move SignalInterrupt class into util module. 2006-04-28 14:50:23 -07:00
Vadim Gelfer
acc87bc678 fix issue 217.
fall back to fixed path if windows >= nt function not present.
2006-04-25 08:37:05 -07:00
Jim Meyering
29bdfc218f Fix issue 165: `hg status' with abs path containing a symlink-to-dir fails 2006-04-21 16:09:43 -07:00
Alexis S. L. Carvalho
e1e5a2b65c Ignore EPIPE in pipefilter
This hides the following traceback (there's a race condition involved,
so you may have to try a few times to hit it):

$ hg sign --key key-that-does-not-exist
Signing 2062:4bad92f4ea65
gpg: skipped "key-that-does-not-exist": secret key not available
gpg: signing failed: secret key not available
Exception in thread Thread-1:
Traceback (most recent call last):
  File "threading.py", line 442, in __bootstrap
    self.run()
  File "threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "mercurial/util.py", line 24, in writer
    pin.close()
IOError: [Errno 32] Broken pipe

abort: Error while signing
2006-04-19 11:41:25 -07:00
Vadim Gelfer
39bf3d1d78 fix util.canonpath on windows.
old test for absolute path was not portable. use os.path api instead.
2006-04-19 09:08:45 -07:00
Chris Mason
92b1bcb569 merge revlogng with mpm tip 2006-04-18 19:50:12 -04:00
Vadim Gelfer
7c29a12e6d import: use gpatch if present on system. patch is broken on solaris.
fixes issue 205.

add new useful function, util.find_in_path.
2006-04-13 17:42:49 -07:00
Vadim Gelfer
d688aaeffa util.unlink should only catch OSError. 2006-04-13 13:46:56 -07:00
Chris Mason
b52474f560 merge 0.8.1 with revlogng 2006-04-08 20:10:46 -04:00
Vadim Gelfer
86b6b506c0 fix exception handling on windows.
move win32 code into util_win32.py.
2006-04-08 14:12:43 -07:00
Vadim Gelfer
3e74e23053 util.copyfiles: only switch to copy if hardlink raises IOError or OSError.
before this, interrupting clone would give "file a same as file b" error
because caught KeyboardInterrupt.
2006-04-05 17:17:07 -07:00
mason@suse.com
9131eec8e3 Create an atomic opener that does not automatically rename on close
The revlog.checkinlinesize() uses an atomic opener to replace the
index file after converting it from inline to traditional .i and .d
files.  If this operation is interrupted, the atomic file class can
overwrite a valid file with a partially written one.

This patch introduces an atomic opener that does not automatically
replace the destination file with the tempfile.  This way
an interrupted checkinlinesize() call turns into a noop.
2006-04-04 16:38:44 -04:00
Vadim Gelfer
74afe6ba38 more windows fixes. 2006-03-30 18:35:52 -08:00
Vadim Gelfer
08cb794787 clean up lee's windows testpid fix. 2006-03-30 18:27:04 -08:00
Lee Cantey
5f23e95446 Fixes to testpid() for Windows.
Handle processes that no longer exist and processes that belong to another user.

Enables the lock breaking changes from 0ab4c12ad060 and subsequently "fixes" the left over locks reported in bug 112.
2006-03-30 18:20:08 -08:00
Benoit Boissinot
cc702f58e2 merge with self 2006-03-23 23:55:51 +01:00
Benoit Boissinot
61a488204f make it possible to escape characters in a glob expression 2006-03-23 23:39:53 +01:00
Vadim Gelfer
2e0f1be283 add changelog style to command line template.
to use, "hg log --style=changelog".  makes different output with no
flags, -q, -v, --debug.

templater module has new template filters for this.
email - committer email address
fill68 - refill text to 68 colums
fill76 - refill text to 76 colums
tabindent - prefix every not empty line with tab
shortdate - iso 8631 date, no time zone
stringify - turn template iterator into string
2006-03-21 23:29:21 -08:00