Commit Graph

15559 Commits

Author SHA1 Message Date
Alexander Sauta
7110dd9c44 i18n-ru: largefiles strings fixed 2011-12-08 20:12:56 +03:00
Matt Mackall
9f8ee10163 util: don't mess with builtins to emulate buffer() 2011-12-15 15:27:11 -06:00
Matt Mackall
49b0ffe198 util: clean up function ordering 2011-12-15 14:59:22 -06:00
Matt Mackall
03f5247248 merge with stable 2011-12-15 14:37:36 -06:00
Nikolaus Schueler
efb688abc6 notify: change behavior of "changegroup" hook
Change the behavior so that the sender (the "From" header in the notification
mail) in case of the "changegroup" hook is the user that did the first commit
in the changegroup.  The option is configurable, if you set "notify.fromauthor"
to "True" in your config, the new behavior is activated.  If you do not set the
option, the behavior is as before.  The commit adds to an existing test to show
various aspects of the changed behavior.
2011-12-15 13:57:54 +01:00
Na'Tosha Bard
112b1abe18 largefiles: optimize status when files are specified (issue3144)
This fixes a performance issue with 'hg status' when files are specified
on the command-line.  Previously, a large amount of largefiles code was
executed, even if files were specified on the command-line and those files
were not largefiles.  This patch fixes the problem by first checking if
non-largefiles were specified on the command-line and, just letting the
normal status function handle the case if they were.

On a brand new machine, the execution time for 'hg status filename' on
a repository with largefiles was:

real    0m0.636s
user    0m0.512s
sys     0m0.120s

versus the following (the same repository, with largefiles disabled):

real    0m0.215s
user    0m0.180s
sys     0m0.032s

After this patch, the performance of 'hg status filename' on the same
repository, with largefiles enabled is:

real    0m0.228s
user    0m0.189s
sys     0m0.036s

This performance boost is also true when patterns (rather than specific
files) are specified on the command-line.

In the case where patterns are specified in addition to a file list, we
just defer to the normal codepath in order to not spend extra time
expanding the patterns to just risk having to expand them again later.
2011-12-15 16:23:26 +01:00
Pierre-Yves David
3f5fbfb66a wireproto: handle other server output in pushkey
Remote side may add useful information alongside failure return code. For
example "ssl is required". This patch mirror what is done for the unbundle
command.
2011-12-12 15:16:58 +01:00
Pierre-Yves David
0d9927b223 phases: exchange phase boundaries on push
For now phase sync is tried even if push fails with some know pathological
case. The exact behavior is to be discussed and implemented later.
2011-12-15 11:45:01 +01:00
Pierre-Yves David
c8f1983f55 phases: exchange phase boundaries on pull
Add an extra argument to addchangegroup to all phase code to execute before the
lock is released.
2011-12-15 11:28:42 +01:00
Pierre-Yves David
28f802f934 phases: add a function to compute heads from root 2011-12-15 02:18:24 +01:00
Pierre-Yves David
a6373d74dc phases: add basic pushkey support 2011-12-15 11:24:26 +01:00
FUJIWARA Katsunori
ee602b5c96 icasefs: use util.normcase() instead of str.lower() or os.path.normpath() 2011-12-12 17:10:19 +09:00
Martin Geisler
54d4706f56 test-subrepo: test for Issue3153 2011-12-15 16:18:10 +01:00
Renato Cunha
cb456a1751 diff: don't crash when diffing a revision with a deleted subrepo (issue3153)
When a user requested a diff between a revision (r1) that contained a subrepo
and another (r2) that did not, mercurial would crash if r1 was specified before
r2 but would execute the diff otherwise. This fixes this behavior by skipping
the missing subrepo in the diff.
2011-12-14 12:28:00 -02:00
Martin Geisler
034d08dce7 status: add missing ":" to help text 2011-12-15 11:13:38 +01:00
Martin Geisler
3a9a310829 largefiles: fix 'hg status' abort after merge
If a largefile is introduced on the branch that is merged into the
working copy, then 'hg status' would abort with an error like:

   $ hg status
   abort: .hglf/foo@33fdd332ec: not found in manifest!

