Commit Graph

18496 Commits

Author SHA1 Message Date
Angel Ezquerra
4651989f9b extensions: obsolete and remove interhg extension
With the addition of the websub filter extension this extension is no longer
needed. We maintain a sort of backwards compatibility by reading the [interhg]
section and using it as we would use the [websub] section.
2013-02-09 11:00:42 +01:00
Angel Ezquerra
e25f843231 hgweb: apply the websub filter to revision descriptions
In order to use this, add a [websub] section to your configuration and add
websub expressions such as:

italic = s/\b_(\S+)_\b/<i>\1<\/i>/
bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!<a href="http://bz.selenic.com/\2">\1</a>!i

This also adds documentation (proofed by Kevin!) to the config help section.
2013-02-09 16:48:21 +01:00
Angel Ezquerra
ed79324ad4 hgweb: add websub template filter
The purpose of this new filter is to make it possible to partially replace the
functionality of the interhg extension. The idea is to be able to define regular
expression based substitutions on a new "websub" config section. hgweb will then
be able to apply these substitutions wherever the "websub" filter is used on a
template.

This first revision just adds the code necessary to load the websub expressions
and adds the websub filter, but it does not add any calls to the websub filter
itself on any of the templates. That will be done on the following revisions.
2013-02-08 18:05:32 +01:00
Durham Goode
89fa09c11d addremove: don't audit the path for paths already in the dirstate
Now that dirstate.walk returns None for paths under symlink directories,
addremove doesn't need to validate each path it sees to look for files
under symlinks.

On a large repository this brings addremove from 6.3 seconds down to 3.65 (42%)
since addremove no longer has to stat every directory of every file to determine
if the file is inside a symlink directory. I put it through our benchmark and
see no perf hit to any other commands.
2013-02-05 14:36:19 -08:00
Durham Goode
b4e95fed5e dirstate: walk returns None for files that have a symlink in their path
Previously dirstate.walk would return a stat object for files in the dmap
that have a symlink to a directory in their path.  Now it will return None
to indicate that they are no longer considered part of the repository. This
currently only affects walks that traverse the entire directory tree (ex:
hg status) and not walks that only list the contents of the dmap (ex: hg diff).

In a situation like this:
  mkdir foo && touch foo/a && hg commit -Am "a"
  mv foo bar
  ln -s bar foo

'hg status' will now show '! foo/a', whereas before it incorrectly considered
'foo/a' to be unchanged.

In addition to making 'hg status' report the correct information, this will
allow callers to dirstate.walk to not have to detect symlinks themselves,
which can be very expensive.
2013-02-04 14:27:15 -08:00
Durham Goode
2aa5fd3151 pathauditor: add check() method
The pathauditor currently throws exceptions when it encounters an invalid
path. This change adds a method to allow people to treat it as a boolean.
This is currently used by scmutil.addremove and in a subsequent patch it
will be used by dirstate.walk
2013-02-05 14:24:14 -08:00
Matt Mackall
2f3cd110be summary: add missing space for updated active bookmark display 2013-02-09 22:54:34 +00:00
Kevin Bullock
fe0a5f965c summary: show active bookmark even if not at current changeset
Before this change, 'hg summary' would not show the active bookmark
unless it pointed to the working directory parent. After this change, it
will show it in parentheses, like so:

parent: 18581:f0ff45fe6700 tip
 summary: simplify handling of active bookmark
branch: default
bookmarks: [crew]
commit: (clean)
update: (current)
2013-02-08 21:47:22 +00:00
Kevin Bullock
9d31a18963 summary: simplify handling of active bookmark 2013-01-27 11:53:46 -06:00
Kevin Bullock
dc98d75652 summary: test that current bookmark isn't shown
This exposes the current behavior in a test. A later change will make
summary show when the active bookmark has moved out from under us.
2013-02-08 21:32:43 +00:00
Kevin Bullock
ba05110692 merge crew heads 2013-02-09 22:27:13 +00:00
Kevin Bullock
a3e89d4e05 merge with stable 2013-02-09 22:25:58 +00:00
Pierre-Yves David
306badf4c6 outgoing: fix possible filtering crash in outgoing (issue3814)
If there is no outgoiing changesets but we have filtered revision in outgoing.excluded
We run into a filtering related crash. The excluded revision should not be there
in the first place but discovery need cleanup in default, not stable.
2013-02-09 17:54:01 +00:00
Augie Fackler
e8c901fc2d parsedate: understand "now" as a shortcut for the current time 2013-02-09 15:39:22 -06:00
Augie Fackler
8671b3e731 export: clobber files with -o (bc) (issue3652)
This violated user expectation. Updated the code to clobber files, but
preserve the behavior of appending multiple patches requested in a
single export. Includes tests.
2013-02-09 15:38:57 -06:00
Bryan O'Sullivan
88fa66b36f merge: don't call copies.mergecopies unless we need to
This reduces the amount of time we spend calculating when doing a clean
non-merge update. In a large repo, the time dropped from 10.1 seconds
to 3.4.
2013-02-09 21:24:36 +00:00
Bryan O'Sullivan
f7ffd2b365 merge: rename p1 to wctx in manifestmerge
This is always a workingctx, and this name is more in line with other
functions in this module.
2013-02-09 21:24:24 +00:00
Pierre-Yves David
26c59c042c outgoing: fix possible filtering crash in outgoing (issue3814)
If there is no outgoiing changesets but we have filtered revision in outgoing.excluded
We run into a filtering related crash. The excluded revision should not be there
in the first place but discovery need cleanup in default, not stable.
2013-02-09 17:54:01 +00:00
Na'Tosha Bard
7b4ce40b7d largefiles: fix test and check code 2013-02-09 16:02:01 +00:00
Simon Heimberg
d394522225 histedit: always abort with same message when working dir is wrong.
Using only one message makes live easier for translators. The clearer
error message was supposed by Augie Fackler.
2013-08-03 16:40:13 +02:00
Simon Heimberg
6e94c23bab histedit: report when revisions to edit are not ancestors of working dir
Editing the history only is possible when the working dir is a descendant of
the revisions to edit. When this happens explain it by writing
  abort: %s is not an ancestor of working directory
