Commit Graph

96 Commits

Author SHA1 Message Date
Adrian Buehlmann
0e6715fa28 rename util.set_binary to setbinary 2011-05-06 15:25:35 +02:00
L. David Baron
07a4832d23 setup/hg: handle hg being a symlink when appending relative libdir to sys.path
Resolve symbolic links in the path to hg so that an hg that works when
invoked directly will also work when invoked via a symlink to it.
2010-10-21 09:58:22 -07:00
Dan Villiom Podlaski Christiansen
5804ab0e6c setup/hg: always load Mercurial from where it was installed.
This provides two new features:

- Mercurial may be installed into a non-standard location without
  having to set PYTHONPATH.
- Multiple installations can use Mercurial from different locations.
2010-08-17 15:44:38 +02:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
816a033937 Give a useful message about PYTHONPATH if startup fails 2009-01-19 16:19:09 -06:00
Patrick Mezard
334286e6e7 Change standard streams mode to binary at hg startup
Standard streams are expected to operate in binary mode everywhere, especially with archive, cat, diff and export commands. Rewriting these to separate informational output from binary content is complicated to do and to maintain, nonwithstanding mode switching reliability. Changing all output mode to binary should not have much impact on Windows were stream processing tools are barely used and usually cope with unix style endings.

Streams mode being process wide, the switch is performed in the startup script to avoid polluting existing API users who may have solved this issue already or ignored it at least for the mercurial part.
2007-11-10 21:30:59 +01:00
Thomas Arendsen Hein
90d76a6ec9 Enable demandimport only in scripts, not in importable modules (issue605)
This way other applications can choose if and when they want this feature,
because it might be problematic if those applications rely on ImportError.
2007-08-18 11:37:08 +02:00
Matt Mackall
c08427e0e8 dispatch: move command dispatching into its own module
- move command dispatching functions from commands and cmdutil to dispatch
- change findcmd to take a table argument
- remove circular import of commands in cmdutil
- privatize helper functions in dispatch
2007-08-15 16:55:13 -05:00
Thomas Arendsen Hein
4d29c6dc8e Updated copyright notices and add "and others" to "hg version" 2007-06-19 08:51:34 +02:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Matt Mackall
35a5e349cc Update copyright notice 2006-02-05 22:21:02 -06:00
mpm@selenic.com
0fb5db6915 Whitespace cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whitespace cleanups

manifest hash: ac954bc3a4f034c12638a259ecd65841f5b63c5c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCwuubywK+sNU5EO8RAluIAJ98XQpNdZUpSmYKgDmrMRlbL76ZzQCfes0t
rknNUN/PhtyA4bzL646dOz4=
=UyCE
-----END PGP SIGNATURE-----
2005-06-29 10:42:35 -08:00
mpm@selenic.com
e856d66b62 Release tweaks
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Release tweaks

manifest hash: ded5f9b4432ab05c28d6e0ca56adbf3d14b8e6f6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCvGzZywK+sNU5EO8RAlzYAJ4ix4F5cKYXBo8L6UwwZJbnZa7RpgCgme9H
ByLO3Pcf9RSmQEO6vxYfuLs=
=7fKS
-----END PGP SIGNATURE-----
2005-06-24 12:28:09 -08:00
mpm@selenic.com
9cb4207872 Mark the usual things executable
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark the usual things executable

manifest hash: e55dde46fd1a97ce338c1ac71278b67ca9d96bf7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCpz5RywK+sNU5EO8RAnypAJwLpjrQ09nMSJUELtCondHI0fvuVACfQu2J
mFi9D3L9ULGO457NWB4h3kY=
=3bcD
-----END PGP SIGNATURE-----
2005-06-08 10:52:01 -08:00
mpm@selenic.com
f95bf8d95c import and startup cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

import and startup cleanups

add commands:run()
add copyright notice to commands
eliminate/reorganize imports to speed up start time:

0.5b:
$ time bash -c 'for i in `seq 100`; do ~/bin/hg > /dev/null; done'

real    0m7.718s
user    0m6.719s
sys     0m0.794s

new:

$ time bash -c 'for i in `seq 100`; do hg > /dev/null; done'
real    0m2.171s
user    0m1.684s
sys     0m0.444s

just python:

$ time bash -c 'for i in `seq 100`; do python -c pass; done'
real    0m0.988s
user    0m0.771s
sys     0m0.207s

Ignoring the fixed cost of loading the Python interpreter, we're 5.6
times faster. With the Python load time, we're still 3.5 times faster.

manifest hash: acce5882a55c76eb165316f5741724c8ce4ef587
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoihAywK+sNU5EO8RAqMdAJwMe6Ur0R9G6jjayNa5hH2C3c4k/gCeIYvc
N178vaWWGciX9zq+g5qCAls=
=buhv
-----END PGP SIGNATURE-----
2005-06-04 14:16:32 -08:00
mpm@selenic.com
0b9e66eded migrate remaining commands
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

