Commit Graph

18416 Commits

Author SHA1 Message Date
Mads Kiilerich
a13d45eee6 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.
2013-02-04 02:46:53 +01:00
Mads Kiilerich
52235c623d 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.
2013-01-24 23:57:44 +01:00
Mads Kiilerich
7251dc2f89 largefiles: verify status should be written as status, not as write
Make 'hg verify --large -q' quiet when no errors.
2013-02-04 02:46:53 +01:00
Mads Kiilerich
293a08a6ab 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.
2013-02-04 02:46:53 +01:00
Mads Kiilerich
4310c010e8 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.
2013-02-04 02:46:53 +01:00
Mads Kiilerich
2ec21b22f5 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.
2013-02-04 02:46:53 +01:00
Mads Kiilerich
c2bd1c416f merge: backout manifest sorting and workarounds for cost of it
Backout f6ac62c2cfa7 and 14f4258e3526 which no longer are needed.
2013-02-04 02:46:38 +01:00
Mads Kiilerich
ee476759ff merge: delay debug messages for merge actions
Show messages at a point where the actions have been sorted, thus preparing for
backout of 14f4258e3526.

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.)
2013-01-24 23:57:44 +01:00
Mads Kiilerich
3da557a087 merge: make all action tuples have the same length - keep args as tuple 2013-01-24 23:57:44 +01:00
Mads Kiilerich
e4cb2af2e8 merge: delay prompts a bit and show them in (extra) sorted order
Preparing for backout of 14f4258e3526.

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.
2013-01-24 23:57:44 +01:00
Antonio Zanardo
a6143a0b42 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.
2013-02-02 15:37:17 -02:00
Paul Cavallaro
a9ed690f88 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.
2013-01-23 09:51:45 -08:00
Paul Cavallaro
4a3134830c 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.
2013-01-28 12:19:21 -08:00
Matt Mackall
864c1a6a4b Added signature for changeset f7a78f4b1e24 2013-02-01 15:32:05 -06:00
Matt Mackall
e9b043669f test-obsolete: now gets 404 for hidden change 2013-02-01 15:21:47 -06:00
Matt Mackall
57ef18c167 merge with i18n 2013-02-01 15:23:37 -06:00
Wagner Bruna
d44ceb0fca i18n-pt_BR: added message from crew dd76c32468da 2013-02-01 17:59:56 -02:00
Thomas Arendsen Hein
6ca8967a44 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.
2013-02-01 20:43:35 +01:00
Matt Mackall
a1152e87ba merge with crew 2013-02-01 15:14:05 -06:00
Kevin Bullock
21ba139cdc hgweb: rename 'currentbaseline' template keyword to 'basenode'
Shorter and clearer. This keyword represents the node we're currently
diffing against.
2013-02-01 10:12:41 -06:00
Kevin Bullock
3cf3843b51 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}
2013-02-01 09:58:25 -06:00
Wagner Bruna
4ac90b302c i18n-pt_BR: added message from crew 988dc3549f2a 2013-02-01 11:01:39 -02:00
Pierre-Yves David
5b37f126e0 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.
2013-02-01 02:01:11 +01:00
Pierre-Yves David
6c0cbcf3ba hgweb: remove baseline info from paper template
The user interface introduced in 3ff83729b63f 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.
2013-02-01 05:40:06 +01:00
Kevin Bullock
6246126341 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.
2013-01-31 20:01:26 -06:00
Angel Ezquerra
b6d710beb8 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.
2013-01-31 22:36:22 +01:00
Pierre-Yves David
32e4185163 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)
2013-01-31 19:56:55 +01:00
Pierre-Yves David
090c6ed52d 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.
2013-01-31 22:30:52 +01:00
FUJIWARA Katsunori
962e6be476 i18n-ja: synchronized with 97aaac321ced 2013-01-31 23:01:31 +09:00
Wagner Bruna
514476f23a i18n-pt_BR: synchronized with 7b9e5c3bdea7 2013-01-31 09:58:36 -02:00
Pierre-Yves David
271a03e73f 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.
2013-01-31 01:44:29 +01:00
Mads Kiilerich
d04afd8fe1 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 9eb533d10f1a ... but it has apparently
also been seen before. I don't see anything in 9eb533d10f1a 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.)
2013-01-31 19:13:13 +01:00
Siddharth Agarwal
eb2c7139a5 rebase: delete divergent bookmarks on destination (issue3685)
Similar to merge, divergent bookmarks are only deleted when the bookmark is on
the destination parent.
2013-01-30 16:08:32 -08:00
Siddharth Agarwal
f56fcc5796 bookmarks: factor out delete divergent code
Deleting divergent bookmarks is more generally useful than just in
bookmarks.update.
2013-01-30 15:35:00 -08:00
Siddharth Agarwal
dd1e6af7ac 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.
2013-01-30 17:49:54 -08:00
Matt Harbison
b344797c5f share: backout f48752441ca0, 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.
2012-11-27 21:31:59 -05:00
Matt Harbison
90844b4729 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 f48752441ca0 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.
2012-11-27 20:56:27 -05:00
Pierre-Yves David
f7afd60d70 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.
2013-01-22 14:33:17 +01:00
Mads Kiilerich
8d4726b241 tests: use pwd instead of ${PWD} in test-convert-git.t - because of Solaris 2013-01-31 02:39:55 +01:00
Augie Fackler
404721d3a3 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.
2013-01-30 10:57:28 -05:00
Mads Kiilerich
4f2a779466 tests: fix for windows - slashes and no serve 2013-01-30 19:40:07 +01:00
Mads Kiilerich
adb98eb255 merge: fix UnboundLocalError (issue3791)
A wrong variable name was introduced in 84dc2a17eab4 for a case without test
coverage.

The variable name is fixed and a test case is introduced.
2013-01-30 19:29:36 +01:00
Yuya Nishihara
26e354a203 parsers: fix memleak of revlog cache entries on strip
Since 2852b9b207e9, 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.
2013-01-28 19:05:35 +09:00
Pierre-Yves David
11f4fbd0aa hgweb: fix navigation label (issue3792)
Latest refactoring (6653e43a8a16) was buggy and used a variable from
another loop.  Tests are run on repo too small to cache that.
2013-01-30 17:32:17 +01:00
Mads Kiilerich
aaa8484e61 profiling: add documentation of lsprof 'sort' and 'nested' 2013-01-29 20:03:51 +01:00
Mads Kiilerich
bba6c5042a 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 e7a5733d533f.

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.
2013-01-29 17:01:41 +01:00
Mads Kiilerich
e8e2c1e1fe 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.
2013-01-29 20:03:51 +01:00
Pierre-Yves David
b88b8cae5d 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.
2013-01-29 15:25:33 +01:00
Pierre-Yves David
d3771a5324 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.
2013-01-29 15:26:10 +01:00
Pierre-Yves David
efe098ab89 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.
2013-01-29 16:44:51 +01:00