Commit Graph

17964 Commits

Author SHA1 Message Date
Siddharth Agarwal
678c5756b6 perf: add a command to measure revset performance 2012-12-06 11:21:11 -08:00
Bryan O'Sullivan
b9868468a6 run-tests: fix whitespace nonsense 2012-12-12 15:17:18 -08:00
Bryan O'Sullivan
d3fb3d216e merge with mpm 2012-12-12 15:12:28 -08:00
Bryan O'Sullivan
5b99de5a51 run-tests: on windows, put correct python at front of PATH
The older approach of trying to copy the python executable into the test
directory was doomed to fail.

There remains one weakness with this approach: if you've run "make local",
tests may pick up the wrong extension DLLs from inside the source tree. I
don't know why this happens.

A reasonable workaround for now is to test either using --local or with
a working directory that does not contain built DLLs.
2012-12-12 14:52:58 -08:00
Siddharth Agarwal
7451427eba run-tests: fix exename on Windows 2012-12-11 15:38:42 -08:00
Bryan O'Sullivan
9547883e85 run-tests: support running tests in parallel on windows
Previously, we used os.spawnvp, which doesn't exist on Windows, and
isn't needed anyway (the command line begins with an absolute path).

We also need a slightly more convoluted way to wait for processes
without specifying an order on Windows, as it lacks os.wait.
2012-12-11 15:13:23 -08:00
Bryan O'Sullivan
66236952ea makefile: allow local builds to work on windows/mingw32 2012-12-11 13:44:00 -08:00
Bryan O'Sullivan
f09ee98abc run-tests: use correct python safely under --jobs 2012-12-10 12:14:55 -08:00
Bryan O'Sullivan
1fda6e9b5e run-tests: check for the correct python when starting 2012-12-10 12:09:02 -08:00
Bryan O'Sullivan
ae96fc1e0d run-tests: use correct python when run with --local 2012-12-10 12:07:42 -08:00
Bryan O'Sullivan
75dc399824 synthrepo: do not crash if a list is empty 2012-12-10 11:18:03 -08:00
Mads Kiilerich
0c831b0b94 check-code: make 'missing whitespace in assignment' more aggressive
New warnings:

 >     a.b=ab
 missing whitespace in assignment
(the pattern did not accept '.' on the left hand side)

 >     a=a
 missing whitespace in assignment
(the right hand side pattern never matched a single character)

 >     a=a + 7
 missing whitespace in assignment
(the pattern only matched one character after the identifier following =)
2012-12-09 23:33:16 +01:00
Mads Kiilerich
ac8e1fc147 check-code: there must also be whitespace between ')' and operator
The check pattern only checked for whitespace between keyword and operator.

Now it also warns:
 >     x = f(),7
 missing whitespace after ,
 >     x = f()+7
 missing whitespace in expression
2012-12-09 23:33:16 +01:00
Mads Kiilerich
00be1ef6f3 rm: drop misleading 'use -f' hint for the rm --after 'not removing' warning
A warning mentioning 'forgetting' or 'recording delete' would be more correct
than 'not removing' but also more confusing.
2012-12-09 23:33:16 +01:00
Mads Kiilerich
08c6ce57a8 contrib: state explicitly how hgtest.vim can be installed 2012-12-09 23:33:16 +01:00
Mads Kiilerich
eb895c5533 tests: kill daemons early, making breaking at "Accept" prompt safe 2012-12-09 23:33:16 +01:00
Angel Ezquerra
d3a4755c75 hgwebdir: do not show RSS and Atom links for plain directories
Up until now the templates that show RSS and Atom feeds on the "repository
lists" (i.e. gitweb and monoblue) showed them for all entries, including regular
folders. Clicking on those "folder RSS" links would result in an error page
being shown.