2013-08-03 16:37:17 +02:00
Bryan O'Sullivan
673afa4e4f Merge 2013-02-09 15:59:44 +00:00
Siddharth Agarwal
52f9cd4b20 manifestmerge: handle abort on local unknown, remote created files
This replaces the _checkunknown call in calculateupdates with a more
performant version. On a repository with over 150,000 files, this speeds up an
update by 0.6-0.8 seconds, which is up to 25%.

This does not introduce any UI changes. There is existing test coverage for
every case, mostly in test-merge*.t.
2013-02-09 15:36:00 +00:00
Kevin Bullock
5353c124c3 tests: remove last two check-code warnings about killdaemons
Removes the last of the warnings in test-check-code-hg.t introduced in
fcbcb17ae5ed.
2013-02-09 13:58:13 +00:00
Kevin Bullock
e1f1e38c39 tests: guard against obsolete markers in the hg repo itself
If obsolete markers appear in the hg repo (because of enabling evolve),
then tests that run hg against the hg repo itself will see warnings like:

  obsolete feature not enabled but 4 markers found!

As far as I can tell, this only occurs in test-check-code-hg.t -- in
particular, it will -not- show up on tests that run against test-created
repos, as most of the test suite does.
2013-02-09 13:35:45 +00:00
Na'Tosha Bard
3d65ebe9c1 largefiles: make caching largefiles message more explicit
In some cases, caching largefiles may take a long time (if the user has
pulled a lot of new heads).  This patch makes it more clear what is happening,
by showing the number of heads we are caching largefiles for.
2013-02-09 15:08:21 +00:00
Na'Tosha Bard
5cbae337c9 largefiles: document behavior of caching largefiles for new heads 2013-02-09 15:25:46 +00:00
Benoit Boissinot
957d1fe448 check-code: add Makefile target to run check-code 2013-02-09 15:57:04 +01:00
Augie Fackler
010dfef31a byterange: remove now-unused sys import 2013-02-09 07:44:22 -06:00
Augie Fackler
b2f57ecfe9 test-obsolete.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:37:36 -06:00
Augie Fackler
74aee9b680 test-inotify.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:36:19 -06:00
Augie Fackler
bddb04dfb4 test-inotify-lookup.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:35:20 -06:00
Augie Fackler
ff3429d228 test-inotify-issue1556.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:34:22 -06:00
Augie Fackler
63cc9c8e29 test-inotify-issue1542.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:33:39 -06:00
Augie Fackler
5030070b2b test-inotify-issue1371.t: switch to killdaemons from kill cat pidfile 2013-02-09 05:32:00 -06:00
Augie Fackler
6ca6df22df test-inotify-debuginotify.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:30:40 -06:00
Augie Fackler
99be2eecf2 test-hgweb-raw.t: use killdaemons instead of kill cat pidfile 2013-02-09 05:29:10 -06:00
Augie Fackler
35b5aef714 test-https.t: stop using kill cat $pidfile 2013-02-09 05:26:16 -06:00
Augie Fackler
f03df466e2 changelog: hexlify node when throwing a LookupError on a filtered node
The non-hexlified node was leaking all the way out to the web
interface, and wasn't consistent with the behavior for nonexistent
nodes.
2013-02-09 06:07:32 -06:00
Augie Fackler
bdb75bb2c5 byterange: remove old two-arg raise trick
We don't care about the original traceback, and this was frustrating
any efforts to make the code work on Python 3.3.
2013-02-08 17:14:12 -06:00
Benoit Boissinot
41300c28e0 revlog: document v0 format 2013-02-09 12:08:02 +01:00
Kevin Bullock
39e322507e merge crew heads 2013-02-09 10:40:26 +00:00
Kevin Bullock
6404b2f5c3 merge with mpm stable 2013-02-09 10:36:31 +00:00
Matt Mackall
d78b426c36 Added signature for changeset 5c74aaae6be4 2013-02-08 23:13:47 +00:00
Matt Mackall
c9e95d654a merge with i18n 2013-02-08 22:58:58 +00:00
Benoit Boissinot
077bafacf4 templater: add get() function to access dict element (e.g. extra) 2013-02-08 23:49:14 +01:00
Kevin Bullock
7974778403 check-code: fix platform-specific error code variance
test-check-code-hg.t uses xargs to invoke check-code.py on every file in
'hg manifest'. The return code from xargs varies between BSD xargs and
GNU xargs: BSD will return 1 if any invocation exits with an error code;
GNU xargs will return 123 in this case. This normalizes the exit code
back to 1.
2013-02-08 22:42:07 +00:00
Benoit Boissinot
b38415dcd7 templates: export extra as a dict to templates
Currently only useful with the json filter.
2013-02-08 21:55:46 +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
Siddharth Agarwal
ace5cac25b manifestmerge: pass in branchmerge and force separately
This will be used in an upcoming patch.
2013-02-08 15:23:23 +00:00