migrate remaining commands

This removes basically everything from the top-level hg script

manifest hash: 34883e89d8def30e28936b38a9342d2f650f4c94
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoiD7ywK+sNU5EO8RAh0cAKCeOO9vahYs0tGmMNKk8bflw35p2wCgr6Wr
y0SNLHSVBMCzXtC9zlfDPog=
=3nJx
-----END PGP SIGNATURE-----
2005-06-04 13:45:31 -08:00
mpm@selenic.com
cede7eda00 migrate verify
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

migrate verify

Move the bulk of the verify code into the localrepository class and move
the command into commands.py

manifest hash: 793a8d0094d56ab0a411cd11d7fe7f39c923f209
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCog33ywK+sNU5EO8RApfBAJ4mCmiMmZE1fEfbR6sA+aP1csPvqQCfXHzY
3XK7yc19AivXf5HGKEOL3eM=
=GISf
-----END PGP SIGNATURE-----
2005-06-04 12:24:23 -08:00
mpm@selenic.com
58e0ba5a39 Migrate rawcommit, import, export, history, and merge
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Migrate rawcommit, import, export, history, and merge

manifest hash: f932108ee40e34b460e94b6fe60d6a06ac9f760c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoguVywK+sNU5EO8RAtohAKCe9Qr5R+YeLRluJlTxRGrJW/nnoQCfW/+F
I0BSOeNpb6jdUxTZY1jV0xo=
=hNXm
-----END PGP SIGNATURE-----
2005-06-04 12:14:14 -08:00
mpm@selenic.com
aeaf337d80 big heap of command clean-up work
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

big heap of command clean-up work

Migrate add, forget, remove, commit, diff, addremove, tip, log,
recover, and serve.

Fix up filterfiles, relfilter, and relpath to be a bit more bulletproof

Alphabetize functions and the command table

Make everything in commands.py relative-path aware

manifest hash: f0856031a7be4e49289677b467f29bcf24ebce4a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCof6gywK+sNU5EO8RAoW1AJsHu8vchPSjls7wVbvsq/UKlGhqtgCgtnnl
xSBxyf/TEVWjHIk3uTa8WSE=
=YPMl
-----END PGP SIGNATURE-----
2005-06-04 11:18:56 -08:00
mpm@selenic.com
015cc81147 make diffdir default to dirstate.parents()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

make diffdir default to dirstate.parents()

update various diffdir users to use default

manifest hash: aeca2b9da1aca278dd5e3f27cc2906667803577d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMPcywK+sNU5EO8RAkY8AJ90UHQXnJnkG9PJKG7IsgPeOZ2WZACgiarS
HhS2zX3TRM9WdZHo5nLvZGw=
=7YyP
-----END PGP SIGNATURE-----
2005-06-03 12:55:56 -08:00
mpm@selenic.com
f554f899b0 move repo.current to dirstate.parents()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

move repo.current to dirstate.parents()

dirstate now tracks the parents for the working dir
add a parents command to show them

manifest hash: cd69237838c3f69f7937723c4a6803d47cb27cfa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMGuywK+sNU5EO8RAg5UAKCVLUrsJtkoIOTM+e0BLqEVN3Ni3gCeNDyy
ZF8jD728cl9K7S4sIN4gX4Y=
=P4bu
-----END PGP SIGNATURE-----
2005-06-03 12:46:38 -08:00
mpm@selenic.com
cc9a3611a8 merge: don't bail on outstanding changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

merge: don't bail on outstanding changes

With multiple heads, we don't need to worry about the working dir's
uncommitted changes at pull time

manifest hash: 5b4e024f220fa616732310ce5f48e71abfa910e0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMFQywK+sNU5EO8RApLyAKCoNDF84wFzgnpS+WLuXdkGxeHFPwCdFsMy
CysB458dNcFuB/vDFhgJr58=
=gG+u
-----END PGP SIGNATURE-----
2005-06-03 12:45:04 -08:00
mpm@selenic.com
2a4127e46c fix bad assumption about uniqueness of file versions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

fix bad assumption about uniqueness of file versions

Mercurial had assumed that a given file hash could show up in only one
changeset, and thus that the mapping from file revision to changeset
was 1-to-1. But if two people perform the same edit with the same
parents, we can get an identical hash in different changesets.

So we've got to loosen up our uniqueness checks in addgroup and in
verify.

manifest hash: 5462003241e7d071ffa1741b87a59f646c9988ed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMDkywK+sNU5EO8RAg9PAJ9YWSknfFBoeYve/+Z5DDGGvytDkwCgoMwj
kT01PcjNzGPr1/Oe5WRvulE=
=HC4t
-----END PGP SIGNATURE-----
2005-06-03 12:43:16 -08:00
mpm@selenic.com
4a3f7fbb37 change dircache into dirstate
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