This patch hides those links for regular folders.
2012-11-27 22:24:02 +01:00
Angel Ezquerra
689bb15da1 hgweb: add branches RSS and Atom feeds
There were no RSS nor Atom feeds for the branches page. Different hgweb
templates linked to different feeds on their branches page (some linked to the
tags feed, some to the log feed and some to the unexisting branches feed).
2012-12-04 00:37:50 +01:00
Kevin Bullock
1ff9eb737c push: reunite comment with the line of code it describes 2012-12-07 12:03:37 -06:00
Kevin Bullock
2ad73cfc74 bookmarks: spelling correction in docstring 2012-12-07 11:30:38 -06:00
Kevin Bullock
9fbb5bfee2 merge: fix mistake in moved _checkcollision call from 9d2a09d53599 2012-12-06 22:07:44 -06:00
Matt Mackall
2e6f376926 windows: correctly pass a mode to S_IFMT in statfiles 2012-12-06 16:56:44 -06:00
Siddharth Agarwal
e9b46fad5b strip: make query to get new bookmark target cheaper
The current query to get the new bookmark target for stripped revisions
involves multiple walks up the DAG, and is really expensive, taking over 2.5
seconds on a repository with over 400,000 changesets even if just one
changeset is being stripped.

A slightly simplified version of the current query is

max(heads(::<tostrip> - <tostrip>))

We make two observations here.

1. For any set s, max(heads(s)) == max(s). That is because revision numbers
   define a topological order, so that the element with the highest revision
   number in s will not have any children in s.

2. For any set s, max(::s - s) == max(parents(s) - s). In other words, the
   ancestor of s with the highest revision number not in s is a parent of one
   of the revs in s. Why? Because if it were an ancestor but not a parent of s,
   it would have a descendant that would be a parent of s. This descendant
   would have a higher revision number, leading to a contradiction.

Combining these two observations, we rewrite the revset query as

max(parents(<tostrip>) - <tostrip>)

The time complexity is now linear in the number of changesets being stripped.
For the above repository, the query now takes 0.1 seconds when one changeset
is stripped. This speeds up operations that use repair.strip, like the rebase
and strip commands.
2012-12-05 14:33:15 -08:00
David Schleimer
8fe2e0bb30 graft: explicit current node tracking
This changes graft to explicitly track the progression of commits it
makes, and updates it's idea of the current node based on it's last
commit, rather than from the working copy parent.  This should have no
effect on the value of current since we were reading the working copy
parent immediately after commiting to it.

The motivation for this change is that a subsequent patch will break
the current node and working copy relationship.  Splitting this out
into a separate patch will make that one more readible.
2012-12-04 12:54:18 -08:00
David Schleimer
63ae483369 graft: move commit info building
This moves the logic for generating the commit metadata ahead of the
merge operation.  The only purposae of this patch is to make
subsequent patches easier to read, and there should be no behavior
changes.
2012-12-04 12:54:18 -08:00
Matt Mackall
af1b0b230f merge with stable 2012-12-06 16:42:15 -06:00
David Schleimer
3dbabdb2fc merge: support calculating merge actions against non-working contexts
This is not currently used.  It is instead a pre-requisite to
performing non-conflicting grafts in memory, which a subsequent patch
will do.
2012-12-04 12:54:18 -08:00
David Schleimer
00a1d6a1fe merge: refactor action calculation into function
This pulls the code used to calculate the changes that need to happen
during merge.update() into a separate function.  This is not useful on
its own, but is instead preparatory to performing grafts in memory
when there are no potential conflicts.
2012-12-04 12:54:18 -08:00
Siddharth Agarwal
cb69b98e9b dirstate: inline more properties and methods in status
hg perfstatus -u on a working directory with 170,000 files, without this
change:
! wall 1.839561 comb 1.830000 user 1.120000 sys 0.710000 (best of 6)

With this change:
! wall 1.804222 comb 1.790000 user 1.140000 sys 0.650000 (best of 6)

hg perfstatus on the same directory, without this change:
! wall 1.016609 comb 1.020000 user 0.670000 sys 0.350000 (best of 10)

With this change:
! wall 0.985573 comb 0.980000 user 0.650000 sys 0.330000 (best of 10)
2012-12-03 14:21:45 -08:00
Siddharth Agarwal
fed745d00f perf: add option to perfstatus to get the status of unknown files
When status needs to look at unknown files (e.g. when running hg status), it
needs to use a completely different algorithm than when it doesn't (e.g. when
running hg diff).
2012-12-03 13:53:53 -08:00
Siddharth Agarwal
40de7ddbeb dirstate: test normalize is truthy instead of using a no-op lambda
hg perfstatus -u on a working directory with 170,000 files, without this
change:
! wall 1.869404 comb 1.850000 user 1.170000 sys 0.680000 (best of 6)

