Commit Graph

1161 Commits

Author SHA1 Message Date
Kevin Bullock
1b16c815cb 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.
2013-04-23 16:57:51 -05:00
Kevin Bullock
2f2218183e check-code: expand sed rule to include more offenders
Expands the rule added in a3f00ef2b622 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.
2013-04-22 16:50:08 -05:00
Kevin Bullock
5747742d25 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 (215a8789129e).
This change adds a check-code rule and fixes two instances of the
problem in test-record.t.
2013-04-22 16:33:28 -05:00
Matt Mackall
3109d84a82 check-code: add check for lock release order 2013-04-17 14:38:02 -05:00
Nikolaj Sjujskij
cc1c916157 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.
2013-04-17 21:06:48 +04:00
Mads Kiilerich
3f5dd3e256 codingstyle: remove trailing spaces in various text files
Better do it once than see random changes in diffs later.
2013-04-17 03:40:18 +02:00
Mads Kiilerich
a64108eee3 tests: run check-code on Python files without .py extension 2013-04-17 03:39:36 +02:00
ronvoe12249
04260eb099 mergetools: rename 'base' to 'merged' in meld
This makes it clear which panel is the target of the merge operation.
2013-04-16 13:55:38 +02:00
ronvoe12249
32c9fc4192 mergetools: avoid losing the merged version with meld
Add -o $output.
When using Meld as intended (merge from left and right into the center panel),
the merged version is written to the wrong file without this option ($base,
a temporary file, which is ignored by Mercurial).

Add meld.check=changed as a secondary safety net.
2013-02-21 14:49:25 +01:00
Mads Kiilerich
eeb6ef563e check-code: check txt files for trailing whitespace 2013-04-15 01:37:23 +02:00
Mads Kiilerich
b7f720181a check-code: catch trailing space in comments 2013-04-15 01:37:23 +02:00
Bryan O'Sullivan
fb4f6a8456 synthrepo: add missing import of sys
Found using Cython.
2013-04-12 18:48:02 -07:00
Nikolaj Sjujskij
5b84a8b846 zsh_completion: make use of debuglabelcomplete command
Use `debuglabelcomplete` command when populating labels list, instead of
calling `hg` three times: for branches, bookmarks and tags. Do not pass string
being completed to `hg debuglabelcomplete` (as `$words[$CURRENT]`), since it
breaks `_hg_revrange` completion (`--rev 2.5:2.5.<Tab>`) for no apparent
benefit.
Also complete `hg view` with labels, not just tags, and drop unused `_hg_tags`.
2013-04-08 16:51:38 +04:00
Siddharth Agarwal
b2115318e7 perf: add a command to test copies.pathcopies perf
An upcoming patch will improve the performance of this function, and this
command will be used to demonstrate that improvement.
2013-04-04 20:36:46 -07:00
Siddharth Agarwal
3d47559133 perf: add a command to test addremove performance
Upcoming patches will improve addremove performance. This command will be used
to demonstrate that improvement.
2013-04-01 23:09:36 -07:00
Bryan O'Sullivan
0c6ba243cb perf: add perfdirs command
This measures the cost of computing the dirstate's dirs structure,
which becomes very expensive in a large working directory.
2013-04-01 13:46:32 -07:00
Matt Mackall
5449719a55 merge with stable 2013-04-01 15:19:16 -05:00
Nikolaj Sjujskij
88b3e1a958 zsh_completion: fix trailing carriage return spoiling tag completion
This was giving the following error:

 % hg up 2.5-r<Tab>
 (eval):1: bad substitution
 % hg up 2.5-r
2013-03-29 18:45:07 -07:00
Bryan O'Sullivan
b9f58e03c3 perf: remove mysterious trailing newlines 2013-03-28 18:21:20 -07:00
Bryan O'Sullivan
1d04c93909 check-code: fix a check-code failure in check-code
The irony is delicious.
2013-03-27 08:57:45 -07:00
Simon Heimberg
7dfe048bd9 check-code: re-add check for missing glob
As suggested by mpm reintroducing this test failure on windows is
prevented by a code-check. One line in a unix test is ignored.

