Commit Graph

15526 Commits

Author SHA1 Message Date
Martin Geisler
ae8ca6aff5 merge: make debug output easier to read
I always found it hard to figure out what the debug code meant without
the separators.
2011-12-09 17:34:53 +01:00
Thomas Arendsen Hein
8337fb5549 sshrepo: add more safe characters (issue2983)
Extended the list of safe characters introduced in c3194121de6c to include
everything from pipes._safechars, which is only available on Unix platforms.
Place "-" at the end of the range to avoid backslash-escape.
New characters: @%+=:,
2011-12-09 15:50:33 +01:00
Matt Mackall
a968007692 merge with stable 2011-12-08 16:01:44 -06:00
Mads Kiilerich
2ee0e99705 sshrepo: don't quote obviously safe strings (issue2983)
This restores compatibility with hg-over-ssh servers that don't parse
commandlines as sh does but works ok in the most common cases.
2011-12-08 16:39:00 +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
Mads Kiilerich
7f38d9b9d4 help: Backed out changeset daf758dccb52, description of file urls
This help entry didn't try to describe the 'localhost' notation. It described a
non-standard host-less notation where 'local' just was the first part of a
sample relative path. It describe "urls" with relative and absolute paths like:

  file://file.txt
  file:///tmp/file.txt
  file://c:/tmp/file.txt
2011-11-18 01:32:28 +01:00
Matt Mackall
8de0c77dee revset: follow(nosuchfile) should give an empty set (issue3114) 2011-11-20 15:29:55 -06:00
Kevin Bullock
487ddecbc0 bookmarks: update and updatecurrentbookmark return status
This makes bookmarks.update() and bookmarks.updatecurrentbookmark() return
True or False to indicate whether the bookmark was updated or not. This allows
callers to e.g. abort if the update failed.
2011-11-16 15:29:57 -06:00
Kevin Bullock
49b349ede1 bookmarks: clarify help for use of merge and update 2011-12-07 11:23:13 -06:00
Kevin Bullock
4b1f198355 merge: make 'nothing to merge' aborts consistent
Makes the 'nothing to merge' abort messages in commands.py consistent with
those in merge.py. Also makes commands.merge() and merge.update() use hints.
The tests show the changes.
2011-12-07 11:23:01 -06:00
Kevin Bullock
d434bb6e1a merge: remove excess creation of changectx 2011-12-07 11:22:57 -06:00
Na'Tosha Bard
15aa924ecd largefiles: optimize performance of status on largefiles repos (issue3136) 2011-12-07 12:56:44 +01:00
Matt Mackall
239b73ab8c bookmarks: mark divergent bookmarks with book@pathalias when source in [paths] 2011-12-07 16:19:39 -06:00
Matt Mackall
395e8d3f93 bookmarks: shadow divergent bookmarks of foo with foo@n 2011-12-06 14:17:33 -06:00
Christian Ebert
d589940139 help: properly underline annotate config heading 2011-12-06 13:21:45 +01:00
Matt Mackall
e82c2e671f merge with stable 2011-12-05 17:48:40 -06:00
Patrick Mezard
08f16028b0 convert: simplify getargmax() with propertycache 2011-12-02 18:36:32 +01:00