With this change:
! wall 1.839561 comb 1.830000 user 1.120000 sys 0.710000 (best of 6)
2012-12-04 10:29:18 -08:00
Kevin Bullock
e8ece086e3 merge with stable 2012-12-04 11:19:32 -06:00
Bryan O'Sullivan
48cad1b73b osutil: tab damage, how i hate thee 2012-12-03 13:17:01 -08:00
Bryan O'Sullivan
58c82f12c9 osutil: write a C implementation of statfiles for unix
This makes a big difference to performance.

In a clean working directory containing 170,000 files, performance of
"hg --time diff" improves from 2.38 seconds to 1.69.
2012-12-03 12:40:24 -08:00
Bryan O'Sullivan
7be204f3cf osutil: fix tab damage 2012-11-30 17:40:11 -08:00
Bryan O'Sullivan
9e6c16981b Merge with crew 2012-11-30 15:56:09 -08:00
Bryan O'Sullivan
6b3dd5248e osutil: factor out creation and init of listdir_stat 2012-11-30 15:55:09 -08:00
Bryan O'Sullivan
09d0142d5e dirstate: avoid use of zip on big lists
In a clean working directory containing 170,000 tracked files, this
improves performance of "hg --time diff" from 1.69 seconds to 1.43.

This idea is due to Siddharth Agarwal.
2012-11-30 15:55:08 -08:00
Bryan O'Sullivan
a288702cfd dirstate: move file type filtering to its source
This prepares us to move to a much faster statfiles implementation on Unix.
2012-11-30 15:55:07 -08:00
Pierre-Yves David
5ccc6bfa9a clfilter: rename unfilteredmeth to unfilteredmethod
As originally intended.
2012-11-30 22:34:21 +01:00
Pierre-Yves David
9e65b9797a clfilter: fix a false positive in the test-obsolete.t
We push between two repo which once filtered looks unrelated. Weakness in the
current implementation allows this push to be done without -f. But later
improvement with filtering will make this push fails for unrelatedness. However
we want this push to fail for including bumped changeset. So we had a smaller
push --force to make them related.
2012-11-30 21:47:04 +01:00
Adrian Buehlmann
c700586a1f test-subrepo: adapt for Windows after 6e587aaeb4ef
Fixes

  @@ -606,7 +606,7 @@
     issue3276_ok
     $ rm repo/s/b
     $ hg -R repo revert --all
  -  reverting repo/.hgsubstate
  +  reverting repo\.hgsubstate
     reverting subrepo s
     $ hg -R repo update
     1 files updated, 0 files merged, 0 files removed, 0 files unresolved

on Windows
2012-11-02 20:47:03 +01:00
Adrian Buehlmann
e6900cf097 test-mq-qrefresh: adapt for Windows after 94dce4b70643
Fixes

  @@ -208,7 +208,7 @@
     $ echo 'orphan' > orphanchild
     $ hg add orphanchild
     $ hg qrefresh nonexistentfilename # clear patch
  -  nonexistentfilename: No such file or directory
  +  nonexistentfilename: The system cannot find the file specified
     $ hg qrefresh --short 1/base
     $ hg qrefresh --short 2/base

on Windows
2012-11-02 20:22:09 +01:00
Matt Mackall
1f23e5d8ac Added signature for changeset 64827fed3444 2012-11-01 16:09:21 -05:00
Matt Mackall
92926a8771 tests: fix test for issue3581 for vfat on Linux 2012-11-01 14:59:55 -05:00
Keegan Carruthers-Smith
74acb324a1 filemerge: only run test for issue3581 on non-windows environments 2012-10-30 17:23:51 -07:00
Adrian Buehlmann
b5e726b312 openpath: specify binary mode and use util.posixfile
follow-up to aa655773f574
2012-11-01 13:46:03 +01:00
Wagner Bruna
54f80e922f i18n-pt_BR: synchronized with afc2d2d081bf 2012-11-01 11:37:40 -02:00
Matt Mackall
f0b297f1cb merge with i18n 2012-10-31 16:34:36 -05:00
Wagner Bruna
488be52c06 i18n-pt_BR: synchronized with 8a4638abc213 2012-10-31 11:13:44 -02:00