Commit Graph

5274 Commits

Author SHA1 Message Date
Alexander Solovyov
32999e4659 make path expanding more consistent
This expands ~user and $FOO constructs in ui.ignore files, [defaults],
[paths], extension paths, and HGRCPATH files.
2009-10-19 22:19:28 +03:00
David Soria Parra
38f791302b commands: clarify output for the commit summary
It is not clear what is meant with '2 modified, 3 unknown'. We clarify
this by writing '2 modified files, 3 unknown files' instead.
2009-10-19 07:14:44 +02:00
Martin Geisler
a806763de0 commands: do not split a translated string
Splitting the string after translation relies on the implicit
assumption that translators will always translate the English words
using single foreign words.

Also, when translating we want as much context as possible so I've
moved the string formatting into the translatable string.
2009-10-19 14:37:37 +02:00
Matt Mackall
993bb8325e Introduce summary command 2009-10-18 22:31:05 -05:00
Patrick Mezard
990e7895a0 Merge with crew-stable 2009-10-16 00:06:23 +02:00
Patrick Mezard
7b9a712086 patch: handle symlink updates/replacements (issue1785) 2009-10-15 23:15:30 +02:00
Patrick Mezard
5c89cb752a patch: handle symlinks without symlinkhunk
Symlink creations and deletions were handled with a special symlinkhunk object,
working like a binary hunk. However, this model does not support symlink
updates or replacements, so we teach regular hunks how to handle symlinks.
2009-10-15 23:15:30 +02:00
Matt Mackall
207b3fe6fe bisect: use util.system and fix good/bad when using -c
The existing scheme using util.find_exe and subprocess.call meant we
couldn't use simple shell commands in tests. Fix that.

Also, it mistakenly used status from the system() call rather than
good from the bisect call in reporting results.
2009-10-12 18:25:46 -05:00
Matt Mackall
34aac1e48a bisect: limit considered set to descendants of first good rev 2009-10-12 14:59:28 -05:00
Dirkjan Ochtman
2b60214db7 merge with hg-stable 2009-10-10 12:19:58 +02:00
Dirkjan Ochtman
02b4677d86 encoding: fix issue with non-standard UTF-8 CTYPE on OS X 2009-10-10 12:00:43 +02:00
Patrick Mezard
a7d029beb4 patch: do not swallow header-like patch first line (issue1859)
Current solution is hackish but looks like a good trade-off short of rewriting
patch.extract() significantly.
2009-10-08 23:42:33 +02:00
Patrick Mezard
6815e3dc8d windows: fix unlink() not dropping empty tree (issue1861) 2009-10-08 23:32:36 +02:00
Matt Mackall
b6547e5312 Merge with stable 2009-10-11 13:54:19 -05:00
Matt Mackall
20668220a1 Merge with -stable 2009-10-08 00:59:46 -05:00
Matt Mackall
daf9754427 Merge with -crew-stable 2009-10-07 23:25:41 -05:00
Adrian Buehlmann
db3cee7306 util: move rename into posix.py and windows.py 2009-10-07 20:32:07 +02:00
Adrian Buehlmann
d2944ad3db util: state docstring of rename more precisely 2009-10-07 20:16:43 +02:00
Adrian Buehlmann
692aa6b826 util.rename: do not abort if os.unlink fails (issue1840) 2009-10-06 10:45:23 +02:00
Greg Ward
889a9ffb8d cmdutil: changeset_printer: use methods of filectx/changectx.
This allows extensions that modify changeset metadata (e.g.
description) by overriding methods of changectx to get consistent
behavior from all log-like commands, regardless of whether templates
or styles are used. Without this, overriding changectx methods works
if you use styles or templates, but not with default log format.

