Commit Graph

16530 Commits

Author SHA1 Message Date
wujek srujek
a4762c56c6 hgweb: fixes linebreak location in gitweb filediff.tmpl view
It is consistent with other templates now and doesn't cause the help link to
(incorrectly) appear on the next line.
2012-06-04 18:03:23 +02:00
Matt Mackall
0fcdc937c2 Added signature for changeset a1e1826de33a 2012-06-01 23:48:27 -05:00
Matt Mackall
f6aed3cb78 merge with i18n 2012-06-01 15:14:13 -05:00
Bryan O'Sullivan
ca79cf4afa scmutil: seen.union should be seen.update (issue3476) 2012-05-31 20:55:30 -07:00
Patrick Mezard
5315858d38 patch: keep patching after missing copy source (issue3480)
When applying a patch renaming/copying 'a' to 'b' on a revision where
'a' does not exist, the patching process would abort immediately,
without processing the remaining hunks and without reporting it. This
patch makes the patching no longer abort and possible hunks applied on
the copied/renamed file be written in reject files.
2012-06-01 17:37:56 +02:00
Wagner Bruna
91fd22d273 i18n-pt_BR: synchronized with 9afcfbca1710 2012-05-31 21:47:40 -03:00
Matt Mackall
2d85685b68 merge with i18n 2012-05-30 14:31:29 -05:00
Matt Mackall
d4e4a5b5be revpair: handle odd ranges (issue3474) 2012-05-30 14:13:57 -05:00
Idan Kamara
6259990e39 localrepo: clear _filecache earlier to really force reloading (issue3462)
b67b333b0d8a attempted to force the filecaches in localrepo to reload
everything after a rollback. But simply clearing _filecache isn't enough,
invalidate() needs to be called before/after. localrepo._rollback calls
invalidate() already, so we clear the map right afterwards which ensures
everything will be reread.
2012-05-29 18:27:12 +03:00
FUJIWARA Katsunori
53d7bfd5d8 i18n-ja: synchronized with 878641b4f1d3 2012-05-29 21:32:50 +09:00
Alexander Sauta
785c6458c0 i1n-ru:synchronized with 0ee6800b3663 2012-05-27 15:37:36 +01:00
Wagner Bruna
fadad79d3f i18n-pt_BR: synchronized with 8381a52c9211 2012-05-27 09:52:25 -03:00
FUJIWARA Katsunori
abfb6c35d4 match: make 'match.files()' return list object always
'exact' match objects are sometimes created with a non-list 'pattern'
argument:

  - using 'set' in queue.refresh():hgext/mq.py
        match = scmutil.matchfiles(repo, set(c[0] + c[1] + c[2] + inclsubs))

  - using 'dict' in revert():mercurial/cmdutil.py (names = {})
        m = scmutil.matchfiles(repo, names)

'exact' match objects return specified 'pattern' to callers of
'match.files()' as it is, so it is a non-list object.

but almost all implementations expect 'match.files()' to return a list
object, so this may causes problems: e.g. exception for "+" with
another list object.

this patch ensures that '_files' of 'exact' match objects is a list
object.

for non 'exact' match objects, parsing specified 'pattern' already
ensures that it it a list one.
2012-05-23 00:25:29 +09:00
Patrick Mezard
139c15da66 revset: fix infinite alias expansion detection
The alias expansion code it changed from:
1- Get replacement tree
2- Substitute arguments in the replacement tree
3- Expand the replacement tree again

into:

1- Get the replacement tree
2- Expand the replacement tree
3- Expand the arguments
4- Substitute the expanded arguments in the replacement tree

and fixes cases like:

  [revsetalias]
  level1($1, $2) = $1 or $2
  level2($1, $2) = level1($2, $1)

  $ hg log -r "level2(level1(1, 2), 3)"

where the original version incorrectly aborted on infinite expansion
error, because it was confusing the expanded aliases with their
arguments.
2012-05-19 17:19:55 +02:00
Patrick Mezard
c7a80dee31 revset: explicitely tag alias arguments for expansion
The current revset alias expansion code works like:
1- Get the replacement tree
2- Substitute the variables in the replacement tree
3- Expand the replacement tree

