Commit Graph

1235 Commits

Author SHA1 Message Date
Matt Mackall
4223982ebe merge with stable 2013-12-01 14:10:53 -06:00
Andrew Shadura
e4287fe436 hgk: fix tag list parser (issue4101)
As tags may have embedded spaces, and "hg tags" command doesn't escape them,
the output of the command doesn't make a well-formed list, so we can't just
iterate over it. Instead, apply a simple regexp to transform it to a list
which we actually use. Line boundary matching should be enabled.
2013-12-01 13:53:24 -06:00
Sean Farley
337aa76166 bash_completion: add global support for -b|--branch
Previously, only -r|--rev was parsed globally which meant 'hg push -b <tab>'
would try to complete a path instead of a branch.
2013-11-26 14:33:18 -06:00
Sean Farley
fa42f28d41 bash_completion: add global support for -B|--bookmark
Previously, only -r|--rev was parsed globally which meant 'hg push -B <tab>'
would try to complete a path instead of a bookmark.
2013-11-26 14:31:40 -06:00
Sean Farley
2c4a9fc383 bash_completion: change --rev if-else block into a case
Again, this doesn't change behavior but does make it easy to add cases in the
next patch.
2013-11-26 14:04:12 -06:00
Sean Farley
fdb3859999 bash_completion: simplify if-else logic
There is no change in functionality here but this makes refactoring this later
easier.
2013-11-26 13:55:33 -06:00
Sean Farley
dd1a68daaa bash_completion: add _hg_branches for list of branches 2013-11-25 11:38:14 -05:00
Sean Farley
894084345f bash_completion: add -B|--bookmark support for strip 2013-11-26 14:38:14 -06:00
Sean Farley
de5568a073 bash_completion: add completion for deleting a shelve 2013-11-22 14:58:41 -05:00
Martin Geisler
dc22476982 contrib: don't mention obsolete graphlog extension in mercurial.ini 2013-11-22 19:12:18 +01:00
Martin Geisler
477180c942 contrib: stop mentioning obsolete graphlog extension in sample.hgrc 2013-11-22 19:11:48 +01:00
Martin Geisler
422edf9e4c contrib: promote strip extension over MQ in sample.hgrc 2013-11-22 17:14:44 +01:00
Sean Farley
f8159f9cef bash_completion: use correct command for listing shelves
Previously, _hg_shelves used the unshelve command to list current shelves. This
is actually the wrong command. The correct usage is 'hg shelve -l' so we use
that instead.
2013-11-21 15:14:52 -05:00
Sean Farley
e43c652608 bash_completion: remove restriction on bookmark completion
Previously, we only completed a bookmark when deleting or renaming a
bookmark. Since we can now move a bookmark forward, we drop this restriction.
2013-11-20 19:13:24 -05:00
Sean Farley
a3bd83dd26 bash_completion: fix issue with subdirectories not being completed
Previously, if there was a directory between the file and first-level directory (e.g. 'bar' in
foo/bar/file), then bash_completion would only list 'foo/file' instead of 'foo/bar/file'.

This behavior was introduced in ed00ea08afda to fix spaces in file names. In
this patch, we keep that behavior while also fixing subdirectory completion by
reverting ed00ea08afda and instead add backslashes to whitespace manually. This
approach means adding the completion option 'nospace' since we do this manually
now.
2013-11-20 14:45:18 -05:00
Sean Farley
46fae822f1 bash_completion: determine root executable in case of alias
This solves an issue for users that have "alias hg='hg --some_opts'" where they
would see wrong entries in the completion output (such as color codes).
2013-11-20 13:19:55 -05:00
Sean Farley
728e53206c bash_completion: expand aliased commands 2013-11-20 15:16:54 -05:00
Sean Farley
8ef12c7d6e bash_completion: untabify 2013-11-19 11:45:30 -05:00
Simon Heimberg
a4feb953c7 check-code: prepend warning prefix only once, but for each warning
The code adding the prefix is now run once per pattern. It was run once per
file (after the change 17484f4c54fb).
Demonstrate that it is working now by extending the test. Raise two different
warnings, one of them twice.
2013-11-09 10:21:20 +01:00
Augie Fackler
cdece79d51 import-checker: try a little harder to show fewer cycles
This makes sure that all cycles begin with the lexicographically first
module, so that we're less likely to show overlapping cycles in the
final analysis.
2013-11-17 13:33:20 -05:00
Augie Fackler
7362c1b4c8 import-checker: ignore nested imports 2013-11-17 16:58:18 -05:00
Augie Fackler
acbe5bcee3 contrib: add an import checker
This checks for cycles in the module graph and verifies that imports
of stdlib modules are not on the same line as relative imports of
mercurial modules.
2013-11-17 13:04:18 -05:00
Augie Fackler
2859ed15ec subsettable: move from repoview to branchmap, the only place it's used
This is a step towards breaking an import cycle between revset and
repoview. Import cycles happened to work in Python 2 with implicit
relative imports, but breaks on Python 3 when we start using explicit
relative imports via 2to3 rewrite rules.
2013-11-06 14:38:34 -05:00
Simon Heimberg
6295e690d1 check-code: document last ignore regexp
For easier remembering to delete when it is not needed anymore.
2013-11-09 14:50:12 +01:00
Simon Heimberg
a4201b65cf check-code: drop unneeded ignore patterns
The exceptions seem to have disappeared.
2013-11-09 14:49:05 +01:00
Matt Mackall
0ed8797e8c merge with stable 2013-11-16 12:44:28 -05:00
Durham Goode
d9bbb62af4 contrib: add editmerge script for editor conflict prompts
Adds a script that opens the editor to the conflict as part of the merge
process. This way you can fix the merge during the rebase instead of having to
pause the rebase, resolve --mark, rebase --continue.