This meant adding filectx.extra() for consistency with changectx.
2009-10-05 18:17:13 -04:00
Patrick Mezard
c463f2299e verify: detect file copy sources not in parents with --verbose 2009-10-06 22:46:31 +02:00
Steve Borho
7ec5773565 Merge with crew-stable 2009-10-06 16:08:38 -05:00
Martin Geisler
8b8fb723b7 help: un-indent help topics
The help topics are reused in the HTML documentation, and there it
looks odd that whole sections are indented. We now only indent it for
output on the terminal.
2009-10-04 12:18:43 +02:00
Martin Geisler
524b665b54 help: move help topics from mercurial/help.py to help/*.txt
The help topics are loaded on demand so we wont hit the disk unless we
really have to.
2009-10-04 09:59:13 +02:00
Matt Mackall
721ca9098c Fix for issue1848 2009-10-03 15:57:48 -05:00
Martin Geisler
3550fb27d7 i18n: remove unnecessary os.path.normpath call 2009-10-03 18:58:25 +02:00
Martin Geisler
cb4bdf9a1e commands: simpler sort of help topic names 2009-10-04 10:17:01 +02:00
Mads Kiilerich
8ff24147fd cmdutil: templating keywords latesttag and latesttagdistance
This can be used for referring to revisions in a reasonable
meaningful, stable and monotonically increasing way, suitable for
releases or builds directly from a repository.

The latest tag is found by searching through untagged ancestors and
finding the latest tagged ancestor based on tag date. The distance is
found from the length of the longest path to the tagged revision.

For example:
  hg log -l1 --template '{latesttag}+{latesttagdistance}\n'
can return
  1.3.1+197

This is mostly work by Gilles Moris <gilles.moris@free.fr>
2009-10-03 18:31:20 +02:00
Benoit Boissinot
b0e2f2aa9e merge with mpm 2009-10-03 23:38:10 +02:00
Benoit Boissinot
3978618d04 bdiff: gradually enable the popularity hack
Patch from Jason Orendorff

The lower the threshold, the stronger the popularity hack's
influence. So at 3999 lines, the hack is disabled; and at 4000 lines,
the hack is enabled at maximum strength (t=4).

No source file in mercurial/crew is over 4000 lines. But there are, oh,
a few such files in Mozilla.  I can testify that this hack causes hg to
generate some correct but eyebrow-raising patches.

I think the hack should phase in gradually. The threshold should be high
for small files where we don't need it so much.  Like this:

        t = (bn < 31000) ? 1000000 / bn : bn / 1000;

That would leave the popularity hack disabled for small files, then
gradually phase it in:

    bn <   1000   --   t > bn    (popularity hack is completely disabled)
    bn ==  1000   --   t = 1000  (still effectively disabled)
    bn ==  2000   --   t =  500  (only hits unusual files)
    bn == 10000   --   t =  100  (only hits especially common lines)
    bn == 31000   --   t =   31  (hack is at maximum power)
    bn == 32000   --   t =   32  (hack could backfire, ease off)
2009-10-03 23:36:08 +02:00
Greg Ward
0957bc4d5c dirstate: add/improve method docstrings.
- add doc to __init__(), _map(), status()
- enhance for __getitem__()
- fix inaccurate doc for walk() (described wrong return type)
2009-10-01 15:36:45 -04:00
Martin Geisler
42c594dc7e Merge with crew-stable 2009-09-27 09:38:53 +02:00
Martin Geisler
72cc7c5356 util: do not corrupt multi-byte characters in wrap 2009-09-27 01:44:46 +02:00
Sune Foldager
30958eab97 push: fix subtle bug in prepush logic
A test case demonstrating the bug has been added.
Contributed by Henrik Stuart and Sune Foldager.
2009-09-23 18:56:09 +02:00
Adrian Buehlmann
d88b8724c3 mention overlay bundle file in global --repository option
see http://mercurial.selenic.com/wiki/LookingIntoBundles

Drop mentioning symbolic path names for the sake of brevity. This is
a common feature of path options anyway.
2009-09-23 15:57:25 +02:00
Dirkjan Ochtman
a023094f1f merge with crew-stable 2009-09-23 15:54:43 +02:00
Sune Foldager
362c2022cc localrepo: fix bugs in branchheads and add docstring
- The call to reverse() reversed the list in place in the global branchmap.
- The nodesbetween function doesn't preserve ordering.
2009-09-23 15:51:36 +02:00
Mads Kiilerich
097282895a util.system: Use subprocess instead of os.system
subprocess allows the environment and working directory to be specified
directly, so the hacks for making temporary changes while forking is no longer
necessary.

This also fixes failures on solaris where the temporary changes can't be undone
because there is no unsetenv.
2009-09-20 22:19:18 +02:00
Martin Geisler
969ff27288 Merge with crew-stable 2009-09-19 13:55:18 +02:00
Martin Geisler
af0872c777 dispatch: catch ConfigError while constructing ui 2009-09-19 13:52:54 +02:00
Stuart W Marks
928c430865 hg: say 'hg update' instead of 'hg up' in merge status message
Includes the change to the message itself, along with several test
output files that also had to change.
2009-09-17 22:39:38 -07:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Steve Borho
136a6eb1d4 demandimport: blacklist gtk
Demandimport breaks gtk.  You get a meaningless error about
'failed loading gobject\_gobject.pyd'.  Mercurial does not use gtk,
but this trips up many extension writers.
2009-09-17 17:39:43 -05:00
Martin Geisler
74a6226f22 Merge with crew-stable 2009-09-17 21:52:08 +02:00
Martin Geisler
eb95e5f9c1 commands: expand -c and -C in update error message 2009-09-17 21:50:12 +02:00
Stuart W Marks
fd1368d11d commands: forbid 'hg update --check --clean' 2009-09-17 21:34:05 +02:00
Steve Borho
68d79882b6 windows: provide filename in IOError exceptions
This brings the Windows posixfile errors in line with the errors
on other platforms.
2009-09-14 19:53:43 -05:00
Martin Geisler
cc89e210eb hg: avoid combining translated strings
Combining translated string fragments into bigger strings is bad
practice because it removes context from the fragments. The translator
sees the fragments in isolation and might not jump back to the source
to see how a string like "%d files %s" is actually used.
2009-09-14 23:48:25 +02:00
Steve Borho
9a9a300480 Merge with crew-stable 2009-09-15 11:18:12 -05:00
Nicolas Dumazet
7626c98965 config: abort on indented non-continuation lines (issue1829)
Previously, as soon as a continuation would be met, "cont" would stay
forever set to True, but "item" was set back to "None".
This caused the continuation code bits to run every time, until the next
"self.get(section, item) + '\n'" which would crash.
2009-09-12 11:17:07 +02:00