Durham Goode <durham@fb.com> [Tue, 05 Feb 2013 16:22:53 -0800] rev 18566
bookmark: don't allow integers as bookmark/branch/tag names
Bookmarks/branches/tags shouldn't be allowed to be integers because that
overlaps with revision numbers. Right now if a user created one they can't
use it anyway because the revision numbers take precedence.
The check only happens when creating a new bookmark/etc from a command so it
shouldn't affect existing bookmarks/branches/tags or importing branches from
git.
This fix was prompted by us having a user create a bookmark named "404" then
accidentally checkout a very old version of our repository.
Simon Heimberg <simohe@besonet.ch> [Wed, 24 Oct 2012 23:09:31 +0200] rev 18565
run-tests: do not fail on empty tsttest file
Initialize n for not failing on empty tsttest files.
Matt Mackall <mpm@selenic.com> [Wed, 06 Feb 2013 14:43:29 -0600] rev 18564
merge with stable
Kevin Bullock <kbullock@ringworld.org> [Tue, 05 Feb 2013 11:31:43 -0600] rev 18563
hgweb: make 'summary' work with hidden changesets (
issue3810)
Since the 'summary' view used by e.g. gitweb and monoblue shows both a
changelog and a bookmarks list, the same changes are needed here as were
made to the 'changelog' and 'bookmarks' web commands (
56ca4443a343 and
886936ecc21b, respectively).
Mads Kiilerich <madski@unity3d.com> [Wed, 06 Feb 2013 13:22:01 +0100] rev 18562
merge with stable
Andrew Shadura <bugzilla@tut.by> [Tue, 05 Feb 2013 12:58:21 +0100] rev 18561
hgk: support the old way of getting the current Ttk theme (
issue3808)
It seems like the API has changed somewhere around 8.5.7, so the preferred way
of getting the current theme is now [ttk::style theme use], while the
deprecated (but still working) is $::ttk::currentTheme.
Durham Goode <durham@fb.com> [Mon, 04 Feb 2013 14:10:09 -0800] rev 18560
addremove: don't perform m.exact/rel until needed
Moves the m.exact and m.rel calls within the conditionals they are used in.
On a large repo this brings addremove from 7.1 seconds down to 6.3 (13%).
Durham Goode <durham@fb.com> [Mon, 04 Feb 2013 14:06:20 -0800] rev 18559
addremove: don't call lexists, isdir, and islink
The dirstate walk results contain the stat information for each path, so we
don't need to query it again. On a large repo this makes addremove go from
8.35 seconds to 7.1 (15%).
Durham Goode <durham@fb.com> [Mon, 04 Feb 2013 14:01:40 -0800] rev 18558
addremove: only query dirstate once per path
Previously the addremove code queried the dirstate 4 times per path. Now it
only does so once. On a large repo this brings addremove from 9.5 seconds
to 8.35 seconds (12%).
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 23:48:34 +0100] rev 18557
tests: fix windows test failure with largefiles
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 23:53:37 +0100] rev 18556
merge with stable
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 23:41:11 +0100] rev 18555
tests: fix windows test failure in test-subrepo.t
Matt Mackall <mpm@selenic.com> [Mon, 04 Feb 2013 16:39:02 -0600] rev 18554
merge with stable
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 23:26:44 +0100] rev 18553
largefiles: don't crash when trying to find default dest for url without path
b32e55e6c3c7 introduced a crash when cloning a url without path - where
util.url().path would be None.
This None will now be handled as ''. clone will thus abort with 'repository /
not found' as before.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 23:25:25 +0100] rev 18552
hgweb.cgi: fix internal WSGI emulation (
issue3804)
The internal WSGI emulation in wsgicgi.py was not fully WSGI compliant and
assumed that all responses sent a body. With
3fbdbeab38cc that caused a real
bug when using hgweb.cgi.
wsgicgi.py will now make sure headers always are sent, using the pattern from
PEP 333 and similar to how it is done in
c007e5c54b16.
Matt Mackall <mpm@selenic.com> [Sat, 02 Feb 2013 16:15:22 -0600] rev 18551
bdiff: simplify overflow checks
Rather than check that each delta start, end, and length is within 32
bits, we simply check that the input strings are under 4GB.
Bryan O'Sullivan <bryano@fb.com> [Mon, 04 Feb 2013 11:42:10 -0800] rev 18550
Merge crew-stable into crew
Siddharth Agarwal <sid0@fb.com> [Sun, 03 Feb 2013 14:26:39 -0800] rev 18549
rebase: derive node from target rev (
issue3802)
dest.rev() is the same as target when a new rebase is run, but dest
isn't set when rebase --continue is run. Bug introduced in
2a1fac3650a5,
which fixed
issue3685.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 02:46:53 +0100] rev 18548
profiling: introduce limit configuration option
The number of output lines was hardcoded to 30.
There was a 'nested' configuration options that controlled something else
related to counting the number of output lines.
This introduces the profiling.limit configuration option for controlling the
number of profiling output to show.
Mads Kiilerich <madski@unity3d.com> [Thu, 24 Jan 2013 23:57:44 +0100] rev 18547
largefiles: make verify --lfa and --lfc work without --large
The slightly obscure --lfa and --lfc only worked as modifiers to --large and
could be combined. The documentation was however not clear what they did.
Instead they now imply --large and the description is updated.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 02:46:53 +0100] rev 18546
largefiles: verify status should be written as status, not as write
Make 'hg verify --large -q' quiet when no errors.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 02:46:53 +0100] rev 18545
largefiles: report localstore errors with single line warnings messages
The actual hash is also not relevant to report.
This makes verify output with multiple failures easier to process.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 02:46:53 +0100] rev 18544
merge: inline act()
The act function had become very trivial and mainly shuffled arguments around
and made it harder to see what really was going on.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 02:46:53 +0100] rev 18543
merge: don't indent "local changed %s which remote deleted" prompt
It was usually not shown in a context where indentation helped readability and
it was inconsistent with other prompts.
Mads Kiilerich <madski@unity3d.com> [Mon, 04 Feb 2013 02:46:38 +0100] rev 18542
merge: backout manifest sorting and workarounds for cost of it
Backout
8a811fa9a9c0 and
760c0d67ce5e which no longer are needed.
Mads Kiilerich <madski@unity3d.com> [Thu, 24 Jan 2013 23:57:44 +0100] rev 18541
merge: delay debug messages for merge actions
Show messages at a point where the actions have been sorted, thus preparing for
backout of
760c0d67ce5e.
This makes manifestmerge more of a silent operation, just like 'copies' is.
Indent 'preserving' messages to make them subordinate to the action logging so
they fit in the new context. (The 'preserving' messages are quite redundant and
could also be removed completely.)
Mads Kiilerich <madski@unity3d.com> [Thu, 24 Jan 2013 23:57:44 +0100] rev 18540
merge: make all action tuples have the same length - keep args as tuple
Mads Kiilerich <madski@unity3d.com> [Thu, 24 Jan 2013 23:57:44 +0100] rev 18539
merge: delay prompts a bit and show them in (extra) sorted order
Preparing for backout of
760c0d67ce5e.
The number of prompts will for all relevant cases be significantly smaller than
the total number of files in the manifests. We can thus afford to sort the
prompts more than we can afford to sort the manifests.
Antonio Zanardo <zanardo@gmail.com> [Sat, 02 Feb 2013 15:37:17 -0200] rev 18538
commit: show active bookmark in commit editor helper text
If there is an active bookmark while committing, the bookmark name
will be visible inside the commit message helper, below the branch
name.
This should make easier for the user to detect a mistaken commit
parent, while working for example with a bookmark centric workflow
like topic branches.
The active bookmark is checked to be in the working directory, as
pointed by Kevin Bullock, because otherwise committing would not
advance it. In other words, this would not show the active
bookmark name if the user changed the working tree parents with
'hg debugsetparents', for example.
Paul Cavallaro <ptc@fb.com> [Wed, 23 Jan 2013 09:51:45 -0800] rev 18537
dates: support 'today' and 'yesterday' in parsedate (
issue3764)
Adding support to parsedate in util module to understand the more idiomatic
dates 'today' and 'yesterday'.
Added unified tests and docstring tests for added functionality.
Paul Cavallaro <ptc@fb.com> [Mon, 28 Jan 2013 12:19:21 -0800] rev 18536
revset: change ancestor to accept 0 or more arguments (
issue3750)
Change ancestor to accept 0 or more arguments. The greatest common ancestor of a
single changeset is that changeset. If passed no arguments, the empty list is
returned.
Matt Mackall <mpm@selenic.com> [Fri, 01 Feb 2013 15:48:33 -0600] rev 18535
merge with stable
Matt Mackall <mpm@selenic.com> [Fri, 01 Feb 2013 15:32:05 -0600] rev 18534
Added signature for changeset
a6088c05e43a
Matt Mackall <mpm@selenic.com> [Fri, 01 Feb 2013 15:31:57 -0600] rev 18533
Added tag 2.5 for changeset
a6088c05e43a
Matt Mackall <mpm@selenic.com> [Fri, 01 Feb 2013 15:21:47 -0600] rev 18532
test-obsolete: now gets 404 for hidden change
Matt Mackall <mpm@selenic.com> [Fri, 01 Feb 2013 15:23:37 -0600] rev 18531
merge with i18n
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 01 Feb 2013 17:59:56 -0200] rev 18530
i18n-pt_BR: added message from crew
0324a1d88a53
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 01 Feb 2013 11:01:39 -0200] rev 18529
i18n-pt_BR: added message from crew
9fbeb61b8ad2
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 31 Jan 2013 23:01:31 +0900] rev 18528
i18n-ja: synchronized with
2a1fac3650a5
Wagner Bruna <wbruna@yahoo.com> [Thu, 31 Jan 2013 09:58:36 -0200] rev 18527
i18n-pt_BR: synchronized with
68eecbaf1bd3
Thomas Arendsen Hein <thomas@intevation.de> [Fri, 01 Feb 2013 20:43:35 +0100] rev 18526
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Without this, repository paths or names containing e.g. & characters or html
tags yielded strange results, possibly allowing cross-site scripting attacks.
Matt Mackall <mpm@selenic.com> [Fri, 01 Feb 2013 15:14:05 -0600] rev 18525
merge with crew
Kevin Bullock <kbullock@ringworld.org> [Fri, 01 Feb 2013 10:12:41 -0600] rev 18524
hgweb: rename 'currentbaseline' template keyword to 'basenode'
Shorter and clearer. This keyword represents the node we're currently
diffing against.
Kevin Bullock <kbullock@ringworld.org> [Fri, 01 Feb 2013 09:58:25 -0600] rev 18523
hgweb: rename 'changesetbaseline' template to 'difffrom'
More accurately reflects what it will be used for, and is also shorter.
This template is used to change which rev the current rev is diff'd
against. For example, if you're at '/rev/P1:REV', this would link to a
path like '/rev/P2:REV'.
Example usage in a template:
{parent%difffrom}
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 31 Jan 2013 19:56:55 +0100] rev 18522
hgweb: add a `web.view` to control filtering
This options add a new `web.view` to control filter level of hgweb.
This option have two purposes:
1) Allow fall back to unfiltered version in case a yet undetected by critical
bug is found in filtering after 2.5 release
2) People use hgweb as a local repoviewer. When they have secret changesets,
they wants to use "visible" filter not "served"
(modified by mpm, documentation deferred)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 31 Jan 2013 22:30:52 +0100] rev 18521
hgweb: returns 404 for unknow revision instead of 500
I noticed that access to filtered revision returned HTTP 500 code (internal
server error). Investigation shown that it was the case for unknown revision
too. That wrong and we now properly return a 404 for revision not found.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 31 Jan 2013 01:44:29 +0100] rev 18520
subrepo: allows to drop courtesy phase sync (
issue3781)
Publishing server may contains draft changeset when they are created locally. As
publishing is the default, it is actually fairly common. Because of this
"inconsistency" phases synchronization may be done even to publishing server.
This may cause severe issues for subrepo. It is possible to reference read-only
repository as subrepo. Push in a super repo recursively push subrepo. Those
pushes to potential read only repo are not optional, they are "suffered" not
"choosed". This does not break because as the repo is untouched the push is
supposed to be empty. If the reference repo locally contains draft changesets, a
courtesy push is triggered to turn them public. As the repo is read only, the
push fails (after possible prompt asking for credential). Failure of the
sub-push aborts the whole subrepo push. This force the user to define a custom
default-push for such subrepo.
This changeset introduce a prevention of this error client side by skipping the
courtesy phase synchronisation in problematic situation. The phases
synchronisation is skipped when four conditions are gathered:
- this is a subrepo push, (normal push to read-only repo)
- and remote support phase
- and remote is publishing
- and no changesets was pushed (if we pushed changesets, repo is not read only)
The internal config option used in this version is not definitive. It is here to
demonstrate a working fix to the issue.
In the future we probably wants to track subrepo changes and avoid pushing to
untouched one. That will prevent any attempt to push to read-only or unreachable
subrepo.
Another fix to prevent courtesy push from older clients to push to newer server
is also still needed.
Mads Kiilerich <madski@unity3d.com> [Thu, 31 Jan 2013 19:13:13 +0100] rev 18519
tests: fix toctou race in tinyproxy.py (
issue3795)
test-http-proxy.t sometimes failed with:
File ".../tests/tinyproxy.py", line 110, in _read_write
data = i.recv(8192)
error: (104, 'Connection reset by peer')
This might have started showing up with
a9fd11ffa13f ... but it has apparently
also been seen before. I don't see anything in
a9fd11ffa13f that can explain
it. It seems to be a race in test, in the tinyproxy helper:
Tinyproxy found an incoming socket using select(). It would break the loop if
an error had been detected on the socket, but there was no error and it tried
to recv() from the socket. That failed - apparently because it had been reset
after select().
Errors in the recv() will now be caught and will break the loop like errors
detected by select() would.
(send() could also fail in a similar way ... but using the same solution there
and losing data we have read doesn't feel right.)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 01 Feb 2013 02:01:11 +0100] rev 18518
rebase: mention --rev in the help
This changeset adds a small mention of it in the help to prevent
confusion. This small addition references online help that is easier to
update and improve at release time.
Following Wagner Bruna's advice, this is added in a plain new paragraph
to not invalidate current translation this close to the release.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 01 Feb 2013 05:40:06 +0100] rev 18517
hgweb: remove baseline info from paper template
The user interface introduced in
d605a82cf189 is not considered ready
for prime time yet. The internal code stays in place for custom template
usage. The feature is ultimately wanted and will be re-enabled soon. The
current issue is only related to the visual of the current interface.
Kevin Bullock <kbullock@ringworld.org> [Thu, 31 Jan 2013 20:01:26 -0600] rev 18516
rebase: mention phases in the help
Mention that Mercurial helps you not do what you've just been warned not
to do, with a reference to the 'phases' help topic (not the 'phase'
command help).
Thanks to Pierre-Yves David <pierre-yves.david@ens-lyon.org> for
motivating this change and Wagner Bruna
<wagner.bruna+mercurial@gmail.com> for advising on how to do it in an
i18n-friendly way.
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 31 Jan 2013 22:36:22 +0100] rev 18515
hgwebdir: use web.prefix when creating url breadcrumbs (
issue3790)
The web.prefix setting was being ignored when creating the index URL
breadcrumbs.
We only need to fix hgwebdir and not hgweb because hgweb gets the complete URL
request, including the prefix, while hgwebdir gets a "subdir" which does not
include the prefix.
This fix is slightly different of what was suggested on the bug tracker. In
there it was suggested to hide the prefix itself from the breadcrumb. I think
that would be a better solution, but it would require changing all the index
templates and passing the prefix to the template engine, which may be too big
a change for stable during the freeze. For now this fixes the problem, and the
fix could be improved during the next cycle.
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Jan 2013 16:08:32 -0800] rev 18514
rebase: delete divergent bookmarks on destination (
issue3685)
Similar to merge, divergent bookmarks are only deleted when the bookmark is on
the destination parent.
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Jan 2013 15:35:00 -0800] rev 18513
bookmarks: factor out delete divergent code
Deleting divergent bookmarks is more generally useful than just in
bookmarks.update.
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Jan 2013 17:49:54 -0800] rev 18512
rebase: remove bogus nullmerge check in updatebookmarks
nstate[v] is a node, not an int, and the nullmerge check was done while
building nstate anyway.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Nov 2012 21:31:59 -0500] rev 18511
share: backout
fd903f89e42b, except the test
Locating the share source when no default path is available is now handled in
subrepo._abssource(), so unconditionally setting a default path (and the
associated problems) can be avoided.
The test change reflects the fact that a default path is no longer set on the
resulting share.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Nov 2012 20:56:27 -0500] rev 18510
subrepo: use sharepath if available when locating the source repo
This is an alternative fix for
issue3518, enabling sharing of repositories with
subrepos, without unconditionally setting the default path in the resulting
repo's hgrc file. Better test coverage is added here, but won't prove this code
is working until
fd903f89e42b is backed out.
The problem with the original fix is, if a default path is not available to be
copied over from the share source, the default path on the resulting repo is set
to the source location. Since that's where the actual repository is stored, the
path is essentially self-referential, so push, pull, incoming and outgoing
effectively operate on itself. While incoming and outgoing make it look like
nothing was changed, push currently hangs (see
issue3657). In this case where
there is not a real default path, these operations should abort with
"default(-push) not found", like the source repo would. Note this problem with
the original fix affected repos without subrepos too.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 22 Jan 2013 14:33:17 +0100] rev 18509
test-histedit: add tests for dropping head changeset
I got bug report from user in this specific case. I was unable to reproduce in
test situation. Testing this situation is still valuable.
Mads Kiilerich <mads@kiilerich.com> [Thu, 31 Jan 2013 02:39:55 +0100] rev 18508
tests: use `pwd` instead of ${PWD} in test-convert-git.t - because of Solaris
Augie Fackler <raf@durin42.com> [Wed, 30 Jan 2013 10:57:28 -0500] rev 18507
histedit: prevent parent guessed via --outgoing from being a revset (
issue3770)
If the binary hash of the parent node guessed via --outgoing happened
to contain a special revset character (":" was specified in the bug),
the revset parser would abort. Hexlifying the node before passing it
to the revsingle call should fix that.
Mads Kiilerich <madski@unity3d.com> [Wed, 30 Jan 2013 19:40:07 +0100] rev 18506
tests: fix for windows - slashes and no serve
Mads Kiilerich <madski@unity3d.com> [Wed, 30 Jan 2013 19:29:36 +0100] rev 18505
merge: fix UnboundLocalError (
issue3791)
A wrong variable name was introduced in
384df4db6520 for a case without test
coverage.
The variable name is fixed and a test case is introduced.
Yuya Nishihara <yuya@tcha.org> [Mon, 28 Jan 2013 19:05:35 +0900] rev 18504
parsers: fix memleak of revlog cache entries on strip
Since
12a852c7c763, raw_length can be reduced on strip, but corresponding cache
entries still have refcount. They are not dereferenced by _index_clearcache(),
and never freed.
To reproduce the problem, run "hg pull" and "hg strip null" several times
in the same process.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 30 Jan 2013 17:32:17 +0100] rev 18503
hgweb: fix navigation label (
issue3792)
Latest refactoring (
6da1e979340a) was buggy and used a variable from
another loop. Tests are run on repo too small to cache that.
Mads Kiilerich <madski@unity3d.com> [Tue, 29 Jan 2013 20:03:51 +0100] rev 18502
profiling: add documentation of lsprof 'sort' and 'nested'
Mads Kiilerich <madski@unity3d.com> [Tue, 29 Jan 2013 17:01:41 +0100] rev 18501
OS X: try cheap ascii .lower() in normcase before making full unicode dance
This is similar to what is done in encoding.lower, introduced in
c481761033bd.
This has been seen making 'hg up' and 'hg st' in a 50000+ files repo 13%
faster.
This might make Mercurial slightly slower for users who mainly use non-ASCII
filenames. That is a reasonable trade-off.
Mads Kiilerich <madski@unity3d.com> [Tue, 29 Jan 2013 20:03:51 +0100] rev 18500
run-tests.py: inherit PYTHONHASHSEED from environment if set
This makes it possible to fix the seed by using for instance
PYTHONHASHSEED=7 ./run-tests.py ...
This can be very convenient when trying to debug problems that are influenced
by hash values. Try different seed values until you find one that triggers the
bad behaviour and then keep that while debugging.
The value 0 will restore default Python behavior and disable randomization.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 29 Jan 2013 15:25:33 +0100] rev 18499
test-obsolete: validate that bundle is not affected by
issue3788
Bundle might have been affected by the same kind of error than pull (
issue3788).
Testing show it is not the case.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 29 Jan 2013 15:26:10 +0100] rev 18498
pull: fix crash when pulling changeset that get hidden locally (
issue3788)
When you have obsolescence marker that apply to a pulled changesets, the added
changeset is immediately filtered. Then the list of added changeset needs to be
build against and unfiltered repo.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 29 Jan 2013 16:44:51 +0100] rev 18497
hgweb: prevent traceback during search when filtered (
issue3783)
The search needs to iterate over the repo using changelog.revs like the rest of
the Mercurial code.
Kevin Bullock <kbullock@ringworld.org> [Sun, 27 Jan 2013 15:13:53 -0600] rev 18496
bookmarks: hide bookmarks on filtered revs from listkeys
Don't expose unserved changesets to remote repos. Thanks to Sean Farley
<sean.michael.farley@gmail.com> for tracking down the issue and
Pierre-Yves David <pierre-yves.david@ens-lyon.org> for the fix.
Kevin Bullock <kbullock@ringworld.org> [Sun, 27 Jan 2013 14:24:37 -0600] rev 18495
bookmarks: don't use bookmarks.listbookmarks in local computations
bookmarks.listbookmarks is for wire-protocol use. The normal way to get
all the bookmarks on a local repository is repo._bookmarks.
Kevin Bullock <kbullock@ringworld.org> [Mon, 28 Jan 2013 20:25:56 -0600] rev 18494
filtering: test that bookmarks prevent hiding of changesets
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 28 Jan 2013 13:56:11 +0100] rev 18493
discovery: outgoing pass unfiltered repo to findcommonincoming (
issue3776)
We noa pass an unfiltered repo in the same way `localrepo.push` does. This does
not alter outgoing behavior and prevents possible crash with computing
common/missing.
The `findcommonincoming` code could be simplified to make this unnecessary, but
this is too much change for the freeze.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 28 Jan 2013 13:44:44 +0100] rev 18492
test: minor documentation fix
The related test check push, not pull.
Mads Kiilerich <madski@unity3d.com> [Fri, 25 Jan 2013 18:20:13 +0100] rev 18491
largefiles: fix cat when using relative paths from subdirectory
Mads Kiilerich <madski@unity3d.com> [Fri, 25 Jan 2013 16:59:34 +0100] rev 18490
largefiles: fix commit when using relative paths from subdirectory
Remove cwd handling from getstandinmatcher - it did not belong there, as proven
by the tests.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18489
largefiles: allow use of urls with #revision
largefiles tried to create a peer directly with the specified url. That caused
abort: unsupported URL component: "..."
if a revision was specified in the url.
The branch name do not matter for largefiles' use of remote peers. Largefiles
will be shared among all branches anyway.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18488
largefiles: don't verify largefile hashes on servers when processing statlfile
When changesets referencing largefiles are pushed then the corresponding
largefiles will be pushed too - unless the target already has them. The client
will use statlfile to make sure it only sends largefiles that the target
doesn't have. The server would however on every statlfile check that the
content of the largefile had the expected hash. What should be cheap thus
became an expensive operation that trashed the disk and the cache.
Largefile hashes are already checked by putlfile before being stored on the
server. A server should thus be able to keep its largefile store free of
errors - even more than it can keep revlogs free of errors. Verification should
happen when running 'hg verify' locally on the server. Rehashing every
largefile on every remote stat is too expensive.
Clients will also stat lfiles before downloading them. When the server verified
the hash in stat it meant that it had to read the file twice to serve it.
With this change the server will assume its own hashes are ok without checking
them on every statlfile.
Some consequences of this change:
- in case of server side corruption the problem will be detected by the
existing check on the client side - not on server side
- clients that could upload an uncorrupted largefile when pushing will no
longer magically heal the server (and break hardlinks) - a client will now
only upload its uncorrupted files after the corrupted file has been removed
on the server side
- client side verify will no longer report corruption in files it doesn't have
(Issue3123 discussed related problems - and how they have been fixed.)
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18487
tests: clarify test for pushing corrupted largefile
The test no longer tested that the server prevented pushing a corrupt
largefile. At the same time it tested what happened when the server already had
a corrupt largefile.
These two cases are now separated.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18486
largefiles: verify all files in each revision and report errors in any revision
Verify used 'any' and would stop verifying after the first failure in each
changeset.
The exit code only reported the result from the last changeset.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18485
tests: better test coverage of largefiles localstore verify
This demonstrates problems that will be fixed later.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18484
largefiles: adapt remotestore._getfile to batched statlfile
9e1616307c4c introduced batching of statlfile, but not all codepaths got
converted.
_getfile gave _stat garbage and got garbage back. The garbage didn't match the
expected error codes and was thus interpreted as success. It could thus end up
trying to fetch a largefile that didn't exist.
Instead we now pass _stat valid input and handle both correct and invalid
output correctly.
This makes the code work as intended ... but it would probably be better if it
didn't abort on missing largefiles, just like it happened to do before.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18483
largefiles: don't allow corruption to propagate after detection
basestore.get uses util.atomictempfile when checking and receiving a new
largefile ... but the close/discard logic was too clever for largefiles.
Largefiles relied on being able to discard the file and thus prevent it from
being written to the store. That was however too brittle. lfutil.copyandhash
closes the infile after writing to it ... with a 'blecch' comment. The discard
was thus a silent noop, and as a result of that corruption would be detected
... and then the corrupted files would be used anyway.
Instead we now use a tmp file and rename or unlink it after validating it.
A better solution should be implemented ... but not now.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18482
largefiles: adapt verify to batched remote statlfile (
issue3780)
9e1616307c4c introduced batching of statlfile, but not all codepaths got
converted.
'hg verify' with a remotestore could thus crash with
TypeError: 'builtin_function_or_method' object is not iterable
Also, the 'hash' variable was used without assigning to it. Don't use variable
names that collide with Python built-in functions. Instead we use 'expecthash'
as in localstore.
The tests for this issue covers an untested area. The tests happens to also
reveal incorrect attempts at getting non-existing largefiles, bad server side
handling of that, and corruption issues - all to be fixed later.
Mads Kiilerich <madski@unity3d.com> [Mon, 28 Jan 2013 15:19:44 +0100] rev 18481
largefiles: let wirestore._stat return stats as expected by remotestore verify
- preparing for fixing verify crash.
Kevin Bullock <kbullock@ringworld.org> [Sun, 27 Jan 2013 11:39:51 -0600] rev 18480
tests: improve description of hgweb secret bookmarks test
Added in
886936ecc21b with only an issue number to describe it.
Kevin Bullock <kbullock@ringworld.org> [Sun, 27 Jan 2013 11:29:14 -0600] rev 18479
bookmarks: show active bookmark even if not at working dir
If the active bookmark doesn't point at a parent of the working dir
(e.g. a pull moved it out from under us), we nonetheless show it as
active. This follows on
2096e025a728 in removing the dichotomy (at least
in the UI) between "current" and "active" bookmarks.
Kevin Bullock <kbullock@ringworld.org> [Fri, 25 Jan 2013 11:43:54 -0600] rev 18478
hgweb: don't attempt to show hidden bookmarks (
issue3774)
localrepository._bookmarks is unfiltered, but hgweb gets a filtered
repo. This fixes the resulting traceback on the 'bookmarks' page.
Kevin Bullock <kbullock@ringworld.org> [Fri, 25 Jan 2013 14:50:18 -0600] rev 18477
hgweb: fetch tipmost unfiltered rev thru the changelog
This fixes a traceback when tip is filtered (e.g. because it's secret).
See
issue3783, for which this is a partial fix.
Kevin Bullock <kbullock@ringworld.org> [Fri, 25 Jan 2013 16:11:16 -0600] rev 18476
help: update verbose 'clone' help to include '@' bookmark
Kevin Bullock <kbullock@ringworld.org> [Fri, 25 Jan 2013 11:38:54 -0600] rev 18475
tests: fix test-help.t for '@' bookmark documentation
e031e10cdc06 unexpectedly introduced bookmarks into the results for 'hg
help -k clone'. Mea culpa, miserere &c.
Kevin Bullock <kbullock@ringworld.org> [Fri, 25 Jan 2013 11:06:30 -0600] rev 18474
help: document '@' bookmark in 'help bookmarks' and 'help clone'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 23 Jan 2013 22:52:55 +0900] rev 18473
revset: evaluate sub expressions correctly (
issue3775)
Before this patch, sub expression may return unexpected result, if it
is joined with another expression by "or":
- "^"/parentspec():
"R or R^1" is not equal to "R^1 or R". the former returns only "R".
- "~"/ancestorspec():
"R or R~1" is not equal to "R~1 or R". the former returns only "R".
- ":"/rangeset():
"10 or (10 or 15):" is not equal to "(10 or 15): or 10". the
former returns only 10 and 15 or grater (11 to 14 are not
included).
In "or"-ed expression "A or B", the "subset" passed to evaluation of
"B" doesn't contain revisions gotten from evaluation of "A", for
efficiency.
In the other hand, "stringset()" fails to look corresponding revision
for specified string/symbol up, if "subset" doesn't contain that
revision.
So, predicates looking revisions up indirectly should evaluate sub
expressions of themselves not with passed "subset" but with "entire
revisions in the repository", to prevent "stringset()" from unexpected
failing to look symbols in them up.
But predicates in above example don't so. For example, in the case of
"R or R^1":
1. "R^1" is evaluated with "subset" containing revisions other than
"R", because "R" is already gotten by the former of "or"-ed
expressions
2. "parentspec()" evaluates "R" of "R^1" with such "subset"
3. "stringset()" fails to look "R" up, because "R" is not contained
in "subset"
4. so, evaluation of "R^1" returns no revision
This patch evaluates sub expressions for predicates above with "entire
revisions in the repository".
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 19 Jan 2013 04:08:16 +0100] rev 18472
test-rebase: add another test for rebase with multiple roots
This test the case when a Merge is dropped.
Kevin Bullock <kbullock@ringworld.org> [Mon, 21 Jan 2013 13:47:10 -0600] rev 18471
update: update to current bookmark if it moved out from under us (
issue3682)
If the current bookmark (the one listed in .hg/bookmarks.current)
doesn't point to a parent of the working directory, e.g. if it was moved
by a pull, use that as the update target instead of the tipmost
descendent.
A small predicate is (finally) added to the bookmarks module to check
whether the current bookmark is also active.