The problem was that the largefiles status code only looked in the
first parent for the largefile. Largefiles are now always reported as
modified if they don't exist in the first parent -- this matches the
behavior of localrepo.status for normal files.
2011-12-09 17:34:58 +01:00
Olav Reinert
f1e67c7732 Describe all files related to the standard commands. 2011-12-06 15:50:28 +01:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Matt Mackall
d91862b8e5 branch: move note about permanence to the top, add 'global' 2011-12-05 17:09:11 -06:00
Patrick Mezard
3a0effcd7b util: fix url.__str__() for windows file URLs
Before:

  >>> str(url('file:///c:/tmp/foo/bar'))
  'file:c%3C/tmp/foo/bar'

After:

  >>> str(url('file:///c:/tmp/foo/bar'))
  'file:///c%3C/tmp/foo/bar'

The previous behaviour had no effect on mercurial itself (clone command for
instance) because we fortunately called .localpath() on the parsed URL.
hgsubversion was not so lucky and cloning a local subversion repository on
Windows no longer worked on the default branch (it works on stable because
2b62605189dc defeats the hasdriveletter() test in url class).

I do not know if the %3C is correct or not but svn accepts file:// URLs
containing it. Mads fixed it in 2b62605189dc, so we can always backport should
the need arise.
2011-12-04 18:22:25 +01:00
Wagner Bruna
307a2fdf03 convert: tolerate trailing spaces on map files
A convert run with a branchmap made with

echo default namedbranch > branchmap

on Windows fails silently and surprisingly; it actually
adds a space after 'namedbranch', so it ends up mapping
"default namedbranch" to "".

This also affects splicemaps, since the same parser is used
for both.
2011-12-02 21:38:57 -02:00
Patrick Mezard
7a8d1bb9db test-svn-subrepo: fix reference output for svn 1.7
I modified check-code.py "$?" detection because I thought my use was legit, we
cannot test exit status of pipelines commands except for the last one without
this. So it now tolerates "[$?" which is unlikely to be added by mistake.

Tested on:
- OSX + svn 1.7.1
- Linux + svn 1.6.12
2011-12-02 16:50:48 +01:00
Greg Ward
d364c25d5a rollback: always call destroyed() (regression from 1.9)
The contract for repo.destroyed() is that it is called whenever
changesets are destroyed, either by strip or by rollback. That
contract was inadvertently broken in 6c30b131b2ae, when we made a
chunk of code conditional on destroying one of the working dir's
parents. Oops: it doesn't matter *which* changesets are destroyed or
what their relationship is to the working dir, we should call
repo.destroyed() whenever we destroy changesets.
2011-12-01 17:39:30 -05:00
Matt Mackall
681b038b1c Added signature for changeset b4eeeb8c0f79 2011-12-01 15:55:37 -06:00
Matt Mackall
720ed4fcd7 alias: shortcut command matching show shadowing works properly (issue3104)
An alias for 'log' was stored in the same command table as
'^log|history'. If the hash function happens to give the latter first,
the alias is effectively ignored when matching 'log'.
2011-12-01 15:51:36 -06:00
Patrick Mezard
1d6a6d6bd8 convert/svn: fix URL quoting issue with svn 1.7
As of svn 1.7, many svn calls expect "canonical" paths. In theory, we should
call svn.core.*canonicalize() on all paths before passing them to the API.
Instead, we assume the base url is canonical and copy the behaviour of svn URL
encoding function so we can extend it safely with new components.
2011-12-01 20:42:24 +01:00
Na'Tosha Bard
60040a8402 largefiles: fix rename (issue3093) 2011-11-30 15:11:00 +01:00
Sune Foldager
b1f5c2e814 bundlerepo: don't write branch cache to disk
Calling branchmap() or similar on a bundlerepo would write the bundle-augmented
branch cache to disk, requiring a subsequent expensive rebuild when the repo
is used without the bundle.
2011-12-01 14:17:17 +01:00
Matt Mackall
a837de171f revset: balance %l or-expressions (issue3129) 2011-11-30 22:43:24 -06:00
Matt Mackall
6e77a4d58a merge with i18n 2011-11-30 17:16:43 -06:00
Benoit Allard
f3be9c5304 diff: '\ No newline at end of file' is also not part of the header
Diff containing '\ No newline at end of file' were colorized incorrectly.
2011-11-29 19:51:35 +01:00
Wagner Bruna
a3ad9631f9 i18n-pt_BR: synchronized with 598dd12000c9 2011-11-29 12:40:26 -02:00
Mads Kiilerich
2af29b7753 largefiles: avoid use of uinitialized variable in case of errors 2011-11-25 02:09:48 +01:00
Mads Kiilerich
a9264240dc tests: remove unstable debugstate output in test-largefiles.t 2011-11-25 02:09:45 +01:00
Martin Geisler
161f84c84c largefiles: copy files into .hg/largefiles atomically
Copying from the user cache into .hg/largefiles could fail halfway
though with a partially written file.
2011-11-24 18:13:18 +01:00
Martin Geisler
de1d410b06 largefiles: write .hg/largefiles/ files atomically
Before, it was possible to create a

  .hg/largefiles/hash

