Commit Graph

1056 Commits

Author SHA1 Message Date
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