Idan Kamara <idankk86@gmail.com> [Wed, 09 Jan 2013 20:36:53 +0200] rev 18314
rollback: don't clear the filecache
This was an old workaround to force the filecache to reload everything. Now
that the syncing issue is fixed, we no longer need it.
Idan Kamara <idankk86@gmail.com> [Wed, 09 Jan 2013 20:37:44 +0200] rev 18313
destroyed: keep the filecache in sync with __dict__ (
issue3335) (
issue3693) (
issue3743)
We need to make sure that if X is in the filecache then it's also in the
filecache owner's __dict__, otherwise it will go out of sync:
repo.X # first access to X, records stat info in
# filecache and updates __dict__
repo._filecache.clear() # removes X from _filecache but it's still in __dict__
repo.invalidate() # iterates over _filecache and removes entries
# from __dict__, but X isn't in _filecache, so
# it's kept in __dict__
repo.X # X is fetched from __dict__, bypassing the filecache
Idan Kamara <idankk86@gmail.com> [Fri, 11 Jan 2013 00:05:52 +0200] rev 18312
localrepo: write the phasecache when destroying nodes
Idan Kamara <idankk86@gmail.com> [Sat, 05 Jan 2013 16:50:12 +0200] rev 18311
localrepo: update the branchmap when destroying nodes
This was previously called directly during strip. Moving it to destroying
also means that it'll be called through _rollback, which seems harmless.
Idan Kamara <idankk86@gmail.com> [Sat, 15 Dec 2012 20:08:13 +0200] rev 18310
localrepo: introduce destroying function
Idan Kamara <idankk86@gmail.com> [Sun, 16 Dec 2012 23:13:02 +0200] rev 18309
localrepo: don't refresh filecache entries that aren't in __dict__
We call invalidate to remove properties from __dict__ because they're
possibly outdated and we'd like to check for a new version. Next time
the property is accessed the filecache mechanism checks the current stat
info with the one recorded at the last time the property was read, if
they're different it recreates the property.
Previously we refreshed the stat info on all properties in the filecache
when the lock is released, including properties that are missing from
__dict__. This is a problem because:
l = repo.lock()
repo.P # stat info S for P is recorded in _filecache
<changes are made to repo.P indirectly, e.g. underlying file is replaced>
# P's new stat info = S'
l.release() # filecache refreshes, records S' as P's stat info
At this point our filecache contains P with stat info S', but P's
version is from S, which is outdated.
The above happens during _rollback and strip. Currently we're wiping the
filecache and forcing everything to reload from scratch which works but
isn't the right solution.
Mads Kiilerich <mads@kiilerich.com> [Sat, 12 Jan 2013 16:04:29 +0100] rev 18308
changelog: please check-code and remove tabs
Tabs were introduced in
06185554e7e3.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 11 Jan 2013 18:47:42 +0100] rev 18307
branchmap: Save changectx creation during update
The newly introduced `branchmap` function allows us to skip the
creation of changectx objects. This speeds up the construction of
the branchmap.
On the mozilla repository (117293 changesets, 15490 mutable)
Before:
! impactable 19.9
! mutable 0.576
! unserved 3.16
After:
! impactable 7.03 (2.8x faster)
! mutable 0.352 (1.6x)
! unserved 1.15 (2.7x)
On the cpython repository (81418 changesets, 6418 mutable)
Before:
! impactable 15.9
! mutable 0.451
! unserved 0.861
After:
! impactable 6.55 (2.4x faster)
! mutable 0.170 (2.6x faster)
! unserved 0.289 (2.9x faster)
On the pypy repository (58852 changesets)
Before:
! impactable 13.6
After:
! impactable 6.17 (2.2x faster)
On my Mercurial repository (18295 changesets, 2210 mutable)
Before:
! impactable 23.9
! mutable 0.368
! unserved 0.057
After:
! impactable 1.31 (18x faster)
! mutable 0.042 (8.7x)
! unserved 0.025 (2.2x)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 10 Jan 2013 00:41:40 +0100] rev 18306
changelog: add a `branch` method, bypassing changectx
The only way to access the branch of a changeset is currently to
create a changectx object and access its `branch()` method. Creating
a new Python object is costly and has a huge impact on code doing
heavy access to `branch()` (like branchmap).
This change introduces a new method on changelog that allows direct
access to the branch of a revision. See the next changeset for impact.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 08 Jan 2013 01:28:39 +0100] rev 18305
branchmap: pass revision insteads of changectx to the update function
Creation of changectx objects is very slow, and they are not very
useful. We are going to drop them. The first step is to change the
function argument type.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 11 Jan 2013 18:39:43 +0100] rev 18304
perf: add perfbranchmap command
The command times the update of a branchmap from its nearest subset
or from scratch.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 11 Jan 2013 20:34:54 +0100] rev 18303
clfilter: enforce hidden filtering on all repository accesses
We ensure all repositores created through `mercurial.hg.repository`
are "hidden" filtered. This is an even stronger enforcement than
5bb610f87d1d.
Citing Matt's response to changeset
5bb610f87d1d installing filtering
in dispatch:
> Unfortunately, this means that code that doesn't go through dispatch (ie all
> those crazy misguided people using Mercurial as a library) are going to see
> these hidden changesets.
>
> Might be better to instead install the filter in localrepo construction by
> default and disable it in dispatch.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Jan 2013 21:07:04 +0100] rev 18302
archival: avoid touching deprecated gzip name attribute
The existing workaround didn't work when no filename was specified.
If running in a context with warnings enabled and subsecond mtime it gave a
warning:
DeprecationWarning: use the name attribute
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Jan 2013 21:07:04 +0100] rev 18301
archival: pass integer to struct.pack int field instead of float
If running in a context with warnings enabled and subsecond mtime it gave a
warning:
DeprecationWarning: integer argument expected, got float
Mads Kiilerich <madski@unity3d.com> [Fri, 11 Jan 2013 16:30:29 +0100] rev 18300
largefiles: fix update from a merge with removed files
A situation with this case could happen after interrupting an update. Update
would fail with:
abort: No such file or directory: $TESTTMP/f/.hglf/sub2/large6
Update from a merge without using clean is not possible anyway, so this patch
takes a step in the right direction so it gets as far as reporting the right
error.
Mads Kiilerich <madski@unity3d.com> [Fri, 11 Jan 2013 16:30:29 +0100] rev 18299
largefiles: fix revert removing a largefile from a merge
Before revert could fail with:
abort: .hglf/large@
33fdd332ec64: not found in manifest!
The LookupError will now be caught and handled correctly.
Mads Kiilerich <madski@unity3d.com> [Fri, 11 Jan 2013 16:30:29 +0100] rev 18298
largefiles: remove unused proto.refuseclient code
Should have been removed with other pre-1.9 code in
7c604d8c7e83.
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 03 Jan 2013 17:42:25 +0100] rev 18297
subrepo: make 'in subrepo' string easier to find by external tools
This patch is meant to make it easier for tools that wrap the mercurial
output (such as TortoiseHg) to find the "in subrepo MYSUBREPO" string that
(since
9e3910db4e78) is appended after subrepo error messages, particularly when
the mercurial output is translated to a non-English language.
The message remains the same but the '%s' that was used to prepend the original
error message in front of the 'in subrepo' string has been moved out of the
translatable string.
As an example of the usefulness of making it easy to look for "in subrepo
MYSUBREPO" strings, TortoiseHg looks for these strings in error messages in
order to "linkify them" (i.e. convert "MYSUBREPO" into alink to the
corresponding subrepo).
The original string made it hard for a tool such as TortoiseHg to look for the
translated string on mercurial's output because the translated string contained
the error message itself. This meant that a regular expression was required to
ignore the error message part. With this change TortoiseHg can just get the
translated "(in subrepo %s)" string, substitute %s for the subrepo path (which
it gets from the subrepo exception) and simply search for the resulting string
(no regular expression needed, or at least a much simpler regular expression
could be used).
Additionaly, the existing string could lead a translator mistakenly assume that
it was possible invert the order of the %s (error and subrepo path) fields,
which would not work because the string interpolation was position based.
Brendan Cully <brendan@kublai.com> [Thu, 10 Jan 2013 10:35:37 -0800] rev 18296
subrepo: fix python2.4 compatibility after
9aa6bee6e9f9
super(SubrepoAbort, self).__init__(*args, **kw) raises
TypeError: super() argument 1 must be type, not classobj
Christian Ebert <blacktrash@gmx.net> [Thu, 10 Jan 2013 16:25:06 +0000] rev 18295
test-keyword: improve grammar and spelling in branchcache note
See:
da9e544c69d6
Augie Fackler <raf@durin42.com> [Thu, 10 Jan 2013 09:43:28 -0500] rev 18294
Merge with stable.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 10 Jan 2013 10:25:02 +0100] rev 18293
repoview: extract hideable revision computation in a dedicated function
This will help extensions to plug into the hidden mechanism.
Mads Kiilerich <madski@unity3d.com> [Thu, 10 Jan 2013 15:33:14 +0100] rev 18292
largefiles: make update with backup files in .hglf slightly less broken
Largefiles update would try to copy f to f.orig if there was a .hglf/f.orig .
That is in many many ways very very wrong, but it also caused an abort if f
didn't exist.
Now it only tries to copy f if it exists.
Matt Mackall <mpm@selenic.com> [Wed, 09 Jan 2013 19:10:44 -0600] rev 18291
tests: fix up test-highlight for breadcrumb changes
Sean Farley <sean.michael.farley@gmail.com> [Fri, 28 Dec 2012 19:25:10 -0600] rev 18290
color: add template label function
Sean Farley <sean.michael.farley@gmail.com> [Sat, 22 Dec 2012 21:46:26 -0600] rev 18289
templater: add no-op template function 'label'
Remy Blank <remy.blank@pobox.com> [Wed, 09 Jan 2013 20:27:17 +0100] rev 18288
posix: fix split() for the case where the path is at the root of the filesystem
posixpath.split() strips '/' from the dirname *unless it is the root*. This
patch reproduces this behavior in posix.split(). The old behavior causes a
crash when creating a file at the root of the repo with localrepo.wfile()
when the repo is at the root of the filesystem.
Idan Kamara <idankk86@gmail.com> [Wed, 09 Jan 2013 21:13:52 +0200] rev 18287
record: remove unused import
Idan Kamara <idankk86@gmail.com> [Wed, 09 Jan 2013 21:11:00 +0200] rev 18286
cvsps: fix indentation
Bryan O'Sullivan <bryano@fb.com> [Wed, 09 Jan 2013 13:16:54 -0800] rev 18285
hghave: introduce a test (unused) for cvs >= 1.12
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Jan 2013 04:50:14 +0100] rev 18284
discovery: drop the visibleheads function
It has no users left. (Using filtering explicitly is easier.)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Jan 2013 04:48:22 +0100] rev 18283
clfilter: remove the last usage of `visibleheads`
We can just inline the filtering now that all server code uses
changelog filtering directly.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 05 Jan 2013 18:57:09 +0100] rev 18282
discovery: drop the visiblebranchmap function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Jan 2013 04:36:30 +0100] rev 18281
clfilter: drop extra filtering in wireprotocol
The repository used by wireprotocol is already filtered. We no
longer need to call special functions.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Jan 2013 04:37:33 +0100] rev 18280
clfilter: filter "unserved" on all wireprotocol command calls
This ensures that unserved changesets are not exposed through the
wire protocol.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Jan 2013 04:28:52 +0100] rev 18279
clfilter: drop extra filtering in localpeer
The repository used by localpeer is already filtered. We no longer
need to call a special function.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Jan 2013 04:41:11 +0100] rev 18278
clfilter: make localpeer use a repo with "unserved" filter
This changeset installs a broad filter on most repos used for
serving. This removes the need to use the `visiblehead`/`visiblebranchmap`
functions, and ensures that changesets we should not serve are in
fact never served.
We do not use filtering on hgweb yet, as there is still a number
of issues to solve there.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 04 Jan 2013 03:16:08 +0100] rev 18277
performance: speedup computation of extinct revisions
In their current state, revset calls can be very costly, as we test
predicates on the entire repository.
This change drops revset calls in favor of direct testing of the phase
of changesets.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1584 obsolete changesets,
- 13310 obsolescence markers.
Before:
! extinct
! wall 0.015124
After:
! extinct
! wall 0.009424
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 obsolete changeset,
- 1 obsolescence marker.
Before:
! extinct
! wall 0.032844
After:
! extinct
! wall 0.000066
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 04 Jan 2013 03:15:44 +0100] rev 18276
performance: speedup computation of suspended revisions
In their current state, revset calls can be very costly, as we test
predicates on the entire repository.
This change drops a revset call in favor of direct testing of the
phase of changesets.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1584 obsolete changesets,
- 13310 obsolescence markers.
Before:
! suspended
! wall 0.014319
After:
! suspended
! wall 0.009559
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 obsolete changeset,
- 1 obsolescence marker.
Before:
! suspended
! wall 0.033373
After:
! suspended
! wall 0.000053
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 04 Jan 2013 03:15:21 +0100] rev 18275
performance: speedup computation of unstable revisions
In their current state, revset calls can be very costly, as we test
predicates on the entire repository.
This change drops revset call in favor of direct testing of the
phase of changesets.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1584 obsolete changesets,
- 13310 obsolescence markers.
Before:
! unstable
! wall 0.017366
After this changes:
! unstable
! wall 0.008093
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 obsolete changeset,
- 1 obsolescence marker.
Before:
! unstable
! wall 0.045190
After:
! unstable
! wall 0.000032
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 07 Jan 2013 15:50:25 +0100] rev 18274
performance: speedup computation of mutable revisions
In their current state, revset calls can be very costly, as we test
predicates on the entire repository. The "mutable" filter is used
during branch cache loading operation. We need to make it fast.
This change drops revset calls in favor of direct testing of the
phase of a changeset.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1646 mutable revision
Before:
! mutable
! wall 0.032405
After:
! mutable
! wall 0.001469
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 mutable changeset,
Before:
! mutable
! wall 0.188636
After:
! mutable
! wall 0.000022
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 04 Jan 2013 20:19:05 +0100] rev 18273
performance: speedup computation of unserved revisions
In their current state, revset calls can be very costly, as we test
predicates on the entire repository. The "unserved" filter is used
in multiple applications, and in particular in some branch cache
loading operations. We need to make it fast.
This change drops revset calls in favor of direct testing of the
phase of a changeset.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1584 obsolete changesets,
- 13310 obsolescence markers.
Before:
! unserved
! wall 0.030477
After:
! unserved
! wall 0.011844
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 obsolete changeset,
- 1 obsolescence marker.
Before:
! unserved
! wall 0.111259
After:
! unserved
! wall 0.000084
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 04 Jan 2013 05:44:01 +0100] rev 18272
performance: speedup computation of hidden revisions
In their current state, revset calls can be very costlys, as we
test predicates on the entire repository. The hidden filter is very
widely used, and needs to be very fast.
This change drops revset calls in favor of direct revision manipulation.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1584 obsolete changesets,
- 13310 obsolescence markers.
Before:
! hidden
! wall 0.077553
After this changes:
! hidden
! wall 0.011230
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 obsolete changeset,
- 1 obsolescence marker.
Before:
! hidden
! wall 0.389472
After:
! hidden
! wall 0.000079
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 04 Jan 2013 03:14:54 +0100] rev 18271
performance: speedup computation of obsolete revisions
In their current state, revset calls can be very costly as we test
predicates on the entire repository. As obsolete computation is used
by the "hidden" filter, it needs to be very fast.
This changet drops the revset call in favor of direct testing of
the phase of a changeset.
Performance test on my Mercurial checkout
- 19857 total changesets,
- 1584 obsolete changesets,
- 13310 obsolescence markers.
Before:
! obsolete
! wall 0.047041
After:
! obsolete
! wall 0.004590
Performance test on a Mozilla central checkout:
- 117293 total changesets,
- 1 obsolete changeset,
- 1 obsolescence marker.
Before:
! obsolete
! wall 0.001539
After:
! obsolete
! wall 0.000017
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Dec 2012 12:00:08 +0100] rev 18270
clfilter: drop unnecessary explicit filtering on histedit
Hidden changeset filtering is now done at repo level. The orphaned
children computation will not include any (unless you add --hidden).
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 04 Dec 2012 14:58:19 +0100] rev 18269
clfilter: drop unnecessary explicit filtering on rebase
Hidden changeset filtering is now done at repo level. The rebaseset
computation will not include any (unless you add --hidden).
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 08 Jan 2013 20:02:53 +0100] rev 18268
clfilter: ensure that hidden filtering is working on all commands
Now that hidden changeset are filtered for all commands, we test
the behavior of `heads` and `summary` regarding hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 08 Jan 2013 20:37:37 +0100] rev 18267
clfilter: enforce hidden changeset globally
The dispatch code now enables filtering of "hidden" changesets globally. The
filter is installed before command and extension invocation. The `--hidden`
switch is now global and disables this filtering for any command.
Code in log dedicated to changeset exclusion is removed as this global filtering
has the same effect.
Denis Laxalde <denis@laxalde.org> [Tue, 08 Jan 2013 21:16:39 +0100] rev 18266
record: use patch.diffopts to account for user diffopts
This allows user defined diff options (e.g. showfunc) to be accounted for
when using record. A test has been updated accordingly.
Bryan O'Sullivan <bos@serpentine.com> [Tue, 08 Jan 2013 16:26:52 -0800] rev 18265
convert: fix most test-check-code-hg violations in cvsps code
Bryan O'Sullivan <bryano@fb.com> [Tue, 08 Jan 2013 16:16:29 -0800] rev 18264
tests: update hgweb tests to include breadcrumbs
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 03 Jan 2013 17:35:58 +0100] rev 18263
subrepo: add subrepo property to SubrepoAbort exceptions
This new property contains the path of the subrepo that generated the exception.
This information can then be used by GUI tools such as TortoiseHg.
Bryan O'Sullivan <bos@serpentine.com> [Tue, 08 Jan 2013 15:43:48 -0800] rev 18262
tests: update test-convert-cvs*.t
The preceding commit caused their outputs to change.
Frank Kingswood <frank@kingswood-consulting.co.uk> [Tue, 08 Jan 2013 20:11:20 +0000] rev 18261
cvsps: use commitids (when present) to detect changesets
Simplify core logic by no longer attempting to work around missing
class attributes. Instead always generate the attributes and ignore
the cache if the attributes are missing
Angel Ezquerra <angel.ezquerra at gmail.com> [Fri, 21 Dec 2012 02:41:07 +0100] rev 18260
hgweb, spartan: link from manifest title to changeset page
Angel Ezquerra <angel.ezquerra at gmail.com> [Fri, 21 Dec 2012 02:40:12 +0100] rev 18259
hgweb, spartan: add "URL breadcrumbs"
This change adds a "URL breadcrumb" to the "title" of the pages on the spartan
template. By title I mean the first line that is shown right below the page
selection row, which shows the name of the page that is being viewed, along with
some additional information.
In doing so it standarizes those "titles" which now follow the pattern:
URL breadcumb / page details
Angel Ezquerra <angel.ezquerra at gmail.com> [Wed, 28 Nov 2012 20:21:26 +0100] rev 18258
hgweb: add a "URL breadcrumb" to the index and repository pages
The purpose of this change is to make it much easier to navigate up the
repository tree when the hg web server is used to serve more than one
repository.
A "URL breadcrumb" is a path where each of the path items can be clicked to go
to the corresponding path page.
This lets you go up the folder hierarchy very quickly. For example, when showing
the list of repositories in http://myserver/myteams/myprojects, the following
"breadcrumb" will be shown:
Mercurial > myteams > myprojects
Clicking on "myprojects" reloads the page. Clicking on "myteams" goes up one
folder. Clicking on the leftmost "Mercurial" goes to the server root.
This "breadcrumb" also appears on all repository pages. For example on the
summary page of the repository at http://myserver/myteams/myprojects/myrepo the
following will be shown:
Mercurial > myteams > myprojects > myrepo / summary
This change has been applied to all templates that already had a link to the
main repository page (i.e. gitweb, monoblue, paper and coal) plus to the index
page of the spartan template.
In order to make the breadcumb links stand out the some of the template styles
have been customized.
Mads Kiilerich <mads@kiilerich.com> [Tue, 08 Jan 2013 04:15:46 +0100] rev 18257
merge: never do premerge on symlinks
Simplemerge is not symlink aware and will never do the right thing on symlinks.
Mads Kiilerich <mads@kiilerich.com> [Tue, 08 Jan 2013 04:15:41 +0100] rev 18256
merge: make internal merge fail cleanly on symlinks
Simplemerge is not symlink aware and will never do the the right thing on
symlinks. It would read the symlink as a file and abort with 'No such file or
directory' on dangling symlinks.
Instead, internal:merge now simply fails to merge symlinks.
Mads Kiilerich <mads at kiilerich.com> [Sun, 16 Dec 2012 20:50:57 +0100] rev 18255
debugpushkey: list keys sorted