change dircache into dirstate

The dircache now tracks adds and removes directly

diffdir now makes a proper distinction between added and unknown files

Add a forget command to unadd files

Undo tries to fix up the state of just the files in the undone commit

Add and remove complain about files that are not in a proper state of
existence


manifest hash: ca0cd6abc5e119670acf11a54fefa2bc986eadf3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCn7TRywK+sNU5EO8RAhnSAKC2oHg1HJOCGsvpUYj4SBEq0HmuJQCgr5gl
jEBTs5AFD5IhF73YAgrcnkE=
=prQA
-----END PGP SIGNATURE-----
2005-06-02 17:39:29 -08:00
mpm@selenic.com
1f5ef11c2b hg checkout: refuse to checkout if there are outstanding changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg checkout: refuse to checkout if there are outstanding changes

This is a stop-gap until I make the working dir logic smarter

manifest hash: a3f6adcb7eecec294000039057d59771958f4186
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnnrKywK+sNU5EO8RAtqBAJwPQQrW5GhjMP9HMkFtfD7qhqxIcgCfXvA4
oXHO13uzBn5JOaTH3KwsMbQ=
=IzTY
-----END PGP SIGNATURE-----
2005-06-01 19:19:38 -08:00
mpm@selenic.com
f1f83067d7 commands: migrate status and branch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

commands: migrate status and branch

manifest hash: 7d893a81a81539173fc74d86152062a1a70bed13
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnhESywK+sNU5EO8RAlBJAKCmv2gHefMOXfX/UUCy1tfV0cOqOQCfbeX8
oaT15B7GBL2lcalGrPXkzY8=
=8gVe
-----END PGP SIGNATURE-----
2005-06-01 11:48:34 -08:00
mpm@selenic.com
4e26999123 hg undo: fixup working dir state
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg undo: fixup working dir state

manifest hash: 60fd7a5621f7c4e87c7c36097aaf11b22e7ee0b4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCngETywK+sNU5EO8RAiC/AKChvIgy61YfOLJcTQg5BKkTLLErRgCgnJMr
+xb+XsjeNfK+83MzeuE8UOk=
=EIlj
-----END PGP SIGNATURE-----
2005-06-01 10:40:19 -08:00
mpm@selenic.com
4cc432f9f1 Beginning of new command parsing interface
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Beginning of new command parsing interface

This adds commands.py, with a primary interface dispatch(args)

Dispatch searches a table of known commands, handles switches, sets up
a repo object if appropriate, and dispatches the command.

It also handles KeyboardInterrupt and can handle similar exceptions in
the future.

If the command is unknown, it falls through to the current command handler.

Commands currently handled by the new scheme: help, init, and annotate

manifest hash: 134cd032c880985e3f92f82efb8b629dd862ba4c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnXEGywK+sNU5EO8RAuDAAJ9q7K4w7qGVWv1NWjCPFGO/UJc6VQCdEhMQ
sBBlSRzah9QPy8K94catZyg=
=wuRf
-----END PGP SIGNATURE-----
2005-06-01 00:25:42 -08:00
mpm@selenic.com
5064b78681 Move ui class to its own module
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Move ui class to its own module

manifest hash: f75c8f9cdfe16f143ab633d0072c14ba88ac88be
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnVxxywK+sNU5EO8RAgPgAJ48p7w4Do/saCC8WkBvHj/rdnoiEgCgrSs9
Wu1fOSgST3rn/2JpZAdFRdA=
=91tt
-----END PGP SIGNATURE-----
2005-05-31 22:57:53 -08:00
mpm@selenic.com
f4af9dc458 hg: don't complain about missing repo with no args
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg: don't complain about missing repo with no args

manifest hash: d8172c0b583d6f2ff60cf49e74c1247de8d9d673
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnVmeywK+sNU5EO8RAj79AJ4wN1SwC8+e1amxv+EAd6VKhpXXYgCeIPDK
iVX9Z0Ix8DiC3p8fquyhFwM=
=c6EH
-----END PGP SIGNATURE-----
2005-05-31 22:45:50 -08:00
mpm@selenic.com
79bacd4c40 hg rawcommit command
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg rawcommit command

From: Christopher Li <hg@chrisli.org>

This allows direct access to the commit command, primarily for
importing from other SCMs.