It makes it easy to substitute alias arguments because the placeholders
are always replaced before the updated replacement tree is expanded
again. Unfortunately, to fix other alias expansion issues, we need to
reorder the sequence and delay the argument substitution. To solve this,
a new "virtual" construct called _aliasarg() is introduced and injected
when parsing the aliases definitions. Only _aliasarg() will be
substituted in the argument expansion phase instead of all regular
matching string. We also check user inputs do not contain unexpected
_aliasarg() instances to avoid argument injections.
2012-05-19 17:18:29 +02:00
Augie Fackler
3dc5160169 util: fix bad variable use in bytecount introduced by ad5e3bec298e 2012-05-21 14:24:24 -05:00
Matt Mackall
ca006af287 context: grudging accept longs in constructor 2012-05-21 16:32:50 -05:00
Matt Mackall
c082b3d973 win32: fix encoding handling for registry strings (issue3467)
This stopped handling non-ASCII strings in 1.8
2012-05-21 16:32:49 -05:00
FUJIWARA Katsunori
db8047a1c0 doc: add detail explanation for 'present()' predicate of revsets 2012-05-16 17:02:30 +09:00
Matt Mackall
1af38adeb7 osutil: handle deletion race with readdir/stat (issue3463) 2012-05-18 14:34:33 -05:00
Matt Mackall
4bd5c2d220 merge with i18n 2012-05-17 12:15:30 -05:00
Alexander Sauta
4b12c54fc2 i18n-ru: synchronized with 88b33d9639ed 2012-05-15 14:58:16 +01:00
Sune Foldager
aea3159eaa bundle: make bundles more portable (isue3441)
This is achieved by acting as if the user had given -r<rev> for each head rev
of outgoing changesets on the command line, as well as appropriate
--base <rev>.