This pattern matches 20 windows glob lines.
2013-03-01 00:59:22 +01:00
Simon Heimberg
6321f3dc40 tests: append missing glob to filename output and check-code it 2013-03-01 00:03:51 +01:00
Simon Heimberg
f94731fd38 check-code: extract windows glob warning message
it will be used often
2013-02-28 23:45:51 +01:00
Kevin Bullock
9960ff10b2 mergetools: refine vimdiff warning message
We explicitly redraw before echoing the message so that it simply
displays at the bottom of the window. Also simplifies the message
printing by using 'echomsg' (which uses 'echohl' internally) and adds
the names of the software involved for improved Googleability.
2013-02-15 15:06:43 -06:00
Pierre-Yves David
f1f7fda13e mergetools: vimdiff issue a warning explaining how to abort
Adds a message displayed at each vimdiff invocation:

  merge conflict detected, type ":cq" to abort

Vimdiff is very confusing for non-vim user (not to speak about vim user confused
anyway. However it is very likely that vimdiff is picked as the mergetool of
choice when using the default config:
- vim is available on all UNIX system.
- Its one of the rare non graphical merge tools.
2013-02-15 11:28:04 +01:00
Andrew Shadura
ee874dbc29 hgk: support the old way of getting the current Ttk theme (issue3808)
It seems like the API has changed somewhere around 8.5.7, so the preferred way
of getting the current theme is now [ttk::style theme use], while the
deprecated (but still working) is $::ttk::currentTheme.
2013-02-05 12:58:21 +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
Siddharth Agarwal
47a58ca6ee perf: add a command to measure merge.calculateupdates perf
The performance of merge.manifestmerge will be improved in upcoming patches.
This command will be used to demonstrate the improvement.
2013-03-24 17:06:10 -07:00
Andrew Shadura
28d59c61fd hgk: remove regsub, split on \r instead
No need to regsub all \r\n's to \n's,
we can just split on \r as well; this may
produce extra empty elements in the list,
but they won't match anyway.
2012-10-16 22:44:14 +02:00
Andrew Shadura
5228b6acc2 hgk: simplify tags parser
As when hg tags is being called without -v option, it returns
lines with two elements in each, we can just interate them as
if it were a usual Tcl list using foreach and two variables.
Line endings and whitespace don't matter when doing so, so we
may keep them as is.

When we're processing the lines, tag variable is assigned a tag
name, and rev is a string in form of revision:hash which we can
split on colon. As Tcl8.4 lacks lassign command, and using lindex
makes code a bit less readable, we use foreach to iterate over
two-element list.
2012-10-16 22:41:44 +02:00
Andrew Shadura
95fa807adb hgk: in popups, replace labels with window titles
Replace labels with window titles.
That also requires to change grid placement manager settings
to compensate padding which used to be applied to now non-existent
labels.
2013-03-10 16:42:23 +01:00
Andrew Shadura
ee76b3a7be hgk: update backgroud colour when Ttk is available
Ttk doesn't automatically set up Tk colour palette.
Because of that, Ttk controls look differently when used
together with old Tk controls. When we use Ttk controls,
we first query if we have any setting for the client
background, and if we do, we update Tk palette as well.
2013-03-10 16:42:16 +01:00
Andrew Shadura
a995a530a6 hgk: fix pop-up windows
Create pop-up windows properly so they go to the floating layer in
tiling window managers.
2012-10-16 15:31:56 +02:00
Andrew Shadura
a8b0903f71 hgk: don't use fixed format for dates
Don't pass -format with a date format string,
use default instead so users can use their
own preferences.
2013-03-10 16:12:26 +01:00
Andrew Shadura
af656c838f hgk: reformat changsets fields
Rename Author to User.
Rename Revision to Changeset.
Put Date on its own line.
2013-03-10 16:07:57 +01:00
Andrew Shadura
7e6b0edec9 hgk: drop committer field from the UI
Remove Committer field, it doesn't make sense in Hg.
2012-10-16 15:07:41 +02:00
Bryan O'Sullivan
408398cc48 bash_completion: recognize normal command abbreviations
In many common cases, this eliminates a call to "hg help" to get a
complete command name, thus improving responsiveness.
2013-03-21 21:07:22 -07:00
Bryan O'Sullivan
9d6e464bc6 completion: selectively use debugpathcomplete in bash_completion
The current bash_completion code can be very slow in a large working
directory. It always uses "hg status" to generate possibly matching
files, which checks the status of every file. We often don't care
about status when completing, so that cost is very high.

As the new debugpathcomplete command does not check the status of
files, it offers much better performance for commands that only
care about completing names.
2013-03-21 16:31:29 -07:00
Bryan O'Sullivan
59cec2d504 completion: add a debuglabelcomplete command
When completing a "label" (a symbolic name for a commit), the
bash_completion script currently has to invoke hg three times. For
a large repository, the cost of starting up and loading all the
necessary context over and over is very high.

For instance, in mozilla-central:

  time (export HGPLAIN=1; hg tags -q; hg bookmarks -q; hg branches) >/dev/null
  0.446 sec

Compare with the debuglabelcomplete command that this commit adds:

  time hg debuglabelcomplete >/dev/null
  0.148 sec

This greatly helps responsiveness.
2013-03-21 10:51:18 -07:00
Bryan O'Sullivan
c033affac4 bash_completion: nuke a duplicated function 2013-03-21 09:13:16 -07:00
Bryan O'Sullivan
21e58de02a bash_completion: tell an editor what type of file this is 2013-03-14 16:56:10 -07:00
Bryan O'Sullivan
dad0164132 bash_completion: allow remove to complete normal files
Previously, we only completed files that had already been manually
deleted. That behaviour made no sense. We now complete unmodified,
modified, and deleted files.
2013-03-14 16:50:53 -07:00
Bryan O'Sullivan
41a2d20ced bash_completion: match more narrowly
This greatly helps completion performance for most commands that deal
with files.

In a working dir with 150,000 files, where we want to complete the name
of a modified file under a path beginning with "a", from the root of
the working dir:

  (old) hg status -nm .            1.7 sec
  (new) hg status -nm "glob:a**"   0.3

Even "hg add" becomes a little faster, in spite of being the worst
case (matching untracked files).
2013-03-14 16:49:02 -07:00
Simon Heimberg
0e27bb618e check-code: do not prepend "warning" to a failure message
The prefix has not been removed when this check changed from a warning to a
failure.
2013-03-09 22:14:46 +01:00
Kevin Bullock
13a36a574c mergetools: refine vimdiff warning message
We explicitly redraw before echoing the message so that it simply
displays at the bottom of the window. Also simplifies the message
printing by using 'echomsg' (which uses 'echohl' internally) and adds
the names of the software involved for improved Googleability.
2013-02-15 15:06:43 -06:00
Pierre-Yves David
5411a0cff3 mergetools: vimdiff issue a warning explaining how to abort
Adds a message displayed at each vimdiff invocation:

  merge conflict detected, type ":cq" to abort

Vimdiff is very confusing for non-vim user (not to speak about vim user confused
anyway. However it is very likely that vimdiff is picked as the mergetool of
choice when using the default config:
- vim is available on all UNIX system.
- Its one of the rare non graphical merge tools.
2013-02-15 11:28:04 +01:00
Simon Heimberg
4be0e80cbe check-code: warn about line glob match with no glob character (?*/) 2013-02-13 21:51:47 +01:00
Mads Kiilerich
5787baee50 spelling: fix some minor issues found by spell checker 2013-02-10 18:24:29 +01:00
Kevin Bullock
72b1fbb751 check-code: warn to use killdaemons instead of kill cat PIDFILE
We have a bunch of tests that still use

    kill `cat hg.pid`

or worse,

    kill `cat hg.pid`; while kill -0 `cat hg.pid`; sleep 0; done

Cleaning these up to use tests/killdaemons.py is non-trivial, so for now
we just add a warning.
2013-02-08 19:32:56 +00:00
Johannes Schlatow
00afb413b2 zsh_completion: add descriptive branch names to head revisions 2013-01-17 01:06:00 +01:00
Johannes Schlatow
c168e0ca29 zsh_completion: add completion of branch names 2013-01-17 00:54:49 +01:00
Johannes Schlatow
8a46144119 zsh_completion: fix issue with overlong branch/tag names 2013-01-17 01:55:50 +01:00
Mads Kiilerich
61ac5e1192 docs: "deprecate" checkchanged and checkconflicts in merge-tool configuration
These settings were replaced by check=changed and check=conflicts in
9b0e7e973592. There is no reason to announce two different ways to achieve the
same. The old way should be kept but not announced.
2013-01-15 23:30:10 +01:00
Pierre-Yves David
684502f847 perf: add perfbranchmap command
The command times the update of a branchmap from its nearest subset
or from scratch.
2013-01-11 18:39:43 +01:00
Pierre-Yves David
237773b354 perftest: allow selection of volatile set to benchmark
This helps when you focus on a subset of the volatile chain.
2013-01-04 19:24:32 +01:00
Pierre-Yves David
7e392315df perftest: add a command to benchmark construction of volatile cache
Obsolescence and filtering related caches are critical. Having a handy way to
check them is valuable.
2013-01-04 19:23:26 +01:00
Pierre-Yves David
0df9cd0af7 perftest: add an option to invalidate volatile cache
Some revsets are sensitive to such initialization. Being able to
test the impact is great.
2013-01-04 19:22:40 +01:00
Pierre-Yves David
c91dd4609f perftest: document the perfrevset command
I'll add an argument to it.
2013-01-04 19:22:15 +01:00
Pierre-Yves David
220ee90898 perftest: migrate to new style command declaration
Declaring synopsis and argument on the function site is much clearer.
2013-01-04 19:20:51 +01:00
Pierre-Yves David
e7d6dfdf0a perftest: drop duplicated codes
The `perfnodelookup` lookup commands is duplicated. We drop the first version,
overwritten by the seconds.
2013-01-04 19:18:12 +01:00
Augie Fackler
6f81622e24 check-code: disallow defunct <> operator
Added a test for that and one other python3 check in
test-check-code.t.
2013-01-01 13:05:22 -06:00
Augie Fackler
a52590ca42 check-code: disallow two-argument form of raise
Using this old form makes any attempt to port to Python 3 harder, and
the new syntax is supported in 2.4 already.
2013-01-01 12:58:21 -06:00
Siddharth Agarwal
4fdbea480f ancestor: add lazy membership testing to lazyancestors
This also makes the perfancestorset command use lazy membership testing. In a
linear repository with over 400,000 commits, without this patch, hg
perfancestorset takes 0.80 seconds no matter how far behind we're looking.
With this patch, hg perfancestorset -- X takes:

    Rev X       Time
       -1      0.00s
    -4000      0.01s
   -20000      0.04s
   -80000      0.17s
  -200000      0.43s
  -300000      0.69s
        0      0.88s

Thus, for revisions close to tip, we're up to several orders of magnitude
faster. At 0 we're around 10% slower.
2012-12-18 12:47:20 -08:00
Siddharth Agarwal
4e60dda7f4 perf: add command to test performance of membership in ancestor set
The new command, perfancestorset, takes an argument denoting which revset to
test the membership of.

Currently this runs through all the ancestors and converts them into a set.
The primary purpose of having this is to compare this approach, currently used
in several places, against the upcoming lazy approach.
2012-12-14 10:23:18 -08:00
Siddharth Agarwal
678c5756b6 perf: add a command to measure revset performance 2012-12-06 11:21:11 -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
08c6ce57a8 contrib: state explicitly how hgtest.vim can be installed 2012-12-09 23:33:16 +01:00
Bryan O'Sullivan
75dc399824 synthrepo: do not crash if a list is empty 2012-12-10 11:18:03 -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
Andrew Shadura
9254f7ffef hgk: specify some colours explicitly in hex
Tk 8.6b3 uses web colours, where green is defined as #008000, not #00ff00, and grey
is #c0c0c0, not #808080, so specify those colours explicitly.
2012-11-07 14:49:44 +01:00
Andrew Shadura
460e1dc017 hgk: use Ttk instead of plain Tk
Use Ttk (themed Tk) for most of the widgets. Default to xpnative theme on
Windows, clam otherwise.

Provide a shim for Tk 8.4 without Tile/Ttk.
2012-10-16 14:54:51 +02:00
Matt Mackall
90a48b1c9f check-code: move i18n check from warning to error 2012-11-25 13:57:00 -06:00
Siddharth Agarwal
acc48ffd83 url: use open and not url.open for local files (issue3624) 2012-10-17 21:30:08 -07:00
Adrian Buehlmann
9576bfc817 perf: simply use repo.store for perffncache* commands
This makes sure that .hg/requires is observed and the correct kind of store
object is created. Otherwise we might mutilate our test repos when experimenting
with new repo formats.
2012-10-12 19:43:24 +02:00
Mads Kiilerich
588e53b65c spelling: fix minor spell checker issues 2012-10-10 01:29:56 +02:00
Bryan O'Sullivan
b5a37656e8 contrib: add a commit synthesizer for reproducing scaling problems
This adds two new commands:

- analyze examines an existing repo and writes out a statistical
  description of its properties that contains no identifying
  information.

- synthesize creates new commits based on the description generated
  by analyze.

The intention is that a repo constructed using synthesize will have
properties that are vaguely statistically similar to the originating
repo, but entirely random content.

This can be useful for forecasting performance as a repo grows, and
for developers who want to find bottlenecks in proprietary repos
to which they do not have access.
2012-10-08 15:57:21 -07:00
Idan Kamara
4922480923 check-code: replace heredocs in unified tests
Heredocs are usually fed to other commands and
shouldn't follow the standard conventions of shell
commands.

This restores the old behaviour of how heredocs
were handled in old-style test files.
2012-10-03 22:09:18 +02:00
Augie Fackler
322c35ca0e lock-checker: new contrib extension based on work done by Mads
This makes it possible to do lock validation as part of a normal test
run. I didn't attempt any wlock validation because that's a bit more
subtle to detect properly. Thanks to the initial patch from Mads for
the idea.
2012-08-01 22:13:27 -05:00
Thomas Arendsen Hein
23c6bfee41 check-code: catch yield inside try/finally (with tests)
This is not allowed in Python 2.4.
2012-09-19 12:29:12 +02:00
Adrian Buehlmann
4c2547f734 perf: add perffncacheencode
Examples (all done with somewhat dated clones I found on my disk):

Netbeans (~120k entries in fncache):

  $ hg perffncacheencode
  ! wall 4.338000 comb 4.336828 user 4.336828 sys 0.000000 (best of 3)

Openoffice (~77k entries in fncache)):

  $ hg perffncacheencode
  ! wall 1.533000 comb 1.528810 user 1.528810 sys 0.000000 (best of 7)

Xen (~10k entries in fncache):

  $ hg perffncacheencode
  ! wall 0.198000 comb 0.187201 user 0.187201 sys 0.000000 (best of 51)

Done on Windows 7 x64.
2012-09-14 13:02:31 +02:00
Bryan O'Sullivan
dc9ede17dc Merge spelling fixes 2012-09-11 08:36:09 -07:00
Kevin Bullock
8b9c78e8cb bash_completion: add rebase rev completion 2012-08-31 13:17:16 -05:00
timeless@mozdev.org
001844931f en-us: penalize 2012-08-17 13:58:19 -07:00
timeless@mozdev.org
7d38ae466d spelling: syntactic 2012-08-17 13:58:19 -07:00
timeless@mozdev.org
886e3f77f4 spelling: implementing 2012-08-17 13:58:18 -07:00
timeless@mozdev.org
e1f80f8f4e spelling: existence 2012-08-17 13:58:18 -07:00
Benoit Boissinot
cbb9f61b3c merge with crew-stable 2012-08-31 23:42:02 +02:00
Patrick Mezard
191976de22 Merge with stable 2012-08-29 21:26:39 +02:00
Steve Borho
985c4254c1 wix: pick up new template files 2012-08-29 13:16:56 -05:00
Mads Kiilerich
ae09caa646 remove template-vars.txt - it is outdated and neither usable nor necessary 2012-08-29 01:24:57 +02:00
Mads Kiilerich
5e3dc3e383 avoid using abbreviations that look like spelling errors 2012-08-27 23:14:27 +02:00
Mads Kiilerich
2f4504e446 fix trivial spelling errors 2012-08-15 22:38:42 +02:00
Nikolaj Sjujskij
b9344b4e7f zsh completion: tweak options for incoming, outgoing and rebase
* `incoming --rev` completes _hg_labels, not jsut tags;
 * `outgoing --rev` completes revrange;
 * source/dest/base for `rebase` require argument.
2012-08-16 19:04:27 +04:00
Nikolaj Sjujskij
040cab71af zsh completion: update mq commands completion
* add qclone command;
 * qapplied/qunapplied: add --last/--first;
 * qdiff: add all diff options;
 * qfold: add --force, --no-backup;
 * qgoto: add --keep-changes;
 * qimport: add --git, --push;
 * qnew: add user- and date-related options;
 * qpop/qpush: add --keep-changes and --no-backup, drop --name;
 * qpush: drop deprecated --merge;
 * qrename: complete only unapplied patches' names;
 * strip: add --rev, --keep, --bookmark, update descriptions, drop --backup.
2012-08-16 19:03:01 +04:00
Nikolaj Sjujskij
a3205da673 zsh completion: add new options for existing commands
* backout: add --tool;
 * bisect: add --extend;
 * bookmarks: add --inactive;
 * branches: add --closed;
 * bundle: add --rev, --all, --branch;
 * cat: add --decode;
 * clone: add --updaterev, --branch, --pull and use common-with-qclone opts;
 * commit: add --close-branch;
 * diff: add --change, --reverse, --stat, --text, --unified;
 * export: add --rev;
 * grep: add --date;
 * heads: add --topo, --closed;
 * help: add --extension, --command, --keywords; complete additional help
   topics also, not commands only;
 * identify: add --bookmark and remote_opts;
 * import: add --no-commit, --exact, --import-branch, --date, --user,
   --similarity and commit options;
 * log: add --user, --date, --stat, --git, --graph;
 * manifest: add --rev;
 * push: add --new-branch;
 * resolve: add --all, --no-status, --tool and pattern options;
 * revert: add --date;
 * serve: add --prefix, --web-conf, --pid-file, --cmdserver, --certificate;
 * status: add --change;
 * tag: add --force, --edit, --remove;
 * tip: add --git;
 * update: add --check, --date.
2012-08-16 19:03:01 +04:00
Nikolaj Sjujskij
6443deebc9 zsh completion: add support for convert, graphlog, purge, record extensions 2012-08-16 19:03:01 +04:00
Nikolaj Sjujskij
beb65b038d zsh completion: add subrepos options for all supporting commands 2012-08-16 19:03:01 +04:00
Nikolaj Sjujskij
937e4dd5ea zsh completion: add new option groups for options
Add clone, date/user, git-style, merge tool, ignore space, log,
branch/bookmarks options and use them throughout command completions.
2012-08-16 19:03:01 +04:00
Nikolaj Sjujskij
501c8fe2e3 zsh completion: add forget and rollback commands 2012-08-16 19:02:49 +04:00
Nikolaj Sjujskij
d1e6c4fb90 zsh completion: complete additional topics for help, not commands only 2012-08-16 11:21:46 +04:00
Matt Mackall
36c5db3d78 merge with stable 2012-08-24 17:51:47 -05:00
Steve Borho
6ec99fd6af wix: bump MSI based installers to use Python 2.7
We're somewhat forced to use Python 2.7 for the bdist packages, so we might
as well use 2.7 for the MSI installers as well.
2012-08-23 18:19:19 -05:00
Pierre-Yves David
da8e5d78a1 mergetools.hgrc: set vimdiff to check=changed
The standard reaction in from of unexpected vimdiff is to ":quit". This will
make vimdiff return a 0 status even if no merge were done at all.

This change detect that nothing have been changed in vimdiff as a potential
unresolved conflict.
2012-08-02 13:51:49 +02:00
Mads Kiilerich
688b9e2048 check-code: indent 4 spaces in py files 2012-07-31 03:30:42 +02:00
Pascal Quantin
4b07220f53 win32: update Inno Setup installer extensions list 2012-07-29 17:04:51 +02:00
Mads Kiilerich
59664fd950 check-code: fix check for trailing whitespace on continued lines too
The tests in test-annotate.t and test-import-git.t that relied on trailing
space in a file created by a here string is now masked by a literal 'EOL'
string that is removed.
2012-08-08 18:10:37 +02:00
Mads Kiilerich
cdcad9a14c check-code: fix check for trailing whitespace on empty lines
It seems like the intention with c4ecbbd282fe was to catch lines with only
one whitespace too.
2012-08-08 18:10:30 +02:00
Mads Kiilerich
9cddfd19ab check-code: fix check for trailing whitespace on sh command lines
The $ has been without necessary escaping since introduced in c4ecbbd282fe.
2012-08-08 18:10:16 +02:00
Mads Kiilerich
377db36818 help: fix some instances of 'the the' 2012-07-26 02:54:13 +02:00
Joshua Redstone
2118475aca perf: fix perfcca to work with new casecollisionauditor interface
A recent changeset, 66b3a64f7b5e, modified the caescollisionauditor interface
but did not update perf.py.  This changeset remidies that.
2012-07-18 07:51:20 -07:00
Pierre-Yves David
6bb5e54b11 check-code: recognise %= as an operator 2012-07-06 19:48:19 +02:00
Mads Kiilerich
2108c6e927 check-code: verify that 'saved backup bundle to ...' is '(glob)'ed
This is the most frequent trivial reason tests fail on Windows.
2012-07-05 00:49:26 +02:00
Nikolaj Sjujskij
a8c3df9635 zsh completion: catch up with 2.2 commands and options
* add completion for phase and graft core commands
 * add completion for rebase extension
 * add new options for already defined commands:
   * commit --amend
   * import --bypass
   * manifest --all
   * merge --tool
   * revert -C (short for --no-backup)
   * qpush --exact [mq]
   * email --body [patchbomb]
2012-06-20 17:40:19 +04:00
Mads Kiilerich
a4be6ed644 test-alias: adapt for Windows
The test used 'echo' to test '!' style aliases. On Windows 'echo' is handled
by cmd and thus behaves very differently from the 'normal' echo command.

The simple workaround used here for using the same alias on all platforms
is to use 'printf' instead. Msys 'printf' will also handle sh quoting and
escaping in cmd.

Environment variable expansion with sh syntax is handled by launching sh.
2012-06-16 21:57:42 +02:00
Bryan O'Sullivan
6ba97b40c1 revlog: ancestors(*revs) becomes ancestors(revs) (API)
Accepting a variable number of arguments as the old API did is
deeply ugly, particularly as it means the API can't be extended
with new arguments.  Partly as a result, we have at least three
different implementations of the same ancestors algorithm (!?).

Most callers were forced to call ancestors(*somelist), adding to
both inefficiency and ugliness.
2012-06-01 12:37:18 -07:00
Bryan O'Sullivan
167441c211 perf: add a benchmark for revrange 2012-06-01 15:50:22 -07:00
David Schleimer
499f4df5a8 hg-ssh: read-only flag
Allows you to restrict a ssh key to have read-only access to a set of
repos by passing the --read-only flag to hg-ssh.

This is useful in an environment where the number of unix users you
can or are willing to create is limited.  In such an environment,
multiple users or applications will share a single unix account.  Some
of those applications will likely need read-only access to the
repository.  This change makes it possible to grant them such access
without requiring that they use a separate unix account.
2012-05-22 15:17:37 -07:00
Bryan O'Sullivan
45a54a6b08 perf: add a perfancestors benchmark 2012-05-15 10:44:17 -07:00
Bryan O'Sullivan
7ddd8678d8 perf: add a perfdirstatewrite benchmark 2012-05-16 13:45:46 -07:00
Bryan O'Sullivan
18476b4834 perf: rework perfheads and perftags to clear caches
The cache clearing makes numbers more reproducible.
2012-05-19 19:44:23 -07:00
David Schleimer
fc014ab773 hg-ssh: refactor to have main() method
Refactor hg-ssh to have a main() function instead of a bunch of
top-level statements.
2012-05-21 16:19:30 -07:00
Brodie Rao
7f47d4e347 check-code: ignore naked excepts with a "re-raise" comment
This also promotes the naked except check from a warning to an error.
2012-05-13 13:18:06 +02:00
Brodie Rao
391c9b5bf1 check-code: improve detection of naked except clauses 2012-05-13 13:17:50 +02:00
Brodie Rao
47a3ca1c2f check-code: promote 80+ character line warning to an error 2012-05-13 13:17:27 +02:00
Brodie Rao
a706d64a2c cleanup: replace naked excepts with except Exception: ... 2012-05-12 16:02:46 +02:00
Brodie Rao
c577fac135 cleanup: replace naked excepts with more specific ones 2012-05-12 16:02:45 +02:00
Brodie Rao
92158e04de cleanup: "raise SomeException()" -> "raise SomeException" 2012-05-12 16:00:58 +02:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Mads Kiilerich
80eee013e1 tests: unify the last sh tests
This requires a slightly smarter check-code check for sed output filtering.
2012-04-25 01:35:39 +02:00
Mads Kiilerich
f4efda66d8 tests: run most check-code sh checks on continued lines too
Some false errors are degraded to warnings and whitelisted.
2012-04-25 01:35:39 +02:00
Matt Mackall
6d78ec67ed merge with stable 2012-05-11 14:48:24 +02:00
Mads Kiilerich
99a4f5f5b9 hg-ssh: exit with 255 instead of -1 on error
Unix sh would cast -1 to 255 anyway, but on windows -1 become 0. Better be
explicit with the 255 everywhere.
2012-05-07 00:52:08 +02:00
Mads Kiilerich
91529dce53 hg-ssh: use %s for printing paths in error messages
This avoids \\ if this ever is run on windows - for example in the test suite.
2012-05-07 00:49:01 +02:00
Martin Geisler
24e4bf05a3 check-code: catch unnecessary s.strip().split() calls 2012-05-07 10:02:50 +02:00
Steven Stallion
d36350c9a1 plan9: mkfile and 9diff fixes
This patch deals with an unnecessary backslash in 9diff and improper
quoting in the contrib mkfile.
2012-04-28 23:01:31 -07:00
Martin Geisler
bde13df69f doc: update copyright years to 2012
I sometimes look at a piece of software and if the man page says
"Copyright 2004", then I'm inclined to think that the project is stale
or that the authors are lazy. Neither is good publicity for us :-)
2012-04-30 12:04:30 +02:00
Mads Kiilerich
b7e85cefa1 tests: avoid tab indent on all kinds of lines of sh commands 2012-04-23 01:56:48 +02:00
Mads Kiilerich
f64bae7ea3 tests: use 'do sleep 0' instead of 'do true', also on first line of command
2cd44a791e66 established that '... do true ...' shouldn't be used, but that was
only enforced on continued lines.
2012-04-23 01:56:48 +02:00
Mads Kiilerich
ca99a3d167 check-code: put grouping around regexps generated from testpats
This removes the pitfall that would make the testpath r'a|b' match 'b' on all
lines in .t tests.
2012-04-23 01:56:48 +02:00
Mads Kiilerich
b1160b7ec5 tests: don't use /dev/urandom for largefiles testing
There is no need to use entropy here just to create some content that only will
be used for hashing and ignored.