manifest hash: bea39fa8207582c9fa7ba0904721eb5113c61cf4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnUinywK+sNU5EO8RAhWqAJ9PiafRbfEIA3VsO07BbGZr5adNvgCfT2k7
blYTdkrIiRzzCxn6yPq8Yu4=
=o8k0
-----END PGP SIGNATURE-----
2005-05-31 21:33:27 -08:00
jake@edge2.net
ebfa981ca0 add export, recover, and undo to the man page
add export to hg help
2005-05-30 09:53:48 -07:00
mpm@selenic.com
a1cf98772e Bump the version number to 0.5b for the protocol change
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bump the version number to 0.5b for the protocol change

manifest hash: a7930fa15b716eb90613bd761b47c27331ea4b8b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmz7pywK+sNU5EO8RAt7dAJ4qmUpDRS7/JP/JpLm8uXZ0c+5W/ACfVb0Q
99rjYslSjJfOWYLCKiAzVyU=
=WVVg
-----END PGP SIGNATURE-----
2005-05-30 08:27:21 -08:00
mpm@selenic.com
55d14e5d8d Changes to network protocol
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Changes to network protocol

Stream changes at the delta level rather than at whole delta groups
 this breaks the protocol - we now send a zero byte delta to indicate
 the end of a group rather than sending the entire group length up front
Fix filename length asymmetry while we're breaking things
Fix hidden O(n^2) bug in calculating changegroup
 list.append(e) is O(n), list + [element] is not
Decompress chunks on read in revlog.group()
Improve status messages
 report bytes transferred
 report nothing to do
Deal with /dev/null path brokenness
Remove untriggered patch assertion

manifest hash: 3eedcfe878561f9eb4adedb04f6be618fb8ae8d8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmzlqywK+sNU5EO8RAn0KAJ4z4toWSSGjLoZO6FKWLx/3QbZufACglQgd
S48bumc++DnuY1iPSNWKGAI=
=lCjx
-----END PGP SIGNATURE-----
2005-05-30 08:03:54 -08:00
mpm@selenic.com
c83432e669 Mercurial 0.5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mercurial 0.5

Update version numbers
Fixup MANIFEST.in

manifest hash: 58db9be35685e83133f20e96265d6c434fc106c2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmOwHywK+sNU5EO8RAq0OAKCkMWzSMzhisTFBmT2WLj2bf+PMqwCbBv+S
jNvqIQsru2JMdCQC2eG7CxU=
=c20j
-----END PGP SIGNATURE-----
2005-05-28 14:09:11 -08:00
mpm@selenic.com
854199ca61 hg: remove some debug commands, improve help messages, add .hgpaths file
.hgpaths is a file with lines of the form:

<symbolic name> <repository path or url>

that allows you to do:

hg merge <name>
2005-05-26 23:39:42 -08:00
mpm@selenic.com
759ec3f6bf hg merge: abort if there are outstanding changes in the working directory
We currently don't support merging from the tip into the working
directory, so merge with outstanding local changes is asking for
trouble.
2005-05-26 22:54:48 -08:00
mpm@selenic.com
f86593199d Make undo and recover friendlier
Add them to the help display, have them report failure
2005-05-26 09:48:50 -08:00
mpm@selenic.com
683f21be6a Implement recover and undo commands
This adds an interface to transaction to rollback with a given journal file
and commands to rollback an existing .hg/journal or .hg/undo.
2005-05-26 09:04:54 -08:00
mpm@selenic.com
7bd4038f51 Add 'hg serve' command for stand-alone server
This adds a simple stand-alone web server mode to hg that exports the
current repo for merging and browsing. The default port is 8000.
2005-05-25 16:27:10 -08:00
mpm@selenic.com
33b3059287 Add options to annotate for user/rev/changeset
This eliminates the blame command and makes annotate more flexible.
2005-05-25 08:53:01 -08:00
mpm@selenic.com
1bdc9f0c42 Minor fixes to verify 2005-05-24 20:29:38 -08:00
mpm@selenic.com
e4397937b5 Prettify the web interface
Add header, footer templates
Add null parent handling
Combine files and directories
Add parity flag for alternating line colors
Add line numbers to filerevision
2005-05-23 20:57:48 -08:00
mpm@selenic.com
6ff7eab053 Make hg diff handle files that have been added but not yet committed. 2005-05-21 17:26:44 -08:00
mpm@selenic.com
ffa51818f8 Fix diff and export not showing added files 2005-05-21 17:03:12 -08:00
mpm@selenic.com
c60061b78a Remove debugoldmerge command 2005-05-20 17:47:13 -08:00
mpm@selenic.com
04245ab9dc hg history: don't print file list without -v switch 2005-05-20 17:46:47 -08:00
mpm@selenic.com
3ede7375ba Subdir support for annotate 2005-05-20 17:45:03 -08:00
mpm@selenic.com
d35617bec8 Use revlog.delta and mdiff.patchtext to massively speed up processing
of manifests. This lets us verify a 28k changeset kernel repo in under
two minutes.
2005-05-20 17:44:34 -08:00