Only works on unix.
2013-11-15 13:20:49 -08:00
Augie Fackler
e39a8b44a4 Merge with stable. 2013-11-05 13:25:45 -05:00
Simon Heimberg
90fcdb6fe7 check-code: more replacement characters
for finding '.. note::' (even) more exact by using more characters:
replace '.' with 'p' and ':' with 'q'
2013-11-05 09:00:31 +01:00
Simon Heimberg
81c6ecacd6 check-code: check comment for '.. note::' without two newlines
Because string entries are replaced before matching, we must search for
the transformed pattern. But it seems to be quite unique and does not return
false matches. If it will, they can be listed as 3rd arg in pypats.
2013-11-05 09:00:31 +01:00
Simon Heimberg
7d27400fc9 check-code: prepend warning prefix for repeated warnings only once
When a warning occured several times in one file, "warning: " was prepended
several times:

examplefile.py:3:
 > def a(object):
 warning: this looks wrong
examplefile.py:27:
 > def x(object):
 warning: warning: this looks wrong
2013-11-02 11:25:04 +01:00
Simon Heimberg
bfb1db1bf5 check-code: fix an error message 2013-11-02 11:25:33 +01:00
Mads Kiilerich
a07958f34c check-code: fix no-check-code skip message - obfuscation was too obscure 2013-10-23 23:42:13 +08:00
Pascal Quantin
e36cdfe78f win32: add shelve extension to mercurial.ini 2013-10-21 23:40:56 +02:00
Mads Kiilerich
a4a7d21498 check-code: check that '>' is used for continued lines
Continued lines do not get the SALT mangling.
2013-10-03 14:50:47 +02:00
Mads Kiilerich
1e900bb145 check-code: check for spaces around = for named parameters 2013-10-03 14:50:47 +02:00
Matt Mackall
b73d929200 debugshell: appease pyflakes 2013-09-23 14:28:01 -07:00
Augie Fackler
1e3892da3b check-code: new rule to forbid imports of a.b on the same line as other imports
This style of import can trip up 2to3 and cause it to produce invalid
files if one of the imports is supposed to be a relative import. This
prevents that behavior, and in the process exposed a lot of silly
import errors related to the email module.
2013-09-20 10:18:09 -04:00
Augie Fackler
2727bcf864 perf: rearrange imports of changelong and manifest to appease check-code 2013-09-20 10:14:59 -04:00
Sean Farley
e9de00a5cf debugshell: check ui.debugger for which debugger to use 2013-07-14 12:16:40 -05:00
Sean Farley
12aa25fc95 debugshell: add function to embed ipython 2013-07-14 12:02:36 -05:00
Sean Farley
d417793377 debugshell: abstract out pdb code.interact 2013-07-14 12:10:52 -05:00
Matt Mackall
c1fcd00695 check-code: add bracket style check 2013-09-18 14:36:19 -05:00
Matt Mackall
b8ff933b09 check-code: check C patterns against .h files 2013-09-17 18:19:04 -05:00
Matt Mackall
5f16d1c838 check-code: make casting style check more precise 2013-09-17 18:13:54 -05:00
Siddharth Agarwal
10bb361ad4 perfmanifest: allow and require passing in a rev
Previously perfmanifest would only test tip.
2013-09-06 13:35:29 -07:00
Siddharth Agarwal
79b9a1c4e5 perfmanifest: fix cache invalidation
The manifest cache is now stored in _mancache. The revlog cache is still stored
in _cache.
2013-09-06 13:20:07 -07:00
Danek Duvall
d0c8a3b9e7 solaris: tests can't use tail -n
Solaris tail doesn't recognize the -n option.  Replace the one use of it
with some inline python code, and add a test case to check-code.py.
2013-08-26 15:20:44 -07:00
Danek Duvall
dd1467f6d7 solaris: test cases can't use grep -a
The -a option to GNU grep isn't available when using Solaris grep.  Replace
the one use of grep -a in the testsuite with some in-line Python that does
the equivalent, and add a check for grep -a in check-code.py.
2013-08-23 14:31:42 -07:00
Jeff Sickel
f414ef5bee hgrc.d: separate namespace for mercurial scripts 9diff and 9mail 2013-08-15 21:35:56 -04:00
Jeff Sickel
e34e7ec865 9mail: new script to add support for Plan 9 upas/marshal email wrapper 2013-08-12 17:36:49 -05:00
Pascal Quantin
b52e26e4ec win32: update Inno Setup installer script and extensions list 2013-07-27 21:16:12 +02:00
Augie Fackler
ac76c4f1a9 check-code: add a check for the next() builtin, which was new in 2.6 2013-07-25 10:44:51 -04:00
Simon Heimberg
7ea18de5fd check-code: do not abort on an unreadable file, only report this 2013-07-22 10:04:45 +02:00
Siddharth Agarwal
5bb5f70476 doc: bump copyright year 2013-07-17 17:34:47 -07:00
Simon Heimberg
83278fd7d4 check-code: automatically preppend "warning: " to all warning messages
Some warnings had "warning: " at the beginning of their message. Now this
is done consistent for all messages.
Especially in test-check-code-hg.t it is an advantage to see warnings at once
because only exceptions to them are tolerated. It is (almost) as obvious as
before a6180647ea.