This avoids a problem where dd from /dev/urandom on solaris generates too short
output.
2012-04-23 01:56:48 +02:00
Steven Stallion
1a611af55b plan9: add missing source entries to proto 2012-04-21 08:24:10 -07:00
Mads Kiilerich
4c1897dde5 tests: fix incorrect markup of continued lines of sh commands 2012-04-23 01:39:26 +02:00
Mads Kiilerich
9f4ca6b4df check-code: 'printf \0' is apparently fine - accept it in check-code
Nobody complained over '\0' in test-eol.t.

The too strict check becomes a problem when this check is applied to more
lines.
2012-04-23 01:39:26 +02:00
Mads Kiilerich
e5bed4bfb4 tests: solaris sh can not negate exit status with '!' 2012-04-23 01:39:26 +02:00
Mads Kiilerich
d63ff4f9a5 tests: ^ must be quoted when used on solaris sh
The check was broken when it was introduced in 8924361c0202.
2012-04-23 01:39:26 +02:00
Steven Stallion
3ad03bc654 plan9: finalize documentation for next release 2012-04-15 23:47:46 -07:00
Matt Mackall
4ca25d50f9 merge with stable 2012-04-14 01:39:35 -05:00
Patrick Mezard
bdf6ede885 mq: replace hasattr() with util.safehasattr(), update check-code.py 2012-04-13 15:07:13 +02:00
Bryan O'Sullivan
dc46676e81 parsers: use base-16 trie for faster node->rev mapping
This greatly speeds up node->rev lookups, with results that are
often user-perceptible: for instance, "hg --time log" of the node
associated with rev 1000 on a linux-2.6 repo improves from 0.3
seconds to 0.03.  I have not found any instances of slowdowns.

The new perfnodelookup command in contrib/perf.py demonstrates the
speedup more dramatically, since it performs no I/O.  For a single
lookup, the new code is about 40x faster.

These changes also prepare the ground for the possibility of further
improving the performance of prefix-based node lookups.
2012-04-12 14:05:59 -07:00