The discovery information is computed as normal, and then adjusted as above.
2012-05-12 19:38:20 +02:00
Matt Harbison
353d5deeb2 revset: fix traceback for bogus revisions in id(rev)
hg log -r "id(1234567)" now returns an empty list like rev() does.
2012-05-14 19:25:13 -04:00
Thomas Arendsen Hein
6dc228e4f6 Makefile: remove generated mercurial/__version__.py 2012-05-15 12:44:07 +02:00
Mark Round
7b5857715d posix: workaround lack of TIOCGWINSZ on Irix (issue3449)
On an Irix 6.5.24 system, TIOCGWINSZ is not available. This means that
any usage of the "hg" tool that looks up the terminal size (e.g. "hg
help") will fail with an AttributeError.

A simple work-around is just to wrap this block in mercurial/posix.py
with a try/except so that it ends up using the default 80 characters
width.
2012-05-14 13:25:42 +01:00
Matt Mackall
dbfb64e582 hgweb: fix filediff base calculation
Previously, we were finding the most recent version of a file in a
changeset and comparing it against its first file parent. This was
wrong on three counts:

- it would show a diff in revisions where there was no change to a file
- it would show a diff when only the exec bit changed
- it would potentially compare against a much older changeset, which
  could be very expensive if git-style rename detection was enabled

This compares the file in the current context with that context's
parent, which may result in an empty diff when looking at a file not
touched by the current changeset.
2012-05-14 12:56:43 +02:00
Mads Kiilerich
b315fbc5ab largefiles: use wlock for lfconvert (issue3444)
largefiles and lfconvert do dirty hacks with dirstate, so to avoid writing that
as a side effect of the wlock release we clear dirstate first.

To avoid confusing lock validation algorithms in error situations we unlock
_before_ removing the target directory.
2012-05-13 17:34:55 +02:00
Matt Mackall
732d9d463a merge with i18n 2012-05-13 11:19:48 +02:00
Wagner Bruna
a0f8506b26 i18n-pt_BR: synchronized with 636975388817 2012-05-08 15:31:14 -03:00
Patrick Mezard
742f6b3850 pure/base85: align exception type/msg on base85.c
brendan mentioned on IRC that b64decode raises a TypeError too, but while the
previous exception type may be better in general, it is much easier to make it
behave like the related C code and changes nothing for mercurial itself.
2012-05-07 21:49:45 +02:00
Matt Mackall
d8dfd80d76 parsers: fix refcount bug on corrupt index
When we encounter a corrupt index, we "fail" the init but our
destructor still gets called. On some systems, this was causing us to
attempt to decref a dangling to self->data.
2012-05-07 15:40:50 -05:00
Patrick Mezard
f49c9eec1a subrepo: do not traceback on .hgsubstate parsing errors
Note that aborting in subrepo.state() prevents "repairing" commands like revert
to be issued. The user will have to edit the .hgsubstate manually (but he
probably had already otherwise this would not be failing). The same behaviour
already happens with invalid .hgsub entries.
2012-05-04 14:19:55 +02:00
Patrick Mezard
a124dced40 subrepo: ignore blank lines in .hgsubstate (issue3424)
Reported by Sebastian Krysmanski <infomail@lordb.de>
2012-05-04 14:19:52 +02:00
hlian
992a6313f9 largefiles: in putlfile, ensure tempfile's directory exists prior to creation
Let R be a repo served by an hg daemon on a machine with an empty largefiles
cache. Pushing a largefiles repo to R will result in a no-such-file-or-directory
OSError because putlfile will attempt to create a temporary file in
R/.hg/largefiles, which does not yet exist.

This patch also adds a regression test for this scenario.
2012-05-04 14:36:40 -04:00
Bryan O'Sullivan
130a47d385 bisect: save current state before running a command
This prevents an external command being run during a bisect from
querying stale data.
2012-05-02 17:15:11 -07:00
Yuya Nishihara
8284425c7d commands: parse ui.strict config item as bool 2012-05-06 23:58:04 +09:00
Patrick Mezard
9b4af94333 largefiles: fix "hg status dir" missing regular files (issue3421)
largefiles status implementation attemps to rewrite the input match objects to
match the "standins" as well as the regular files. When fixing the directories
listed in match.files(), if there was related standin entry, it was kept and
the original path discarded. But directories can appear both as regular and
standin entries.
2012-05-06 13:14:58 +02:00
Adrian Buehlmann
ac14489dc7 help/config: remove outdated false claim about pywin32
Since version 1.8 (released on 2011-03-01), Mercurial doesn't use pywin32 any
more. The old fallback mechanism to use C:\Mercurial\Mercurial.ini if pywin32 is
not installed was removed in 1fa0a833f143.
2012-05-06 10:36:32 +02:00
Steven Stallion
d5d80849ef factotum: add man reference to help output 2012-05-04 09:14:55 -07:00
Martin Geisler
da730824fe paper, monoblue: link correctly to lines in annotate view
The links were to "foo#123" instead of "foo#l123". The gitweb and
spartan templates were already producing the correct links.
2012-05-04 12:04:07 +02:00
Matt Mackall
17375148cb Added signature for changeset da339fc71ca6 2012-05-03 16:06:33 -05:00
Matt Mackall
ed0ae26f56 bookmarks: catch the proper exception for missing revisions
This fixes a regression from 1.7
2012-05-03 16:03:08 -05:00
Bryan O'Sullivan
1eb25dc7ef parsers: fix refcount leak, simplify init of index (issue3417)
This is most easily verified using valgrind on a long-running
process, as the leak has no visible consequences during normal
one-shot command usage.

In one window:

  valgrind --leak-check=full --suppressions=valgrind-python.supp \
    python ./hg serve

In another:

  for ((i=0;i<100;i++)); do
    curl -s http://localhost:8000/file/tip/README >/dev/null
  done

valgrind should report no leaks.
2012-05-02 14:37:44 -07:00
Na'Tosha Bard
da576e6ebb largefiles: fix commit of both largefiles and non-largefiles (issue3354)
This bug was caused by some old code that should have been removed long ago.
2012-05-03 15:24:45 +02:00
Paul Boddie
2b32ff611e help: added description for the web.collapse setting
The collapse configuration setting for hgweb was recently
introduced, but the help text was unfortunately omitted from the
patch concerned. This patch provides a suitable help text.
2012-05-03 01:07:22 +02:00
A. S. Budden
95a9277375 help: add reference to template help (issue3413)
There is currently no clear link between the help for log
and the help on templates.  The log option is --template
but the template help is 'help templating' or 'help templates'.
This patch makes 'hg help template' work and also adds a
note into the log help explaining where to find more info.
2012-05-01 22:14:51 +01:00
Matt Mackall
42ad4a30f1 Added signature for changeset 3d09cfbfd04c 2012-05-01 16:40:31 -05:00
FUJIWARA Katsunori
dfcb34bd3f i18n-ja: synchronized with ae8f8ec04f94 2012-05-01 19:09:15 +09:00
Wagner Bruna
a0188871df i18n-pt_BR: synchronized with 4648276b8935 2012-05-01 00:52:57 -03:00