Commit Graph

4915 Commits

Author SHA1 Message Date
Matt Mackall
9f78d7798f revlog: use index to find index size 2009-05-07 19:39:45 -05:00
Matt Mackall
00548e0791 revlog: preread revlog .i file
Smaller revlogs can be read with a single read, do it on open.
2009-05-07 19:39:45 -05:00
Sverre Rabbelier
1c34b4064b commit: be more verbose in the -u help text
Make the requirement of an argument for -u a little more explicit.
2009-05-08 16:30:51 +02:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Simon Heimberg
054906a1f5 dirstate: translate forgotten string 2009-05-08 07:54:00 +02:00
Simon Heimberg
f29f0db784 util: overwrite sha1 and _fastsha1 2009-05-08 09:59:15 +02:00
Martin Geisler
ca3bc4a9ab dispatch: remember loaded extensions in a real set 2009-05-07 17:56:57 +02:00
Martin Geisler
97b9a7a062 util: simplify pipefilter and avoid subprocess race
The subprocess module is not thread safe. Spawning a thread to read
the output leads to exceptions like this when Mercurial exits:

  Exception exceptions.TypeError: TypeError("'NoneType' object is not
  callable",) in <bound method Popen.__del__ of <subprocess.Popen
  object at 0x9ed0dcc>> ignored

The bug is already reported in the Python bug tracker:

  http://bugs.python.org/issue1731717
2009-05-07 01:33:44 +02:00
Matt Mackall
01454e7a1b util: kill unused Popen3 2009-05-04 14:22:33 -05:00
Matt Mackall
ec94003cea config: make remap actually work 2009-05-04 14:21:43 -05:00
Martin Geisler
8fdb40802d util: stop overwriting sha1, overwrite _fastsha1 instead
Some modules (like revlog) would import util.sha1 as _sha1. This
defeats the purpose of having util.sha1 overwrite itself with a faster
version -- revlog would end up always calling the slow version. By
always delegating to util._fastsha1 we avoid this at the cost of an
extra (but unconditional) indirection.
2009-05-04 22:14:52 +02:00
Martin Geisler
6533e94352 util: remove md5
This hash function is broken and should not be used by new code. It is
currently only used by keepalive.
2009-05-04 21:30:39 +02:00
Sune Foldager
b19fc2c469 util: remove warnings when importing md5 and sha 2009-05-04 20:29:05 +02:00
Henrik Stuart
d0b7d204d4 transaction: refactor transaction.abort and rollback to use the same code
This adds a change to the way that abort is processed, as it will not continue
truncating files beyond the first failure, otherwise the respective
functionality is maintained, i.e. abort will not unlink files, but rollback
will.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-05-04 15:31:57 +02:00
Benoit Boissinot
fdd0aa0449 verify: reference the correct linkrev when a filelog is missing
when a filelog is missing, the first bad revision is the first revision
where the filelog is referenced, not 0.
2009-05-04 19:51:08 +02:00
Henrik Stuart
fbd8e53ee1 verify: avoid exception on missing file revlog
Previously, accessing the filelinkrevs of a specific file that happens to
have already been unlinked from the filesystem, e.g. due to a partial rollback
having occurred, will trigger a KeyError being raised.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-24 10:44:39 +02:00
Henrik Stuart
206e98a6fb transaction: reset transaction on abort
Prevent the use of the transaction after it has been aborted.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-19 20:02:32 +02:00
Henrik Stuart
db9b1644e1 transaction: ensure finished transactions are not reused
All transactional methods on the transaction class have had a decorator
added that ensures the transaction is running.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-24 09:56:53 +02:00
Martin Geisler
15612f806b commands: fix capitalization in revert help text 2009-05-03 20:34:12 +02:00
Alexander Solovyov
0e1b0cfac7 bisect: use subprocess to get command return code 2009-05-03 10:38:08 +03:00
Martin Geisler
6f75deac3f localrepo: mark commit message template for translation 2009-05-03 00:20:08 +02:00
Martin Geisler
21ba2e96f6 util: initialize md5 and sha1 without using extra global variables
This lets the functions skip the "if _sha1 is None" test on each call.
2009-05-03 00:03:35 +02:00
Martin Geisler
11190d5aaa util: always use subprocess 2009-05-02 23:05:35 +02:00
Martin Geisler
60e8837e82 commands: describe --debug in showconfig help 2009-05-02 21:29:00 +02:00
Martin Geisler
98fbeb0b9f write options in "-r/--rev" style in help texts 2009-05-02 19:13:29 +02:00
Steve Borho
83629eeaea simplemerge: use ui.warn() for warnings 2009-04-30 23:57:36 -05:00
Matt Mackall
83d555f0f7 config: add parse interface 2009-04-30 19:22:06 -05:00
Matt Mackall
f3552e4141 config: allow spaces in key portion of items 2009-04-29 20:47:30 -05:00
Matt Mackall
f4f1e74f08 localrepo: use set for requirements 2009-04-29 20:47:28 -05:00
Matt Mackall
2beed3c7cc dirstate: use propertycache 2009-04-29 20:47:18 -05:00
Matt Mackall
a2f3734c4c localrepo: use propertycache 2009-04-29 20:47:15 -05:00
Steve Borho
52bf113f2e ui: replace regexp pattern with sequence of choices
Use ampersands (&) to delineate the response char in each choice.
ui.prompt() responses are now explicitly case insensitive.  GUIs
that subclass ui can generate dialogs from the full choice names.
2009-04-30 10:15:32 -05:00
Patrick Mezard
695b5f0d5f Fix missing import from 4bea569e9933 merge 2009-04-30 08:38:20 +02:00
Patrick Mezard
0cdb05f6a7 Merge with crew-stable 2009-04-29 23:56:20 +02:00
Martijn Pieters
6644fca213 localrepo: Refactor var names in filecommit to improve readability. 2009-04-28 18:14:49 +02:00
Martin Geisler
29ac8050fe localrepo: corrected outdated comment 2009-04-28 18:32:15 +02:00
Martin Geisler
3ea1f07ffc localrepo: fixed typos in comments 2009-04-28 18:29:50 +02:00
Martin Geisler
bbf34c8655 help: document nonempty template filter. 2009-04-28 17:30:00 +02:00
Martin Geisler
eee44d410e webcommands: move nonempty logic from JavaScript to Python
This avoids hard-coding the '(none)' string in the JavaScript for each
style and avoids the {nonexisting|nonempty} hack which only works
since the template system don't complain about undefined variables.
2009-04-28 17:28:00 +02:00
Rocco Rutte
9aa9232b09 templatefilters: add "nonempty" template filter
It ensures that at least "(none)" is returned in case the argument
passed is None or ''. This is primarily useful to render empty
changelog messages for hgweb but may be useful for others, too.
2009-04-20 11:34:15 +02:00
Patrick Mezard
af0fa1531e keepalive: fix a82d2fe41c70, reintroduce unredirected_hdrs
The previous fix dropped unredirected_hdrs which contain authentication
headers. Removing them break POST request requiring authentication (like
unbundle calls to bitbucket.org).
2009-04-27 22:15:36 +02:00
Martin Geisler
59adad78ff pure/osutil: add copyright and license header 2009-04-26 01:57:12 +02:00
Martin Geisler
cd12c66fa6 match: add copyright and license header 2009-04-26 01:57:00 +02:00
Martin Geisler
f1f94caf9a fancyopts: add copyright and license header 2009-04-26 01:56:52 +02:00
Martin Geisler
539f6e1aac config: add copyright and license header 2009-04-26 01:56:41 +02:00
Martin Geisler
7d509c2459 add blank line after copyright notices and after header 2009-04-26 01:25:53 +02:00
Martin Geisler
2c8901a1b9 turn some comments back into module docstrings 2009-04-26 01:24:49 +02:00
Martin Geisler
8e4bc1e9ad put license and copyright info into comment blocks 2009-04-26 01:13:08 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
ed04819e2f hgweb: pre-init mimetypes module (fixes ugly bug in python-2.6.2 mimetypes)
The ugly initialization hack in mimetypes' initialization procedure can make
hg serve hit the maximum recursion depth when in threaded mode.
2009-04-27 16:29:26 +02:00
Dirkjan Ochtman
6bfc24b2af templater: fix little problem from stylemap() changes 2009-04-27 16:26:31 +02:00
Dirkjan Ochtman
80de6974e4 more whitespace cleanup and some other style nits 2009-04-27 12:37:19 +02:00
Ronny Pfannschmidt
1d760927a4 ui: ui.copy() now takes the ui class into account
Helps subclassing by other API users.
2009-04-27 10:33:57 +02:00
Peter Arrenbrecht
7b457d8a6a whitespace cleanup 2009-04-27 09:12:07 +02:00
Dirkjan Ochtman
388d357896 templater: separate template management and actual string processing 2009-04-06 15:09:54 +02:00
Dirkjan Ochtman
bfe35438ae hgweb: use new sessionvars code in hgwebdir, too 2009-04-27 11:37:30 +02:00
Dirkjan Ochtman
dc1e18ddad hgweb: some cleanups in hgwebdir, remove double defaults
Removed obsolete command, expose useful cleannames function.
2009-04-27 11:37:08 +02:00
Matt Mackall
f6c8930392 replace various uses of list.reverse() 2009-04-26 16:50:44 -05:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Matt Mackall
c15de6b1b7 ui: make interactive a method 2009-04-26 16:50:44 -05:00
Matt Mackall
9ec97bdefe util: take propertycache from context.py 2009-04-26 16:50:44 -05:00
Matt Mackall
de487eacda ui: print_exc() -> traceback() 2009-04-26 16:50:44 -05:00
Matt Mackall
1be9517a0f ui: traceback -> _traceback 2009-04-26 16:50:44 -05:00
Matt Mackall
efc3ded95f ui: report_untrusted fixes
- report_untrusted -> _reportuntrusted
- only report config shadows if enabled
- config shadows are debug messages
2009-04-26 16:50:44 -05:00
Matt Mackall
77cc1dfdeb ui: privatize cdata vars 2009-04-26 16:50:44 -05:00
Matt Mackall
e84a8d1258 ui: buffers -> _buffers 2009-04-26 16:50:44 -05:00
Matt Mackall
30784dabe1 ui: trusted_users -> _trustusers, trusted_groups -> _trustgroups 2009-04-26 16:50:44 -05:00
Matt Mackall
4e3a9053dc ui: assumetrusted -> trust 2009-04-26 16:50:44 -05:00
Matt Mackall
00aa85afa3 ui: _get_cdata -> _data 2009-04-26 16:50:44 -05:00
Matt Mackall
86dab18ddb config: getsource -> source 2009-04-26 16:50:43 -05:00
Matt Mackall
286d20f8b7 ui: simplify fixconfig 2009-04-26 16:50:43 -05:00
Matt Mackall
59ffac0401 ui: fix-up and warn about deprecated %% 2009-04-26 16:50:43 -05:00
Matt Mackall
581beec905 templater: use new config parser
This gives us the ability to use includes and continuations
2009-04-26 16:50:43 -05:00
Matt Mackall
036f77e767 config: add section filter to read
move section filtering out of ui.readconfig
kill section filtering in config.update
2009-04-26 16:50:43 -05:00
Matt Mackall
f74e9a6511 config: deal with spaces at end of line more carefully 2009-04-26 16:50:43 -05:00
Matt Mackall
ba8099cfb8 hgweb: kill parentui references 2009-04-26 16:50:43 -05:00
Matt Mackall
be7d59ab85 ui: kill most users of parentui name and arg, replace with .copy() 2009-04-26 16:50:43 -05:00
Matt Mackall
88b13fecec ui: replace parentui mechanism with repo.baseui 2009-04-26 16:50:43 -05:00
Matt Mackall
6708d0e299 add cmdutil.remoteui
remoteui sorts out the issues of getting ssh config options from the
local repo into the remote one while not copying other options like hooks.
2009-04-26 16:50:43 -05:00
Matt Mackall
10af375ad9 ui: less links to parentui 2009-04-26 16:50:43 -05:00
Matt Mackall
1217ed8107 config: add some helper methods 2009-04-26 16:50:43 -05:00
Matt Mackall
9c7f505708 config: split source data out into separate map 2009-04-26 16:50:43 -05:00
Matt Mackall
a85b71443f config: add %unset name support 2009-04-26 16:50:43 -05:00
Matt Mackall
bc6c19544f config: allow including other config files 2009-04-26 16:50:43 -05:00
Matt Mackall
b7e5202883 showconfig: show source file and line with --debug 2009-04-26 16:50:43 -05:00
Matt Mackall
8a63c10958 util: kill configparser wrapper 2009-04-26 16:50:43 -05:00
Matt Mackall
8034ce6ca9 hgweb: use config.config 2009-04-26 16:50:43 -05:00
Matt Mackall
68db339c4b clone: config escaping no longer needed 2009-04-26 16:50:43 -05:00
Benjamin Wohlwend
ef87785038 ui.isatty() accesses sys.stdin, causing mod_wsgi to throw IOError. 2009-04-26 13:36:08 -07:00
Martijn Pieters
4abe231925 hg: allow hg.parseurl(url, None)
In many places hg.parseurl is called with a url and "opts.get('rev')",
suggesting the second, optional argument can be None. Because opts['rev']
usually defaults to [] this never happens in practice.

However, extensions don't necessarily behave the same, but do copy this
pattern.

Also, include wider hg.parseurl tests, beyond a demonstration of the problem.
2009-04-24 18:17:42 +02:00
Martin Geisler
56c8ce33ee verify: combine sets instead of concatenating lists 2009-04-25 22:26:39 +02:00
Martin Geisler
7a5147b673 rebase, revlog: use set(x) instead of set(x.keys())
The latter is both unnecessary and slower.
2009-04-25 22:25:49 +02:00
Martin Geisler
bf3136d2eb help: document stripdir template filter 2009-04-24 19:39:27 +02:00
Aleix Conchillo Flaque
95a32f54b8 templatefilters: add new stripdir filter
Adds a new template filter for removing directory levels from a
string. Examples:

{foo|stripdir} -> 'foo'
{foo/bar|stripdir} -> 'foo'
{foo/bar/more|stripdir} -> 'foo/bar'
{foo/bar/more|stripdir|stripdir} -> 'foo'
2009-04-24 18:37:44 +02:00
Martin Geisler
3ce0ca846d context: use Python 2.4 decorator syntax 2009-04-24 18:47:15 +02:00
Martin Geisler
6a1b0a03df localrepo: use sets in findcommonincoming 2009-04-24 17:32:18 +02:00
Martin Geisler
9fc1be4b52 strutil: removed rsplit 2009-04-24 17:32:18 +02:00
Martin Geisler
747c05d2eb revlog: let nodestotag be a set instead of a list 2009-04-22 20:51:20 +02:00
Martin Geisler
e2222d3c43 replace set-like dictionaries with real sets
Many of the dictionaries created by dict.fromkeys were emulating sets.
These can now be replaced with real sets.
2009-04-22 00:57:28 +02:00
Martin Geisler
44aa7e92d1 util: use built-in set instead of util.unique 2009-04-22 00:56:06 +02:00
Martin Geisler
1deb417a82 util: use built-in set and frozenset
This drops Python 2.3 compatibility.
2009-04-22 00:55:32 +02:00
Matt Mackall
72994b59d3 keepalive: attempt to fix issue1003
This is a reimport of the relevant piece of the upstream urlgrabber,
which appears to be more correct.
2009-04-23 15:40:10 -05:00
Matt Mackall
e8b3de6bf8 ui: introduce new config parser 2009-04-23 15:40:10 -05:00
Matt Mackall
b784fcf1a7 ui: simplify init, kill dupconfig 2009-04-23 15:40:10 -05:00
Matt Mackall
371257fd73 ui: fold readsections into readconfig
readconfig now reads only single files
readconfig takes an optional list of sections
readconfig trusts files we're looking for sections in
2009-04-23 15:40:10 -05:00
Matt Mackall
c85f431ef9 ui: cleanup _is_trusted a bit 2009-04-23 15:40:10 -05:00
Matt Mackall
e2ffc933dc ui: simplify parent overlay logic 2009-04-23 15:40:10 -05:00
Matt Mackall
87a779b162 ui: always have ucdata
simplify readconfig logic
2009-04-23 15:40:10 -05:00
Matt Mackall
97699b4b90 ui: fold verbosity_constraints into fixconfig, simplify 2009-04-23 15:40:10 -05:00
Matt Mackall
0174734c46 ui: kill updateopts
Move setconfig into dispatch._parseconfig
2009-04-23 15:40:10 -05:00
Matt Mackall
ebffe5ccb8 ui: refactor option setting
No more passing options as constructor keywords. Basic options are now
always stored in the overlay for simplicity and consistency.
2009-04-23 15:40:10 -05:00
Matt Mackall
cc041814d1 ui: kill redundant call to verbosity_constraints 2009-04-23 15:40:10 -05:00
Matt Mackall
f21df2587f ui: always have an overlay 2009-04-23 15:40:10 -05:00
Matt Mackall
3243d007af ui: kill check_trusted 2009-04-23 15:40:10 -05:00
Matt Mackall
db4f571c07 ui: move _isatty near user 2009-04-23 15:40:10 -05:00
Martin Geisler
85e0e5f5fa cmdutil: return boolean result directly in want function 2009-04-22 17:15:59 +02:00
Martin Geisler
cc72b62ca4 util: return boolean result directly in util.binary 2009-04-22 17:14:58 +02:00
Martin Geisler
80dd126e92 remove unnecessary outer parenthesis in if-statements 2009-04-22 01:39:47 +02:00
Ronny Pfannschmidt
23e91269e5 add a deprecation warning for gc based lock releasing 2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
83cc19618e document the locking pattern in localrepo.status 2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
9c365a3b4f switch dircleanup in mercurial.hg.clone from gc based to explicit 2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
5356baa346 switch lock releasing in the core from gc to explicit 2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
f55e3eb9a7 made repo locks recursive and deprecate refcounting based lock releasing
all locks should use the explicit lock.release

mercurial.lock.lock.__del__ handles unwrapping recursive locks

localrepo.lock/wlock are still using weakref in order to keep backward
compatibiltiy to releasing locks via garbage collection
by ensuring the release on __del__
2009-04-22 02:01:22 +02:00
Wagner Bruna
1f15ab3b5a patch, i18n: avoid parameterized plural 2009-04-20 21:16:14 -03:00
Wagner Bruna
635717f50b commands, i18n: avoid untranslated strings as message parameters 2009-04-20 20:38:37 -03:00
Greg Ward
fd1580418a manifest: improve error message about newlines in filenames
Include the offending filenames in the error message.  Now this error message
is consistent with the same error issued by dirstate.py (although there is
still duplicate code).
2009-04-18 09:48:59 -04:00
Henrik Stuart
c1e6537e5f strip: make repair.strip transactional to avoid repository corruption
Uses a transaction instance from the local repository to journal the
truncation of revlog files, such that if a strip only partially completes,
hg recover will be able to finish the truncate of all the files.

The potential unbundling of changes that have been backed up to be restored
later will, in case of an error, have to be unbundled manually. The
difference is that it will be possible to recover the repository state so
the unbundle can actually succeed.
2009-04-16 15:34:03 +02:00
Henrik Stuart
e8d7a7c8ef transaction: support multiple, separate transactions
Solves that committed (closed) transactions may linger and be returned
on subsequent transaction calls, even though a new transaction should
be made, rather than a new nested transaction.

This also fixes a race condition with the use of weakref.
2009-04-15 19:54:22 +02:00
Henrik Stuart
c57f2e28ee transaction: only delete journal on successful abort/commit
This solves that the journal file was always deleted when the transaction
was deleted, no matter whether the abort (rollback) succeeded or not.
Thus, never supporting a hg recover. The journal file is now only deleted
on close (commit) or a successful abort.
2009-04-16 15:41:25 +02:00
Patrick Mezard
cd3505dbbc Merge with crew-stable 2009-04-13 21:57:17 +02:00
Vsevolod Solovyov
201e56ffbb Fix issue1495, corner case of adding empty files via patching 2009-03-24 23:28:55 +00:00
Matt Mackall
7e7ba71a3a Merge with crew-stable 2009-04-03 11:50:42 -05:00
Greg Ward
e688a18c6f Typo fix in help. 2009-03-23 15:04:26 -04:00
Dirkjan Ochtman
fe39d83f68 cleanup: remove all trailing whitespace 2009-03-23 13:11:11 +01:00
Peter Arrenbrecht
b1f5d67640 keepalive: fix reference to IncompleteRead 2009-03-23 11:12:01 +01:00
Steve Borho
1495d07855 demandimport: blacklist pythoncom
win32com.shell would segfault at import time if pythoncom
was demand loaded.
2009-03-09 21:00:37 -05:00
Matt Mackall
02f3d06343 diffstat: use width 80 by default and avoid division by zero 2009-03-20 14:38:50 -05:00
Matt Mackall
7d51e0b1f6 bundlerepo: reintroduce dirstate 2009-03-17 13:43:11 -05:00
Augie Fackler
526bbde326 bisect: fix --command for me. 2009-03-09 17:13:12 -05:00
Matt Mackall
805511403b resolve: move reset to localrepo.commit
This way rebase doesn't leave a stale resolve state
2009-03-16 16:58:41 -05:00
Matt Mackall
891ec3832e resolve: keep .orig files 2009-03-16 16:58:41 -05:00
Matt Mackall
56a3a8557f Merge with crew-stable 2009-03-09 11:41:38 -05:00
Benoit Boissinot
c34938cba1 verify: find correct first corrupted cset for missing/corrupted revlogs 2009-03-07 20:16:03 +01:00
Benoit Boissinot
5ed5555a2d verify: do not abort on fully corrupted revlog 2009-03-07 20:04:56 +01:00
Benoit Boissinot
35d90d90ba hgweb: fix allow_read permissions when a user is specified
Thanks to Juan Pablo Aroztegi for reporting and debugging it.
2009-03-07 00:59:41 +01:00
Benoit Allard
bf86b21b09 update copyright date in version information 2009-03-05 10:38:39 +01:00
Dongsheng Song
3cab4b874a Typo fix 2009-03-05 14:44:13 +08:00
Augie Fackler
bf90b0cbb4 merge: better error messages to lead users to hg update --clean to abandon merges.
Fixes issue1533.
2009-03-04 13:06:16 -06:00
Matt Mackall
5871cdf2c8 audit: be even pickier (issue1450) 2009-03-04 17:02:16 -06:00
Bill Barry
8ac447bbd7 dispatch: extract command execution block into method
This pulls the pre-command hook/command/post-command hook workflow out of
the method it is in and puts it into its own method so that it potentially
could be exposed for extensions to wrap.
2009-02-12 09:36:15 -07:00
Matt Mackall
104cda5c20 tag: force load of tag cache 2009-03-02 19:19:09 -06:00
Dirkjan Ochtman
f7eaf63265 help: get rid of double spaces 2009-02-28 12:33:24 +01:00
timeless
26d95caa99 help: miscellaneous language fixes 2009-02-28 12:38:45 +01:00
Dirkjan Ochtman
fbf5ef05d7 help: better explanations for some of the template filters
In particular, provide some example data for some of the common filters.
Thanks go to timeless again for pointing out where we were lacking.
2009-02-28 12:25:14 +01:00
Dirkjan Ochtman
5b24c2c694 help: better explanation for some of the environment variables
In particular, the precedence for usernames is explained in more detail.
Thanks to timeless for pointing out the deficiencies here.
2009-02-28 12:23:23 +01:00
timeless
ebb328e76d help: some language fixes for help topics 2009-02-28 12:21:41 +01:00
Steve Borho
6e4ca6d775 catch CTRL-D at password prompt
We caught this exception in ui.prompt(), but not here.  Without
this, hitting CTRL-D at the password prompt gives a long traceback.
2009-02-21 17:46:06 -06:00
Matt Mackall
cb4d50ff04 Introduce HG_PREPEND to solve pretxn races
- add writepending to flush delayed writes to separate file
- add support in hooks for lazy evaluation of callable parameters
- add HG_PENDING to pretxn hooks
  - call writepending if hook is used
  - pass repo root to hook environment
- if HG_PENDING = repo root, we're in pretxn hook
  - read pending data to make pending changesets visible
- filter HG_PENDING in tests/printenv.py
2009-02-16 19:35:07 -06:00
Patrick Mezard
6e39e5470b Merge with crew-stable 2009-04-13 14:36:55 +02:00
Patrick Mezard
ff6f4fe926 Merge with crew-stable 2009-04-10 13:06:02 +02:00
Martin Geisler
a0c28e829e commands: more informative description of "!" files in status
This makes the description more similar to the one used by Subversion.
Suggestion by Dennis Brakhane.
2009-04-09 20:00:48 +02:00
Martin Geisler
e8820e5792 commands: automatically word-wrap cmdline options
Some of the descriptions of command line options were getting quite
long, and when translated they are likely to grow even longer. This
word-wraps them at 70 characters, just like the help texts.

We could have opted to wrap them at the terminal width instead, but I
think it looks better to have them be consistent with the help texts.
2009-04-09 14:43:02 +02:00
Martin Geisler
e418e0fbf5 commands: removed bad linebreak in import help 2009-04-09 10:48:07 +02:00
Martin Geisler
5f112d7334 commands: lower-case --import-branch help text 2009-04-08 22:07:20 +02:00
Martin Geisler
bee180f29b commands: consistently write switches as -a/--abc 2009-04-08 21:20:31 +02:00
Martin Geisler
8e2a51db54 commands: use double quotes consistently in help texts 2009-04-08 20:51:09 +02:00
Martin Geisler
a135216a5b upper-case command line meta variables 2009-04-08 20:43:19 +02:00
Martin Geisler
e45e28d3cc notify, commands: word-wrap help strings 2009-04-08 00:41:07 +02:00
Martin Geisler
42fa3800bd expand "rev" to "revision" in help texts 2009-04-07 23:06:50 +02:00
Martin Geisler
249541da43 expand "repo" to "repository" in help texts 2009-04-07 22:58:05 +02:00
Martin Geisler
ea1734b579 expand "dir" to "directory" in help texts 2009-04-07 22:47:56 +02:00
Nicolas Dumazet
6ebdee6dde profiling: Adding support for kcachegrind output format, using lsprofcalltree 2009-04-08 14:20:57 +02:00
Nicolas Dumazet
f2cfd93c8c profiling: Adding a profiling.format config variable
Allows defining other output formats for profiling.

If an invalid format is given, output a warning and ignore it.
For now, only the standard 'text' value is supported.
2009-04-02 16:01:30 +09:00
Nicolas Dumazet
14ff1a53ae profiling: Adding profiling.output config variable
If specified, outputs profiling data to the said file.
Prints to stderr by default
2009-04-08 14:19:41 +02:00
Nicolas Dumazet
b87b90da60 profiling: dropping hotshot profiling. --profile as a unique profiling option
hotshot was an experimental module, which is broken for Python < 2.5
And even for Python >= 2.5 users, hotshot usage is discouraged: cProfile
(formerly lsprof) should be used instead.
2009-04-08 14:18:20 +02:00
Henrik Stuart
235c60980e log: fix broken multiple user search
This fix also allows partial user matches so the full name and email
does not have to be written out in verbatim.
2009-04-07 20:57:25 +02:00
Martin Geisler
79a1ecab7b commands: describe "!" files as "missing" in help for status 2009-04-07 17:32:40 +02:00
Benoit Boissinot
309c0e0a31 merge with -stable 2009-04-06 20:11:00 +02:00
Dirkjan Ochtman
23935afdfe templatefilters: strings are iterators, but shouldn't be joined anyway 2009-04-06 16:26:57 +02:00
Dirkjan Ochtman
813ed2656a templatefilters: split out jsonescape() function 2009-04-06 10:51:45 +02:00
Dirkjan Ochtman
10e214223e cmdutil: prevent code repetition by abstraction in changeset_templater 2009-04-06 10:51:27 +02:00
Sune Foldager
3fb25f365e util: don't overwrite os-specific functions with general ones 2009-04-04 18:12:43 +02:00
Wagner Bruna
103904e6a1 commands: fix typo on flag description 2009-04-05 05:12:43 -03:00
Wagner Bruna
138a470758 commands, i18n: avoid untranslated strings as message parameters 2009-04-05 05:11:46 -03:00
Tobias Bell
49fc8e0322 commands: enable 'hg help' translation of extensions 2009-04-04 20:16:01 +02:00
Martin Geisler
e99be665d8 help: word-wrap help texts at 70 characters 2009-04-04 23:21:33 +02:00
Martin Geisler
f1c1a1fa6e commands: word-wrap help texts at 70 characters 2009-04-04 23:21:23 +02:00
Martin Geisler
04b0d911a3 Change double spaces to single spaces in help texts. 2009-04-04 21:09:43 +02:00
Martin Geisler
9ff85ce810 commands: explain when to use resolve -m 2009-04-04 18:31:01 +02:00
Martin Geisler
8b589c11a5 commands: clarify push help text 2009-04-04 18:03:03 +02:00
Martin Geisler
f55334e6cd commands: make pull help point to the incoming command 2009-04-04 17:51:31 +02:00
Martin Geisler
af7a5be45e commands, help: consistently write 'URL' in upper-case 2009-04-04 17:44:18 +02:00
Martin Geisler
12c9385a4d help: expand command names in 'Url Paths' help text 2009-04-04 17:41:22 +02:00
Martin Geisler
bb347e5a7f commands: better merge help text 2009-04-04 17:33:42 +02:00
Martin Geisler
fee1365c04 commands: removed redundant text in manifest help 2009-04-04 16:46:50 +02:00
Martin Geisler
0512095ede commands: stress that commit is a local operation 2009-04-04 00:32:06 +02:00
Martin Geisler
695e12c72b commands: use single-quotes for 'hg help ...' hints 2009-04-04 00:27:55 +02:00
Dirkjan Ochtman
049b5daa9b merge with crew-stable 2009-04-04 19:43:00 +02:00
Dirkjan Ochtman
7856ee8225 cmdutil: refactor handling of templating in show_changeset() 2009-04-04 17:55:52 +02:00
Dirkjan Ochtman
0b1a57839b templater: move stylemap function from hgweb to templater 2009-04-04 17:46:11 +02:00
Alexander Solovyov
86b994e311 extensions loading: don't fail if path to extension ends with a '/' 2009-04-01 12:11:14 +03:00
Justin Peng
d4938a90ee Correct a bug on date formats with '>' or '<' accompanied by space characters. 2009-04-01 09:11:00 -07:00
Matt Mackall
d60aaf81dc windows: get Abort from error 2009-04-03 14:52:03 -05:00
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Matt Mackall
2cddde0437 move util.Abort to error.py 2009-04-03 13:20:52 -05:00
Matt Mackall
019a0b138e pure/parsers: fix circular imports, import mercurial modules properly 2009-04-03 12:37:38 -05:00
Matt Mackall
c36ce7ba2b pure/bdiff: fix circular import 2009-04-03 12:37:30 -05:00
Matt Mackall
bcbc752a6f posix: kill some trailing newlines 2009-04-03 12:37:07 -05:00
Matt Mackall
579fb2ffc2 mention default branch in branch and clone help 2009-04-03 12:37:06 -05:00
Steve Borho
63d4e6092c on clone failure, only remove directories we created
If the user created the clone target directory before running
the clone command, only cleanup the .hg/ repository when errors
occur.  Leave the empty target directory in place.
2009-03-31 21:21:53 -05:00
Martin Geisler
df38a73894 windows: break import cycle with util 2009-04-02 18:04:42 +02:00
Sune Foldager
a909400362 windows: fix missing import of util.Abort 2009-04-02 17:09:17 +02:00
Sune Foldager
9aaf69227a windows: fix import of win32.py (was util_win32.py) 2009-04-02 16:49:34 +02:00
Martin Geisler
541fd005f1 merge with -stable 2009-03-31 23:11:11 +02:00
Martin Geisler
b5e430c97b hgweb: better English in IPv6 error message 2009-03-31 22:48:16 +02:00
Steve Borho
ad54f46fa2 allow clone into existing but empty directories 2009-03-29 16:15:06 -05:00
Wagner Bruna
b2fafee0f4 verify, i18n: fix unmarked strings 2009-03-29 19:56:53 -03:00
Martin Geisler
2d9bab6890 httprepo: lowercase debug output 2009-03-29 21:52:43 +02:00
Benoit Boissinot
868a1f07ed merge with -stable 2009-03-30 01:30:58 +02:00
Alexander Solovyov
609db13729 ability to load hooks from arbitrary python module 2009-03-27 01:28:09 +02:00
Steve Borho
582e7e6612 windows: add various missing import 2009-03-26 23:02:21 -05:00
Steve Borho
67420334f3 windows: hoist expand_glob() back into util.py
The windows version of expand_glob() requires patkind(). To
avoid a circular dependency, move function back into util.py.
2009-03-26 22:07:01 -05:00
Rocco Rutte
895d037e99 Add missing imports for posix.py for OS X
These don't seem to do harm on Linux.
2009-03-27 17:56:18 +01:00
Dongsheng Song
da72eadd2c Clarify the usage of HGRCPATH 2009-03-07 16:06:46 +08:00
Benoit Boissinot
6469b223b7 bisect: use integer division 2009-03-28 17:29:14 +01:00
Martin Geisler
05b3dfb2cf cmdutil: fix untranslatable string in copy 2009-03-27 17:35:00 +01:00
Matt Mackall
0952760f82 util: split out posix, windows, and win32 modules 2009-03-26 13:54:44 -05:00
Matt Mackall
b6fd334dd0 Merge with -stable 2009-03-24 16:41:41 -05:00
Nicolas Dumazet
3ced073c3b revlog: faster hash computation when one of the parent node is null
Because we often compute sha1(nullid), it's interesting to copy a precomputed
hash of nullid instead of computing everytime the same hash. Similarly, when
one of the parents is null, we can avoid a < comparison (sort).

Overall, this change adds a string equality comparison on each hash() call,
but when p2 is null, we drop one string < comparison, and copy a hash instead
of computing it. Since it is common to have revisions with only one parent,
this change makes hash() 25% faster when cloning a big repository.
2009-03-23 15:32:29 +01:00
Nicolas Dumazet
5c8c0a663b ancestor: caching the parent list to improve performance
When computing the DAG depth, we walk through all ancestors: this commit adds
memoization during that first step. Then, the memorized parents are fetched
from a dict instead of calling parents() on each vertex.

This tweak, according to Kcachegrind, improves ancestor() performance by 16%
when cloning a big repository.
2009-03-23 15:36:30 +01:00
Dirkjan Ochtman
7b5b0945c3 kill another trailing space 2009-03-23 13:49:16 +01:00
Dirkjan Ochtman
33d6485beb add debugcommands command: an easy to parse command + option index 2009-03-23 13:43:48 +01:00
Alexander Solovyov
475ce753d3 templater: ability to display diffstat for log-like commands 2009-03-23 10:41:42 +01:00
Alexander Solovyov
7ea3611901 templater: use contexts consistently throughout changeset_templater 2009-03-23 13:15:57 +01:00
Peter Arrenbrecht
ce6e853a0b cleanup: drop enumerate() when index is not used 2009-03-23 13:13:11 +01:00
Peter Arrenbrecht
19591b6a8c cleanup: drop unused assignments 2009-03-23 13:13:06 +01:00
Peter Arrenbrecht
a2d3e23eef cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:

  _junk = foo()
  _junk = None

to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00
Peter Arrenbrecht
bc21361ed2 cleanup: drop unused imports 2009-03-23 13:12:07 +01:00
Dirkjan Ochtman
66fabbd9b4 merge with crew-stable 2009-03-23 13:12:44 +01:00
Matt Mackall
68f6893175 Merge with -stable 2009-03-20 18:55:20 -05:00
Matt Mackall
4cd17487f7 Merge with stable 2009-03-17 13:46:53 -05:00
Benoit Boissinot
1651c346c7 merge with -stable 2009-03-07 20:30:20 +01:00
Brendan Cully
8ecc8f3e92 Merge with main 2009-03-06 12:35:48 -08:00
Mads Kiilerich
e39fe5275e Optimization of pure.base85.b85encode
This makes pure python base85 encoding 3x faster than before. Now it is only
40x slower than the C version.
2009-03-04 23:23:59 +01:00
Matt Mackall
7c27807553 audit: check for casefolding of .hg (issue1450) 2009-02-16 17:37:23 -06:00
Matt Mackall
2e1730294c patch: teach selectfile about symlinks (issue1438) 2009-02-16 17:37:23 -06:00
Matt Mackall
b649059d2b keepalive: borrow code from newer httplib to patch ValueError (issue1088) 2009-02-16 17:37:23 -06:00
Matt Mackall
f547c37df5 rename: simplify forced renaming
This should help work around virus scanner issues with rename on Windows.
2009-02-16 17:37:23 -06:00
Matt Mackall
ca1b896eac log: ignore --removed if no files specified (issue1166)
Otherwise we filter out merge changesets with no changed files
2009-02-16 17:37:23 -06:00
Matt Mackall
9b12427bc1 Don't fail on clone on win98 (issue1492) 2009-02-16 17:37:23 -06:00