The prefix will not remain when a warning is changed to a failure. A change
like a91387a37f will not be necessary anymore.
2013-07-16 01:29:14 +02:00
Simon Heimberg
be961a468d check-code: concatenate "check-code" on compile time
The python compiler concatenates two string constants. Use this instead of
doing it on run time or instruct the user how to do it.
The strings "no-check-code" and "check-code-ignore" has to be specially written
for not skipping some checking of the code of this file.
2013-07-01 06:50:58 +02:00
Simon Heimberg
3fb7bd830f check-code: do not warn on printf \\x or \\[1-9]
When there is a double backslash the following char does not have any special
meaning. So do not warn on this.
Remove the now obsolete no-check-code statement. (It was used wrongly anyway, it
skipped checking the entire file.)
2013-07-01 06:50:58 +02:00
Simon Heimberg
6059e06d0f cleanup: drop unused variables and an unused import 2013-07-01 20:48:56 +02:00
Simon Heimberg
dc62f025d3 contrib: delete setup3k in favor of setup --c2to3
setup3k was merged into setup in 7a7a1c594d. Now finally get rid of it.
2013-06-13 01:37:02 +02:00
Simon Heimberg
8a32578a00 cleanup: remove unused imports
detected by pyflakes
2013-06-13 01:36:58 +02:00
Simon Heimberg
bfbc27c057 check-code: introduce function for using re2 when available
Do it similar as in mercurial.util. For simplicity only support flag
multiline which is the only one used.
2013-06-08 20:20:14 +02:00
Simon Heimberg
11469e2f90 check-code: compile filters when loading 2013-06-08 20:20:14 +02:00
Simon Heimberg
1f8c40a6d5 check-code: compile all patterns on initialisation
They where compiled once for every checked file (when calling finditer).
2013-06-08 20:20:14 +02:00
Simon Heimberg
5fb5cb59f5 check-code: only fix patterns once
The patterns were fixed once for every file. Now only do it once when loading
the file.
2013-06-08 20:20:14 +02:00
Durham Goode
94d98a2fbb annotate: simplify annotate parent function
The annotate algorithm used a custom parents() function to try to reuse
filectx and filelogs. I simplified it a bit to rely more heavily on the
self.parents() which makes it work well with alternative filectx
implementations. I tested performance on a file with 5000+ revisions
but no renames, and on a file with 500 revisions repeating a series of
4 edits+renames and saw zero performance hit.  In fact, it was reliably a
couple milliseconds faster now.

Added the perfannotate command to contrib/perf.py for future use.
2013-05-30 19:29:03 -07:00
Benoit Boissinot
2252ad24c8 shrink: delete extension preventing further refactoring (BC)
Reordering can be done by setting bundle.reorder to true and doing a
clone --pull.
2013-05-10 22:47:12 +02:00
Sune Foldager
e548f184d2 bundle-ng: move gengroup into bundler, pass repo object to bundler
No semantic changes made.
2013-05-10 21:35:49 +02:00
Sune Foldager
6bd4fdfe9d bundle-ng: move group into the bundler
No additional semantic changes made.
2013-05-10 21:03:01 +02:00
Benoit Boissinot
3329216677 bundle-ng: move bundler creation up in the stack
Create a simple start() method to pass the lookup function until bundler
becomes smarter and gets a repo object.

Since we now create the bundler for the whole lifetime, we need to pass it
down to revlog methods.
2013-05-10 20:37:41 +02:00
Matt Mackall
7446e64692 check-code: add another Windows pathsep rule 2013-05-09 15:22:54 -05:00
Brendan Cully
94ee9d1cb5 tests: check path separator in moves 2013-05-03 14:19:30 -07:00
Matt Mackall
2d6d229def check-code: add more path sep glob checks 2013-05-02 15:21:47 -05:00
FUJIWARA Katsunori
071d89abd0 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.
2013-04-26 01:12:03 +09:00
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