file with truncated content, i.e., content where

  SHA-1(content) != hash

This breaks the fundamental invariant in largefiles that the file
content for files in .hg/largefiles hash to the filename.
2011-11-24 18:12:13 +01:00
Martin Geisler
ebb23d0eaa largefiles: add comment about non-atomic working directory
When updating the working copy with a normal 'hg update', we also
don't use atomic writes.
2011-11-24 18:11:43 +01:00
FUJIWARA Katsunori
d9039e2664 largefiles: use "ui.configlist()" to get largefiles.patterns configuration
current lfconvert implementation uses combination of "ui.config()" and
"str.split(' ')" to get largefiles.patterns configuration.

but it can not handle multiline configuration in hgrc files correctly.

lfconvert should use "ui.configlist()" instead of it, as same as
override_add does.
2011-11-24 17:54:50 +09:00
Matt Mackall
8fc7c196b4 convert: handle trailing slashes in filemap better (issue3124) 2011-11-23 16:25:44 -06:00
Matt Mackall
7f4a5bf4c9 tests: remove test-casecollision-i18n.t
The result of this test is quite suspect. Remove it for now as it now
correctly breaks on HFS+.
2011-11-23 14:24:56 -08:00
Matt Mackall
4ed869c059 posix: fix HFS+ percent-encoding folding
We use 'ignore' rather than 'replace' so we don't have to deal with
u+FFFD in UTF-8 round-trip.
2011-11-23 14:22:37 -08:00
Mads Kiilerich
629eb6e680 tests: test-largefiles.t should not try to escape from $TESTTMP 2011-11-22 19:56:26 +01:00
Mads Kiilerich
eb44c968ee largefiles: file storage should be relative to repo, not relative to cwd
Revealed by the test in 43cf449a75e4.
2011-11-22 19:52:23 +01:00
Augie Fackler
ca0638e3d0 clone: don't save user's password in .hg/hgrc (Issue3122) 2011-11-22 12:06:42 -06:00
Matt Mackall
de7392db69 posix: add extended support for OS X path folding
OS X does the following transformation on paths for comparisons:

a) 8-bit strings are decoded as UTF-8 to UTF-16
b) undecodable bytes are percent-escaped
c) accented characters are converted to NFD decomposed form, approximately
d) characters are converted to _lowercase_ using internal tables

Both (c) and (d) are done using internal tables that vary from release
to release and match Unicode specs to greater or lesser extent. We
approximate these functions using Python's internal Unicode data.

With this change, Mercurial will (in almost all cases) match OS X
folding and not report unknown file aliases for files in UTF-8 or
other encodings.
2011-11-22 17:26:32 -06:00
Matt Mackall
14399ab3d4 dirstate: use util.normcase to build foldmap 2011-11-22 17:26:31 -06:00
Martin Geisler
28455d6a6b largefiles: fix 'hg clone . ../foo' OSError abort
Operating on a non-existant file can cause both IOError and OSError,
depending on the function used: open raises IOError, os.lstat raises
OSError.

The largefiles code called dirstate.normal, which in turn calls
os.lstat, so OSError is the right exception to catch here.
2011-11-22 17:51:43 +01:00
Mads Kiilerich
ba2b5b0d23 update: don't clobber untracked files with wrong casing 2011-11-20 23:09:32 +01:00
Matt Mackall
d795921141 merge with i18n 2011-11-20 16:06:51 -06:00
Wagner Bruna
53444db76c i18n-pt_BR: synchronized with 16bb54565f4f 2011-11-18 10:21:56 -02:00