Commit Graph

740 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
9aba3494a6 Remove some options from 'hg grep':
-Z (we have -0 as in locate)
-a (use "-r 0:tip" instead, or always grep all unless -r is given)
-e (we have the PATTERN argument)
-v (doesn't work, and this is more of a job for 'hg cat|grep')
-s (we have -q/--quiet)
-f (should be always enabled if -l used, or enable on -v/--verbose)
2005-08-27 23:36:25 +02:00
Thomas Arendsen Hein
eb5875fdb6 Whitespace cleanup. 2005-08-27 23:25:55 +02:00
Thomas Arendsen Hein
8f913949cc Replaced hg status -p/--strip with -n/--no-status to not confuse with patch. 2005-08-27 23:23:32 +02:00
mpm@selenic.com
4ffffb3fc4 hgweb: add catch for connection reset
suggested by Jeff Sipek
2005-08-27 01:55:10 -07:00
TK Soh
1485d9e74e status: added option -p and -0 to assist xargs
The -p option strips the status prefix of each file, while
-0 ends each file with a NUL character, instead of a newline.
Together, selected group of files can be passed to 'xargs -0'
for further processing.
2005-08-27 01:49:41 -07:00
mpm@selenic.com
e81f28aa33 Add some docstrings to revlog.py 2005-08-27 01:43:48 -07:00
mpm@selenic.com
8805469355 Update util.py docstrings, fix walk test 2005-08-27 01:13:28 -07:00
mpm@selenic.com
6737d1c923 Change canonpath to not know about repo objects
Code in util should not have any knowledge about repo objects
2005-08-26 23:29:10 -07:00
mpm@selenic.com
e243599beb Various cleanups for tarball support
s/tarball/archive/
query config rather than maintaining a list
default all archive support to off
use changeset nodes rather than manifest nodes
use web:name for archive name
don't use rev number in filename, it's not portable
refactor manifest lookup bits
use finally: clause to delete tmpfile
2005-08-26 20:52:31 -07:00
Wojciech Milkowski
3273ff69eb tarball support v0.3 pt 2 2005-08-26 20:51:48 -07:00
Wojciech Milkowski
340ba8e86e tarball support v0.3
Hello,

I'm slowly improving support for tarballs in Mercurial. Attached patch
is made against current tip in Matt's repository - c582763bc7fd, and
contains everything done so far.

Changes:
- gzip and bzip2 tarballs are sent immediately without writing to
temporary files (I was wrong Matt, it can be done very easy)
- hgrc customization, you can choose which type (if any) you will support

There's no easy way to support compression levels, since TarFile open()
assume that it is 9. I tried to use gzopen(), and bz2open() methods
instead, but it seems that headers of generated archives, are missing or
wrong. We could eventually try to rewrite tarfile.py and include our own
version into Mercurial, but I don't know if it's good idea...

Wojtek
2005-08-26 20:51:34 -07:00
Volker.Kleinfeld@gmx.de
b206d3baac Fixed system command abord reason on windows. 2005-08-26 19:20:04 -07:00
mason@suse.com
b0a4ba87ef Add revlog.reachable to find a graph of ancestors for a given rev 2005-08-26 19:19:35 -07:00
Bart Trojanowski
3529a29a40 [PATCH] raise exceptions with Exception subclasses
Fixed the patch.  Using Exception subclasses.

(tweaked by mpm)
2005-08-26 19:08:25 -07:00
mpm@selenic.com
14f5c433e1 Fixes for push corner case
TAH found a bug where push would push things the remote already had,
raising an assertion. This turned out to be because the changeset
protocol was not recording a common subset node in one case.

Also discovered was that the protocol was queueing multiple copies of
a node for pull. Fixed by changing fetch to a hash.

Add some more debugging output.
2005-08-26 16:49:23 -07:00
mason@suse.com
777af4d76b Add support for extension modules
This adds support for an [extensions] section to hgrc.  This has the form of:

[extensions]
mod=[path]

If a path is specified, the python module found at that path is load.
Otherwise, __import__ is used to find the module.

Each module must implement a dict called cmdtable where the command line
options for that module live.  Each module must also implement a reposetup
function:

cmdtable = {}
def reposetup(ui, repo): pass

Index: hg/mercurial/ui.py
===================================================================
2005-08-26 14:05:52 -07:00
Thomas Arendsen Hein
3c84fc273d Allow using a ssh repository without a path.
This uses the home directory on the remote side or the directory
specified in the command in .ssh/authorized_keys
2005-08-26 22:40:56 +02:00
Thomas Arendsen Hein
1706e2bc80 Fixed synopsis for grep command. 2005-08-26 16:47:09 +02:00
Thomas Arendsen Hein
c89b327937 Fixed zero-padded filenames with %r if there is a longer number in the middle.
e.g. with: hg export -o ../%r.patch 99 100 98
2005-08-26 16:37:28 +02:00
Thomas Arendsen Hein
c5a48bb80d Shortened commands.revrange() a little bit, added docstring. 2005-08-26 15:26:44 +02:00
Thomas Arendsen Hein
2aa584e2ac Cleanups to commands.py 2005-08-26 15:19:18 +02:00
Thomas Arendsen Hein
d28fa10d3f Some more spacing/indentation/linebreak cleanups to hgweb.py. 2005-08-26 13:29:52 +02:00
benoit.boissinot@ens-lyon.fr
95b97f01ed pep-0008 cleanup
- Don't use spaces around the '=' sign when used to indicate a
      keyword argument or a default parameter value.
2005-08-26 13:06:58 +02:00
mpm@selenic.com
465baef81d Fix set type usage for Python 2.3 2005-08-26 02:03:35 -07:00
mpm@selenic.com
69642fabd6 Merge from BOS, fix help 2005-08-26 01:56:49 -07:00
Thomas Arendsen Hein
bf676d665b Fixed some synopsises in command help. 2005-08-26 10:39:43 +02:00
Thomas Arendsen Hein
3479af31cc Added missing doc strings for two new debug commmands. 2005-08-26 10:01:55 +02:00
Thomas Arendsen Hein
21bd77e72f Adjust display and alignment of command options to match global options. 2005-08-26 09:56:33 +02:00
Thomas Arendsen Hein
bef61f31d7 Clean up displaying help of global options, only one row per option. 2005-08-26 09:15:04 +02:00
Thomas Arendsen Hein
70862c3288 Moved --cwd handling to a place where ui and exception handling already exists. 2005-08-26 08:47:43 +02:00
Thomas Arendsen Hein
4c1fa6e67e Allow --help and --version being used together. 2005-08-26 08:42:56 +02:00
Thomas Arendsen Hein
7fd11ee46b Added options -h/--help. 2005-08-26 08:37:41 +02:00
Thomas Arendsen Hein
9d33a5e819 Moved special handling of --version and no hg command from parse to dispatch.
This allows e.g. 'hg status --version' to work.
2005-08-26 08:26:21 +02:00
bos@serpentine.internal.keyresearch.com
9f78835764 grep: speed up matching, and only return one match per line. 2005-08-25 17:13:48 -07:00
Bryan O'Sullivan
7cbf1e0fee Use ui.write instead of print in debugwalk. 2005-08-25 10:11:54 -07:00
Thomas Arendsen Hein
bc14f61be2 Sort global options by topic: directories, ui, timing, other
(and changed indentation to match command table)
2005-08-25 18:35:35 +02:00
Thomas Arendsen Hein
d5c16ece15 Removed forgotten debug print statement from commands.py and tests. 2005-08-25 16:00:08 +02:00
Bryan O'Sullivan
38e580170d Add grep command.
It currently searches all revs of every matching file.  I'll change
this soon so that it can still do this, but it will not be the default
behaviour.
Many options are unimplemented.  There's only one output mode.  Binary
files are not handled yet.
2005-08-25 02:00:03 -07:00
Bryan O'Sullivan
d845eb1c18 Map long option names containing dashes to ones containing underscores. 2005-08-24 22:25:55 -07:00
mpm@selenic.com
f42e0684d8 Fix a couple fencepost errors in hg log 2005-08-24 19:16:45 -07:00
mpm@selenic.com
d16fb02700 Fix hg log -p 2005-08-24 18:45:49 -07:00
mpm@selenic.com
985163dd22 Show number of new heads when doing a pull 2005-08-24 18:42:42 -07:00
mpm@selenic.com
64a0be3cd1 Add debugdata for dumping revlog revision data 2005-08-24 18:40:17 -07:00
bos@serpentine.internal.keyresearch.com
ee1e8ec6e8 Fix a small corner of log behaviour.
If invoked with no arguments in a subdirectory of the repo root, it
should print the history of the repository as a whole.
2005-08-24 14:45:35 -07:00
mpm@selenic.com
e3e20ae4fd Merge with BOS 2005-08-24 13:31:46 -07:00
Bryan O'Sullivan
ad065b010b Fix help output, and a few broken tests. 2005-08-24 13:26:45 -07:00
Bryan O'Sullivan
22c1455510 Merge with MPM. 2005-08-24 12:50:11 -07:00
Bryan O'Sullivan
8b3b079822 Rewrite log command. New version is faster and more featureful.
The original implementation of log walked backwards through history,
which had terrible behaviour.  It took several minutes to view
complete kernel change history on a fast machine, for example.
The rewrite uses a windowed approach to walk hunks of history
forwards, while still giving results in reverse order.  This reduces
run time from five minutes to five seconds on my system.
In addition, the rewrite uses our normal name handling mechanisms, so
you can run a command like "hg log net/ipv4/**.c" and get a useful
answer.  It optimises for three different cases (no arguments, only
files, and anything goes), so it performs well in all circumstances
I've tested.
2005-08-24 12:39:10 -07:00
mpm@selenic.com
bf94ed815e Minor tweak to the revgen algorithm 2005-08-24 03:33:54 -07:00
mpm@selenic.com
7c92a626a7 Minor hgwebdir tweaks
- ignore / for PATH_INFO
- fix // in URLs
2005-08-24 03:32:08 -07:00