Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 30 Apr 2013 13:53:49 +0200] rev 19094
hgweb: handle filtered "0" rev in navigation
Before this changeset, navigation generation crashed if revision "0" was
filtered. We introduce a `_first` methods on revision navigation that return the
lowest unfiltered element and use it in two place were the "0" changeset was
explicitly referenced.
Test case are introduced.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 30 Apr 2013 15:11:12 +0200] rev 19093
hgweb: fix empty navigation detection
For some obscure reason, changelog.node(0) returns nullid if changelog is empty.
this break empty navigation detection. We fix this code by using the length of
the changelog.
Using the length have some issue with revision filtering but this is a small
step in the right direction. Proper fix comes in later changeset.
Jim Hague <jim.hague@acm.org> [Tue, 30 Apr 2013 14:56:33 +0100] rev 19092
tests: AIX can't handle negative date in test-dirstate.t
test-dirstate.t fails on AIX in the absurd date test. AIX touch errors on
any date prior to 1970. AIX mktime() gives an error on such dates, so the
problem is deeper than touch and attempts to work around touch in Python
failed.
Give up. Add an AIX test to hghave and skip the absurd date test on AIX.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 26 Apr 2013 01:12:03 +0900] rev 19091
win32: use explicit path to "python.exe" only if it exists
Before this patch, "hg.bat" for Windows environment always uses
"%~dp0..\python" as explicit path to "python.exe".
This path may not be valid in some cases.
For example, on the environment using "virtualenv" python package,
both "python.exe" and "hg.bat" are placed in the same directory. In
this case, "python.exe" should be found on PATH, because virtualenv
activation script puts "python.exe" on the PATH.
This patch uses explicit path to "python.exe" only if it exists, and
expects that "python.exe" can be found on PATH otherwise.
Siddharth Agarwal <sid0@fb.com> [Fri, 26 Apr 2013 22:07:25 -0700] rev 19090
test-mq-strip.t: add a test for strip --keep with clean working dir
This helped uncover a bug in a patchset I've been writing.
Mads Kiilerich <madski@unity3d.com> [Sat, 27 Apr 2013 00:41:42 +0200] rev 19089
largefiles: use repo.wwrite for writing standins (
issue3909)
Mads Kiilerich <madski@unity3d.com> [Fri, 26 Apr 2013 19:04:01 +0200] rev 19088
largefiles: drop repo wrapping detection
After
257afe5489d4 I see:
$ hg id -q
largefiles: repo method 'commit' appears to have already been wrapped by another extension: largefiles may behave incorrectly
largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly
be207d9b7e4b
The warning is bad:
* The message gives no hint what the problem is and how it can be resolved.
The message is useless.
* Largefiles do have its share of problems, but I don't think I ever have seen
a problem where this warning would have helped. The 'may' in the warning
seems like an exaggeration of the risk. Having largefiles enabled in
combination with for instance mq, hggit and hgsubversion causes a warning
(depending on the configuration order) but do not cause problems. Extensions
might of course be incompatible, but they can be that in many other ways.
The check and the message are incorrect.
It would thus be better to remove the check and the warning completely.
Before
257afe5489d4 the check always failed. That change made the check work
more like intended ... but the intention was wrong. This change will thus also
back that change out.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 26 Apr 2013 23:36:12 +0900] rev 19087
config: discard "%unset" values defined in the other files read in previously
Before this patch, "%unset" can't unset values defined in the other
files read in previously, even though online help document says that
it can. It can unset only values defined in the same configuration
file.
For example, the value defined in "~/.hgrc" can't be unset by "%unset"
in ".hg/hgrc" of the repository.
This patch records "%unset"-ed values in "config.parse()", and
discards corresponding values in "config.update()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 26 Apr 2013 23:16:25 +0900] rev 19086
tests: rename from test-config-case.t to test-config.t for centralization
Before this patch, there is no test script testing configuration
handling generally. "test-config-case.t" seems to be specific for
testing case sensitive configuration.
This patch renames from "test-config-case.t" to "test-config.t" for
centralization of tests around configuration handling.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 25 Apr 2013 20:48:49 +0900] rev 19085
i18n: show the non-ASCII password prompt text correctly
Before this patch, the prompt text for asking password is directly
passed to "getpass.getpass()" of Python standard library.
In "getpass.getpass()" implementation on Windows environment, the
prompt text is split into byte sequence and "msvcrt.putch()" is
applied on each bytes in it. This splitting causes non-ASCII prompt
text to be broken.
This patch shows the prompt text for asking password on "ui.getpass()"
side, and invokes "getpass.getpass()" with empty prompt text. This
prevents non-ASCII prompt text from being broken in
"getpass.getpass()" implementation.
This patch also sets "ui.prompt" label to prompt text to follow
"ui.prompt()" style.
Kevin Bullock <kbullock@ringworld.org> [Tue, 23 Apr 2013 17:26:00 -0500] rev 19084
tests: make sed usage in test-unionrepo.t cross-platform
Usage of the 'i' command proves tricky. I tried to write a check-code rule, but
failed.
Kevin Bullock <kbullock@ringworld.org> [Tue, 23 Apr 2013 16:57:51 -0500] rev 19083
check-code: fix sed 'i' command rule newline matching
The regular expression was meant to match cases where an 'i' command was
not followed by precisely a '\' and then a newline; it failed to match
the newline, so cases with a '\' but no newline would erroneously pass.
Durham Goode <durham@fb.com> [Mon, 22 Apr 2013 18:00:59 -0700] rev 19082
blackbox: don't run permission tests on non-unix systems
The windows and vfat test runs were failing due to read/write permissions not
working the same on those systems. On vfat, permissions can't be changed
at all, and on windows it seems the chmod emulation doesn't remove read
permissions. We could theoretically get the 'cannot write to blacklog.log'
test to pass on windows but there's no #if condition to let us exclude vfat
only.
Verified that test-blackbox passes on windows now.
Kevin Bullock <kbullock@ringworld.org> [Mon, 22 Apr 2013 16:50:08 -0500] rev 19081
check-code: expand sed rule to include more offenders
Expands the rule added in
5e4491c114b2 to include cases where the
address is a line number instead of a regular expression, and fixes an
instance of this pattern in test-unionrepo.t.
Kevin Bullock <kbullock@ringworld.org> [Mon, 22 Apr 2013 16:33:28 -0500] rev 19080
check-code: add a rule against a GNU sed-ism
BSD sed requires the 'i' command to be followed with a backslash and a
newline, like so:
$ sed -e '/^@/i\
> other'
We've encountered this problem before, e.g. in test-mq.t (
900767dfa80d).
This change adds a check-code rule and fixes two instances of the
problem in test-record.t.
Alexander Plavin <me@aplavin.ru> [Mon, 22 Apr 2013 12:27:56 +0400] rev 19079
hgweb: make help verbose again (
issue3899)
Due to regression introduced in
f5db3092790f, help in hgweb
was rendered in non-verbose form (
issue3899)
Matt Mackall <mpm@selenic.com> [Sun, 21 Apr 2013 17:33:51 -0500] rev 19078
merge with i18n
Wagner Bruna <wbruna@softwareexpress.com.br> [Sat, 20 Apr 2013 19:01:36 -0300] rev 19077
i18n-pt_BR: synchronized with
64ea454e7d76
Alexander Plavin <me@aplavin.ru> [Sat, 20 Apr 2013 16:46:38 +0400] rev 19076
css: remove repeated property
'margin' property was repeated for the same selector
Alexander Plavin <me@aplavin.ru> [Sat, 20 Apr 2013 22:09:17 +0400] rev 19075
css: fixed font-family
There is no 'sans' font-family, replaced with 'sans-serif'
Siddharth Agarwal <sid0@fb.com> [Fri, 19 Apr 2013 22:03:59 -0700] rev 19074
color: add a test with extension loaded and ui.formatted=False
Siddharth Agarwal <sid0@fb.com> [Fri, 19 Apr 2013 16:57:10 -0700] rev 19073
color: set _colormode to None when mode is unset (
issue3895)
Previously, colorui assumed that it would only be called when mode wasn't
None.
7ae12ce87594 changed that, so now colorui needs to care about whether it
should colorize output.
Siddharth Agarwal <sid0@fb.com> [Fri, 19 Apr 2013 16:57:20 -0700] rev 19072
color: turn colorui functions into forwards when color is None
colorui will be set to None as necessary in an upcoming patch.
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 19 Apr 2013 18:26:35 -0300] rev 19071
largefiles: fix typos in documentation
Durham Goode <durham@fb.com> [Fri, 19 Apr 2013 10:55:11 -0700] rev 19070
translations: change label integer error to not specify the kind of label
The current error message used the kind (bookmark, branch, tag) in the message.
Unfortunately this isn't easily translatable since some languages give different
genders to these words. The fix is to not specify it at all, since it should be
implicit based on the command the user just ran.
Relevant discussions around this area:
http://selenic.com/pipermail/mercurial-devel/2012-October/045567.html
http://selenic.com/pipermail/mercurial-devel/2012-October/045600.html
Matt Mackall <mpm@selenic.com> [Thu, 18 Apr 2013 23:50:15 -0500] rev 19069
Added signature for changeset
292cd385856d
Matt Mackall <mpm@selenic.com> [Thu, 18 Apr 2013 23:50:08 -0500] rev 19068
Added tag 2.6-rc for changeset
292cd385856d
Matt Mackall <mpm@selenic.com> [Thu, 18 Apr 2013 23:46:26 -0500] rev 19067
merge default int stable for 2.6 code freeze
Bryan O'Sullivan <bryano@fb.com> [Thu, 18 Apr 2013 16:17:59 -0700] rev 19066
blackbox: automatically rotate log files
If enabled, log rotation prevents the amount of space used by the
blackbox log from growing without bound. This becomes important in
cases where there are a lot of busy repositories managed by humans
and automation on many machines.
In large deployments, we cannot reasonably track all the repos where
blackbox logs need to be managed, so it is safer to have blackbox
manage its own logs than to move responsibility to an external tool
such as logrotate.
This change adds two configuration keys:
* blackbox.maxsize is the maximum allowable size of the current log
* blackbox.maxfiles is the number of log files to maintain
Bryan O'Sullivan <bryano@fb.com> [Thu, 18 Apr 2013 12:58:28 -0700] rev 19065
ui: add a configbytes method, for space configuration
This accepts a floating point number, followed by optional whitespace,
followed by an optional one- or two-letter unit specifier (for
bytes, kilobytes, megabytes, or gigabytes).
Simon Heimberg <simohe@besonet.ch> [Thu, 18 Apr 2013 23:53:39 +0200] rev 19064
mq: do not inherit settings form base repo in mqrepo (Fixes
issue2358)
This is done by using repo.baseui when creating the queue repo.
Simon Heimberg <simohe@besonet.ch> [Thu, 18 Apr 2013 23:53:24 +0200] rev 19063
color: set the ui class in reposetup, before a repo is created
Previously only the class of repo.ui was set. The class was set in the wrapper
of dispatch._runcommand. But this is called after the repo is created. Only
the class of repo.ui is set because repo.baseui already exists and is not
accessible.
We now set the class in uisetup because this is called before repo creation.
This is also the place suggested in the wiki for modifying classes.
André Sintzoff <andre.sintzoff@gmail.com> [Thu, 18 Apr 2013 20:28:38 +0200] rev 19062
parsers: remove warning: format ‘%ld’ expects argument of type ‘long int’
gcc 4.6.3 on 12.04 Ubuntu machine emits warnings:
mercurial/parsers.c: In function ‘find_deepest’:
mercurial/parsers.c:1288:9: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 3 has type ‘Py_ssize_t’ [-Wformat]
mercurial/parsers.c:1288:9: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 4 has type ‘Py_ssize_t’ [-Wformat]
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 18 Apr 2013 19:50:04 +0900] rev 19061
annotate: discard refcount of discarded annotation for memory efficiency
Before this patch, refcount (managed in "needed") of the annotation
result is kept as 1, even if corresponding annotation result is
discarded from "hist", because it isn't decreased and discarded.
In the history tree including merging revision, the most recent common
ancestor of merged revisions is scanned twice. Refcount of such
ancestor never becomes 0, because refcount is started from 1 at the
second scanning.
This prevents annotation results of merging revision in "hist" from
being discarded, and decreases memory efficiency.
This patch discards refcount of the annotation result, when the
corresponding annotation is discarded from "hist".
Alexander Plavin <me@aplavin.ru> [Thu, 18 Apr 2013 16:46:09 +0400] rev 19060
revlog: fix a regression with null revision
Introduced in the patch which fixes
issue3497
Part of that patch was erroneously submitted and it shouldn't be in the code
Siddharth Agarwal <sid0@fb.com> [Thu, 18 Apr 2013 14:28:06 -0700] rev 19059
rebase: check no-op before checking phase (
issue3891)
This could lead to user confusion, because phases aren't really involved at
all when attempting to perform a no-op rebase.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 10 Apr 2013 19:27:49 -0500] rev 19058
template: call runtemplate on the src argument to sub
This allows using a template keyword on calls to the sub function and brings
the function inline with most other semantics of the other template functions.
Mads Kiilerich <madski@unity3d.com> [Wed, 17 Apr 2013 03:41:34 +0200] rev 19057
run-tests: introduce --random for running tests in random error
This is convenient when investigating failures one by one to avoid running the
same fixed tests first every time.
Mads Kiilerich <madski@unity3d.com> [Wed, 17 Apr 2013 03:41:11 +0200] rev 19056
largefiles: wlock in status before lfdirstate.write()
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 19:31:59 +0200] rev 19055
transplant: use set for prune lookup
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 17 Apr 2013 11:47:49 +0200] rev 19054
obsolete: extract obsolescence marker pulling into a dedicated function
Having a dedicated function will allow us to experiment with other exchange
strategies in an extension. As we have no solid clues about how to do it right,
being able to experiment is vital.
Some transaction tricks are necessary for pull. But nothing too scary.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 17 Apr 2013 11:18:36 +0200] rev 19053
obsolete: extract obsolescence marker pushing into a dedicated function
Having a dedicated function will allows us to experiment with other exchange
strategies in an extension. As we have no solid clues about how to do it right,
being able to experiment is vital.
I intended a more ambitious extraction of push logic, but we are far too
advanced in the release cycle for it.
Bryan O'Sullivan <bryano@fb.com> [Thu, 18 Apr 2013 12:55:58 -0700] rev 19052
blackbox: fix a case of name capture
Yuya Nishihara <yuya@tcha.org> [Fri, 19 Apr 2013 01:34:21 +0900] rev 19051
pathencode: eliminate comma at end of enum list to avoid pedantic warning
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 19 Apr 2013 01:26:23 +0900] rev 19050
smtp: use 465 as default port for SMTPS
Before this patch, port 25 (wellknown port of SMTP) is used as default
port, even if "[smtp] tls" is configured as "smtps".
This patch uses port 465 (wellknown port of SMTPS) as default port, if
"[smtp] tls" is configured as "smtps".
Kevin Bullock <kbullock@ringworld.org> [Thu, 21 Feb 2013 21:05:06 +0000] rev 19049
subrepo: fix test breakage introduced in
2b34d004e644
The test didn't break when I originally committed it (git version
1.7.12.4 (Apple Git-37)), and still doesn't on that machine, but the
output changes elsewhere with "Warning: you are leaving N commits
behind..."
This change sets a ref on the commit we're updating the subrepo _away_
from to quash the warning.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 15:27:50 +0200] rev 19048
histedit: more precise user message when changeset is missing
Now that we explicitly detect duplicated changesets, we can explicitly
detect missing ones. We cover the same cases as before, some others
and we offer a better error message in all cases.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 15:22:24 +0200] rev 19047
histedit: protect against duplicated entries
Before this change one would issue rules with duplicated entries. For
this to happen some other changeset had to be missing to maintain the
rules length.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 15:13:35 +0200] rev 19046
histedit: track short hash instead of changectx object
This simplifies set usage and allow us to add a missing revision check
in a later commit.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 15:10:01 +0200] rev 19045
histedit: ensure rules return short hex at all time
Handling homogeneous data is both simpler and safer.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 13:51:27 +0200] rev 19044
histedit-test: test unknown command
We had no tested for this case.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 13:50:59 +0200] rev 19043
histedit-test: test unknown changeset
We had no tested for this case.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 13:49:32 +0200] rev 19042
histedit-test: test malformed line
We had not tested for this case.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 11:54:31 -0400] rev 19041
histedit-test: test that extra revisions are detected
We had not tested for this case.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 11:53:58 -0400] rev 19040
histedit-test: test that missing revisions are detected
We had not tested for this case.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 11:52:34 -0400] rev 19039
histedit: handle multiple spaces between action and hash (
issue3893)
There is some clue that the previous code intended to handle that but it was
actually not the case.
As a result action could apply to the empty string '' changeset,
leading to the use the current working directory parent in some
operations.
Brendan Cully <brendan@kublai.com> [Fri, 01 Feb 2013 15:00:23 -0800] rev 19038
http2: sane readline
It turns out that it pays off to read more than a byte at a time with
a select in between :)
Brendan Cully <brendan@kublai.com> [Fri, 01 Feb 2013 14:41:35 -0800] rev 19037
http2: make read use pushchunk/popchunk, eschew itertools
The itertools approach was showing up high in the profile output.
Brendan Cully <brendan@kublai.com> [Fri, 01 Feb 2013 14:41:33 -0800] rev 19036
http2: track available data as it changes instead of recomputing it
With a large amount of available data, this computation can become
costly.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 13:38:49 +0200] rev 19035
histedit-test: rename histedit-revspec into histedit-argument
We have no testing for argument. This small file seems perfect once but needs a
rename.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 13:35:43 +0200] rev 19034
histedit-test: remove unnecessary graphlog extension
Graphlog is now in core.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 18 Apr 2013 13:34:43 +0200] rev 19033
histedit-test: drop skip logic for older mercurial version
We are shipped in core now.
Wagner Bruna <wbruna@softwareexpress.com.br> [Mon, 15 Apr 2013 18:57:04 -0300] rev 19032
hgweb: refactor checks for granting and revoking user permissions
Provides an entry point for extensions implementing more complex
authorization schemes.
Original patch proposed by Markus Zapke-Gründemann.
Matt Mackall <mpm@selenic.com> [Wed, 17 Apr 2013 14:38:02 -0500] rev 19031
check-code: add check for lock release order
Matt Mackall <mpm@selenic.com> [Wed, 17 Apr 2013 12:57:26 -0500] rev 19030
parsers: fix variable declaration position issue
Nikolaj Sjujskij <sterkrig@myopera.com> [Wed, 17 Apr 2013 21:06:48 +0400] rev 19029
zsh_completion: complete all files for `commit/backout --logfile`
Up until now commit/backout `--logfile` option was completed only with
*.txt-files. This requirement is a bit too strong (and is nowhere to be stated)
so it's better to complete with all files.
Stolen from zsh.git repo,
c5fce37b changeset by Oliver Kiddle.
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 19:20:23 +0200] rev 19028
transplant: improve documentation
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 19:18:38 +0200] rev 19027
transplant: clarify what --branch do - it has nothing to do with branches
--branch specifies heads and has nothing to do with named branches, and it only
deals with topological branches to the same extent as all other DAG operations
do.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 17 Apr 2013 10:25:14 +0200] rev 19026
import: inline checkexact function
We have a sngle call now, no need to make it a function.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 17 Apr 2013 10:22:28 +0200] rev 19025
import: factor out checkexact
The two calls are strictly identical. We can simply move it after the if/else
clause.
Mads Kiilerich <madski@unity3d.com> [Wed, 17 Apr 2013 03:41:08 +0200] rev 19024
amend: fix unlocking order - first lock then wlock
Mads Kiilerich <madski@unity3d.com> [Wed, 17 Apr 2013 03:40:18 +0200] rev 19023
codingstyle: remove trailing spaces in various text files
Better do it once than see random changes in diffs later.
Mads Kiilerich <madski@unity3d.com> [Wed, 17 Apr 2013 03:39:36 +0200] rev 19022
tests: run check-code on Python files without .py extension
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 21:14:50 +0200] rev 19021
histedit: move outgoing processing to its own function
Every piece of code extracted from the main command is a win. We simplify
changeset determination in the process. Parent ceases being a list before
becoming a node. We how have a root variable containing a node all the time.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 21:17:13 +0200] rev 19020
histedit: move all arguments checks to the beginning of the command
This changeset move all checks and raises related to arguments
validation to the top of the file. This gathers all the logic in one
place and clarifies the code doing actual work. This paves the way for
splitting this gigantic function in separated functions.
A `goal` variable is introduced in the process. It holds the action to
be done by this invocation (new, continue or abort).
An invalid invocation is found in the process (the new code is a bit stricter).
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 21:57:25 -0500] rev 19019
histedit-test: generalise --commands "-" usage
This is simpler than temporary file version. There some minor test
changes since commit messages are no longer modifed. There is still
some tests using --commands with a real file.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 20:48:37 +0200] rev 19018
histedit: allow "-" as a command file
When "-" is specified as a command file, we read rules from stdin. Alter a
single test to demo the behavior, but most of them could benefit from this.
There is minor change in test output resulting from the fact we no
longer change log messages.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 16:58:25 +0200] rev 19017
histedit: properly handle --continue on empty fold
When all changes from the fold have been dropped, the --continue code was
confused. This changeset handles this case.
The test for this case existed but was broken.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 20:50:17 +0200] rev 19016
histedit-test: replace obscure python script by a plain file
One of the tests uses a python script to edit the histedit commands on
the fly. It was hard to read and likely to break. This is replaced by
a plain command file.
Doing so made me discover that the python script is incorrect. The
"+6" regexp never matched because the revision number is wrong.
This error is kept in the replacement for now. Fixing the histedit command
triggers a traceback in histedit.
A later changeset will fix the error and restore the intended test.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 16:22:38 +0200] rev 19015
test: improve documentation of some histedit tests
Each test section is clearly separated from the others and gains some
helpful documentation.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 23:24:52 +0200] rev 19014
test: use a lighter log style in histedit test
The default log displays a log of information that is useless for
histedit tests. Having a cleaner log help readability of those tests a
lot.
This does not change anything to the test semantic.
Kevin Bullock <kbullock@ringworld.org> [Tue, 16 Apr 2013 22:00:41 -0500] rev 19013
subrepo: add regression test for
issue3870
pozheg <pozheg@gmail.com> [Tue, 16 Apr 2013 22:00:05 -0500] rev 19012
subrepo: clone of git sub-repository creates incorrect git branch (
issue3870)
Mercurial handles git subrepos by incorrect way.
If the mercurial repo has a git sub-repo and somebody started
a new branch in the subrepo and push it into git, the next one
who will clone the whole repo will get incorrect branch name in the git
subrepo.
Siddharth Agarwal <sid0@fb.com> [Tue, 16 Apr 2013 14:39:37 -0700] rev 19011
dispatch: print 'abort:' when a pre-command hook fails (BC)
This also changes the exit code from whatever the hook returned to 255. This
brings it in line with all the other hooks that abort.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:31:56 +0200] rev 19010
largefiles: don't hash all largefiles when initializing a lfdirstate
The largefiles will be hashed on demand if necessary ... and sometimes it isn't
necessary.
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 00:40:21 +0200] rev 19009
largefiles: use filechunkiter for iterating largefile when serving getlfile
The default file iterator is line based and will give odd chunk sizes - often
very short and relatively expensive.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:37:43 +0200] rev 19008
largefiles: stat all largefiles in one batch before downloading
This avoids a lot of expensive roundtrips to remote repositories ... but might
be slightly slower for local operations.
This will also change some aborts on missing files to warnings. That will in
some situations make it possible to continue working on a repository with
missing largefiles.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:34:36 +0200] rev 19007
largefiles: 'put' should store 'source' file in under 'hash', also in localstore
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 04:35:10 +0200] rev 19006
largefiles: getlfile must hit end of HTTP chunked streams to reuse connections
We did read the exactly the right number of bytes from the response body. But
if the response came in chunked encoding then that meant that the HTTP layer
still hadn't read the last 0-sized chunk and expected the app layer to read
more data from the stream. The app layer was however happy and sent another
request which had to be sent on another HTTP connection while the old one was
lingering until some other event closed the connection.
Adding an extra read where we expect to hit the end of file makes the HTTP
connection ready for reuse. This thus plugs a real socket leak.
To distinguish HTTP from SSH we look at self's class, just like it is done in
putlfile.
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 01:55:57 +0200] rev 19005
largefiles: drop limitreader, use filechunkiter limit
filechunkiter.close was a noop.
Mads Kiilerich <madski@unity3d.com> [Tue, 16 Apr 2013 01:46:39 +0200] rev 19004
largefiles: move protocol conversion into getlfile and make it an iterable
Avoid the intermediate limitreader and filechunkiter between getlfile and
copyandhash - return the right protocol and put the complexity where it better
can be managed.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:47:04 +0200] rev 19003
largefiles: don't close the fd passed to store._getfile
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:43:50 +0200] rev 19002
largefiles: remove blecch from lfutil.copyandhash - don't close the passed fd
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:43:44 +0200] rev 19001
largefiles: drop lfutil.blockstream - use filechunkiter like everybody else
The old chunk size is kept - just to avoid changing it.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:35:43 +0200] rev 19000
largefiles: refactoring - use findfile in localstore._getfile
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:35:18 +0200] rev 18999
largefiles: refactoring - return hex from _getfile and copyandhash
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 23:32:33 +0200] rev 18998
largefiles: refactoring - create destination dir in lfutil.link
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 09 Apr 2013 23:40:11 +0900] rev 18997
summary: clear "commonincoming" also if branches are different
Before this patch, "commonincoming" calculated by
"discovery.findcommonincoming()" is cleared, only if "default" URL
without branch part (tail "#branch" of URL) differs from
"default-push" URL without branch part.
But common revisions in "commonincoming" calculated for a branch
doesn't include ones for another branch, even if URLs without branch
part are same. The result of "discovery.findcommonoutgoing()"
invocation with such "commonincoming" becomes incorrect in some cases.
This patch clears "commonincoming", also if branch part of "default"
differs from one of "default-push".
To avoid redundant looking up:
- "ui.expandpath('default')" and "ui.expandpath('default-push',
'default')" are not compared directly, even though they contain
branch information, because they are not yet normalized by
"hg.parseurl()": tail "/" of path, for example
- "commonincoming" is not cleared, if branch isn't specified in
"default" URL, because such "commonincoming" contains common
revisions for all branches
This patch also tests "different path, same branch" pattern to check
careless degrading around comparison between source and destination.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 09 Apr 2013 23:40:11 +0900] rev 18996
summary: make "incoming" information sensitive to branch in URL (
issue3830)
Before this patch, "incoming" information of "hg summary --remote" is
not sensitive to the branch specified in the URL of the destination
repository, even though "hg pull"/"hg incoming" are so.
Invocation of "discovery.findcommonincoming()" without "heads"
argument treats revisions on branches other than the one specified in
the URL as incoming ones unexpectedly.
This patch looks head revisions, which are already detected by
"hg.addbranchrevs()" from URL, up against "other" repository, and
invokes "discovery.findcommonincoming()" with list of them as "heads"
to limit calculation of incoming revisions.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 09 Apr 2013 23:40:10 +0900] rev 18995
histedit: make "hg histedit" sensitive to branch in URL
Before this patch, "hg histedit" are not sensitive to the branch
specified in the URL of the destination repository, even though "hg
push"/"hg outgoing" are so:
Invocation of "discovery.findcommonoutgoing()" without "onlyheads"
argument treats revisions on branches other than the one specified in
the URL as outgoing ones unexpectedly.
This patch specifies list of head revisions, which are already
detected by "hg.addbranchrevs()" from URL and looked up against local
repository, as "onlyheads" to "discovery.findcommonoutgoing()" to
limit calculation of outgoing revisions.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 09 Apr 2013 23:40:10 +0900] rev 18994
summary: make "outgoing" information sensitive to branch in URL (
issue3829)
Before this patch, "outgoing" information of "hg summary --remote" is
not sensitive to the branch specified in the URL of the destination
repository, even though "hg push"/"hg outgoing" are so:
Invocation of "discovery.findcommonoutgoing()" without "onlyheads"
argument treats revisions on branches other than the one specified in
the URL as outgoing ones unexpectedly.
This patch looks head revisions, which are already detected by
"hg.addbranchrevs()" from URL, up against local repository, and
invokes "discovery.findcommonoutgoing()" with list of them as
"onlyheads" to limit calculation of outgoing revisions.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 29 Mar 2013 22:57:16 +0900] rev 18993
annotate: increase refcount of each revisions correctly (
issue3841)
Before this patch, refcount (managed in "needed") of parents of each
revisions in "visit" is increased, only when parent is not annotated
yet (examined by "p not in hist").
But this causes less refcount of the revision like "A" in the tree
below ("A" is assumed as the second parent of "C"):
A --- B --- C
\ /
\-----/
Steps of annotation for "C" in this case are shown below:
1. for "C"
1.1 increase refcount of "B"
1.2 increase refcount of "A" (=> 1)
1.3 defer annotation for "C"
2. for "A"
2.1 annotate for "A" (=> put result into "hist[A]")
2.2 clear "pcache[A]" ("pcache[A] = []")
3. for "B"
3.1 not increase refcount of "A", because "A not in hist" is False
3.2 annotate for "B"
3.3 decrease refcount of "A" (=> 0)
3.4 delete "hist[A]", even though "A" is still needed by "C"
3.5 clear "pcache[B]"
4. for "C", again
4.1 not increase refcount of "B", because "B not in hist" is False
4.2 increase refcount of "A" (=> 1)
4.3 defer annotation for "C"
5. for "A", again
5.1 annotate for "A" (=> put result into "hist[A]", again)
5.2 clear "pcache[A]"
6. for "C", once again
6.1 not increase refcount of "B", because "B not in hist" is False
6.2 not increase refcount of "A", because "A not in hist" is False
6.3 annotate for "C"
6.4 decrease refcount of "A", and delete "hist[A]"
6.5 decrease refcount of "B", and delete "hist[B]"
6.6 clear "pcache[C]"
At step (5.1), annotation for "A" mis-recognizes that all lines are
created at "A", because "pcache[A]" already cleared at step (2.2)
prevents from scanning ancestors of "A".
So, annotation for "C" or its descendants loses information about "A"
or its ancestors.
The root cause of this problem is that refcount of "A" is decreased at
step (3.3), even though it isn't increased at step (3.1).
To increase refcount correctly, this patch increases refcount of each
parents of each revisions:
- regardless of "p not in hist" or not, and
- only once for each revisions in "visit" (by "not pcached")
In fact, this problem should occur only on legacy repositories in
which a filelog includes the merging between the revision and its
ancestor (as the second parent), because:
- tree is scanned in depth-first
without such merging, revisions in "visit" refer different
revisions as parent each other
- recent Mercurial doesn't allow such merging
changelog and manifest can include such merging someway, but
filelogs can't, because "localrepository._filecommit()" converts
such merging request to linear history.
This patch tests merging cases below: these cases are from filelog of
"mercurial/commands.py" in the repository of Mercurial itself.
- both parents are same
10 --- 11 --- 12
\_/
filelogrev: changesetid:
10
00ea3613f82c
11
fc4a6e5b5812
12
4f802588cdfb
- the second parent is also ancestor of the first one
37 --- 38 --- 39 --- 40
\________/
filelogrev: changesetid:
37
f8d56da6ac8f
38
38919e1c254d
39
d3400605d246
40
f06a4a3b86a7
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 29 Mar 2013 22:57:15 +0900] rev 18992
annotate: reuse already calculated annotation
Before this patch, annotation is re-calculated even if it is already
calculated. This may cause unexpected annotation, because already
cleared "pcache" ("pcache[f] = []") prevents from scanning ancestors.
This patch reuses already calculated annotation if it is available.
In fact, "reusable" situation should be seen only on legacy
repositories in which a filelog include the merging between the
revision and its ancestor, because:
- tree is scanned in depth-first
without such merging, annotation result should be released soon
- recent Mercurial doesn't allow such merging
changelog and manifest can include such merging someway, but
filelogs can't, because "localrepository._filecommit()" converts
such merging request to linear history.
Alexander Plavin <me@aplavin.ru> [Wed, 17 Apr 2013 00:29:54 +0400] rev 18991
log: fix behavior with empty repositories (
issue3497)
Make output in this special case consistent with general case one.
Matt Mackall <mpm@selenic.com> [Tue, 16 Apr 2013 13:22:29 -0500] rev 18990
merge with crew
Bryan O'Sullivan <bryano@fb.com> [Tue, 16 Apr 2013 10:08:20 -0700] rev 18989
revlog: don't cross-check ancestor result against Python version
Bryan O'Sullivan <bryano@fb.com> [Tue, 16 Apr 2013 10:08:20 -0700] rev 18988
parsers: a C implementation of the new ancestors algorithm
The performance of both the old and new Python ancestor algorithms
depends on the number of revs they need to traverse. Although the
new algorithm performs far better than the old when revs are
numerically and topologically close, both algorithms become slow
under other circumstances, taking up to 1.8 seconds to give answers
in a Linux kernel repo.
This C implementation of the new algorithm is a fairly straightforward
transliteration. The only corner case of interest is that it raises
an OverflowError if the number of GCA candidates found during the
first pass is greater than 24, to avoid the dual perils of fixnum
overflow and trying to allocate too much memory. (If this exception
is raised, the Python implementation is used instead.)
Performance numbers are good: in a Linux kernel repo, time for "hg
debugancestors" on two distant revs (
24bf01de7537 and
c2a8808f5943)
is as follows:
Old Python: 0.36 sec
New Python: 0.42 sec
New C: 0.02 sec
For a case where the new algorithm should perform well:
Old Python: 1.84 sec
New Python: 0.07 sec
New C: measures as zero when using --time
(This commit includes a paranoid cross-check to ensure that the
Python and C implementations give identical answers. The above
performance numbers were measured with that check disabled.)
Bryan O'Sullivan <bryano@fb.com> [Tue, 16 Apr 2013 10:08:19 -0700] rev 18987
revlog: choose a consistent ancestor when there's a tie
Previously, we chose a rev based on numeric ordering, which could
cause "the same merge" in topologically identical but numerically
different repos to choose different merge bases.
We now choose the lexically least node; this is stable across
different revlog orderings.
Bryan O'Sullivan <bryano@fb.com> [Tue, 16 Apr 2013 10:08:18 -0700] rev 18986
ancestor: a new algorithm that is faster for nodes near tip
Instead of walking all the way to the root of the DAG, we generate
a set of candidate GCA revs, then figure out which ones will win
the race to the root (usually without needing to traverse all the
way to the root).
In the common case of nodes that are close to each other in both
revision number and topology, this is usually a big win: it makes
"hg --time debugancestors" up to 9 times faster than the more general
ancestor function when measured on heads of the linux-2.6 hg repo.
Victory is not assured, however. The older function can still win
by a large margin if one node is much closer to the root than the
other, or by a much smaller amount if one is an ancestor of the
other.
For now, we've also got a small paranoid harness function that calls
both ancestor functions on every input and ensures that they give
equivalent answers.
Even without the checker function, the old ancestor function needs
to stay alive for the time being, as its generality is used by
context.filectx.merge.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 15:33:18 +0200] rev 18985
update: allow dirty update to foreground (successors)
Update to "foreground" are no longer seen as cross branch update. "Foreground"
are descendants or successors (or successors of descendants (or descendant of
successors (etc))). This allows to update with uncommited changes that get
automatically merged.
This changeset is a small step forward. We want to allow dirty update to
"background" (precursors) and takes obsolescence in account when finding the
default update destination. But those requires deeper changes and will comes in
later changesets.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Apr 2013 15:16:33 +0200] rev 18984
obsolete: extract foreground computation from bookmark.validdest
This foreground logic will be reused by update logic.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 15 Apr 2013 17:10:58 +0200] rev 18983
destroyed: invalidate phraserevs cache in all case (
issue3858)
When revisions are destroyed, the `phaserevs` cache becomes invalid in most case.
This cache hold a `{rev => phase}` mapping and revision number most likely
changed.
Since
1c8e0d6ac3b0, we filter unknown phases' roots after changesets
destruction. When some roots are filtered the `phaserevs` cache is invalidated.
But not if none root where destroyed.
We now invalidate the cache in all case filtered root or not.
This bug was a bit tricky to reproduce as in most case we either:
* rebase a set a draft changeset including root (phaserev invalidated)
* strip tip-most changesets (no re-numbering of revision)
Note that the invalidation of `phaserevs` are not strictly needed when only
tip-most part of the history have been destroyed. But I do not expect the
overhead to be significant.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:59:11 +0200] rev 18982
largefiles: deprecate --all-largefiles for pull
The same can be achieved with --lfrev pulled() and we shouldn't advertise
unnecessary command line options.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:59:11 +0200] rev 18981
largefiles: implement pull --all-largefiles as a special case of --lfrev
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:59:11 +0200] rev 18980
largefiles: drop --cache-largefiles again
This goes a step further than
d69585a5c5c0 and backs out the unreleased
--cache-largefiles option. The same can be achieved with --lfrev heads(pulled()) and
we shouldn't introduce unnecessary command line options.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:59:04 +0200] rev 18979
largefiles: introduce pulled() revset expression for use in --lfrev
This provides a general way to do what already can be done with
--all-largefiles and --cache-largefiles.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:57:16 +0200] rev 18978
largefiles: introduce pull --lfrev option
The revset will be evaluated after the changesets has been pulled, and missing
largefiles from matching revisions will be pulled to the local caches.
This in combination with revsets will make it possible to specify different
strategies for pulling largefiles.
The revset expressions used for this option might be quite complex and will
probably be most useful from scripts or an alias ... but less complicated than
configuring hooks.
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:54:43 +0200] rev 18977
largefiles: refactor overridepull internals
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:53:37 +0200] rev 18976
largefiles: introduce lfpull command for pulling missing largefiles
Mads Kiilerich <madski@unity3d.com> [Mon, 15 Apr 2013 01:46:10 +0200] rev 18975
largefiles: update help
Some clarifications, and some clean-up after --cache-largefiles was introduced.