Bryan O'Sullivan
261434d5a1
Better fix for issue 622 than we had in 287a2fbd37b0.
2007-07-18 13:56:08 -07:00
Alexis S. L. Carvalho
ae58d97874
merge with crew-stable
2007-07-17 09:28:01 -03:00
Alexis S. L. Carvalho
4770c831b2
hg parents: don't pass an OS-specific path to repo.filectx
...
The only reason to use the matcher code instead of calling util.canonpath
directly is to be able to use "path:canonical/path/to/file" patterns.
2007-07-17 09:08:29 -03:00
Bryan O'Sullivan
e2e04c39f7
issue 622: pull/unbundle -u updates to default branch if repo was empty
2007-07-16 18:01:20 -07:00
Bryan O'Sullivan
ef448328f7
issue 622: pull/unbundle -u updates to default branch if repo was empty
2007-07-16 18:01:20 -07:00
Matt Mackall
86ab3ea033
Merge with -stable
2007-07-14 13:34:40 -05:00
Giorgos Keramidas
827573f6ad
hg grep: handle re.compile errors & update tests/test-grep
2007-07-09 17:41:14 +03:00
Alexis S. L. Carvalho
3b07689b6a
serve: respect settings from .hg/hgrc
...
create_server was looking only at the root ui object, ignoring any
settings from .hg/hgrc. To keep respecting command-line arguments,
commands.serve must also call repo.ui.setconfig.
2007-07-11 19:56:16 -03:00
Alexis S. L. Carvalho
05dd580e30
merge with crew-stable
2007-07-11 20:15:03 -03:00
Brendan Cully
5421e55633
archive: abort on empty repository. Fixes #624 .
2007-07-10 10:06:24 -07:00
Brendan Cully
4654693aa4
Add SSL support to hg serve, activated via --certificate option
2007-07-09 22:12:28 -07:00
Thomas Arendsen Hein
5a9970a155
Add --line-number option to hg annotate (issue506)
...
Line numbers are separated from the last annotation element with a colon,
like with many other commands, e.g. (hg) grep or compiler errors.
Idea and tests by FUJIWARA Katsunori.
2007-07-08 19:59:02 +02:00
Thomas Arendsen Hein
78616ff36e
Use a prefix for debuginstall tempfiles.
...
This way you know where the files came from if they don't get removed.
2007-07-07 20:52:31 +02:00
Matt Mackall
dc9134201b
extensions: untangle some recursive dependencies
2007-07-05 15:37:23 -05:00
Patrick Mezard
cd13d33922
Fix issue589 wording problem
2007-07-05 19:13:08 +02:00
Thomas Arendsen Hein
d01208a3d1
Fixed calling the merge script and reporting errors in debuginstall (issue617)
2007-07-04 09:20:56 +02:00
Alexis S. L. Carvalho
8c2c88e404
Make hg add foo; hg mv foo bar work.
...
- foo will be removed (the user has a copy of its contents in bar)
- bar will not be marked as a copy (there was no committed version of foo).
We print a warning telling that to the user.
Fixes issue269.
2007-07-03 03:06:40 -03:00
Brendan Cully
b1034db3e9
Handle extensions with defined but empty cmdtable
2007-06-28 21:16:25 -07:00
Thomas Arendsen Hein
0b7147a667
Updated command tables in commands.py and hgext extensions.
...
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
2007-06-26 22:38:57 +02:00
Thomas Arendsen Hein
5b3cfe2be9
Fix and test 'hg backout' without or with too many revisions.
2007-06-26 15:28:17 +02:00
Matt Mackall
469dca271e
backout: report short hash in commit message
2007-06-25 12:44:48 -05:00
Giorgos Keramidas
5f8125a5a3
unbundle: accept multiple file arguments
...
update test-bundle for multiple unbundle support
2007-06-24 10:08:38 -05:00
Matt Mackall
9f3b2a8b06
cat: return an error on failure
2007-06-24 09:47:54 -05:00
paul sorenson
7f3fb6d66f
Command in doc comment is now on a single line, fixed
...
after previous formatting broke it.
2007-06-23 22:25:11 -05:00
Thomas Arendsen Hein
2e76adae49
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
2007-06-23 20:21:10 +02:00
Matt Mackall
8dc00c8475
rollback: update help for issue316
2007-06-22 17:29:49 -05:00
Matt Mackall
265560b37a
Merge with Eric Hopper
2007-06-21 18:05:14 -05:00
Patrick Mezard
21ea8128a8
Merge with crew
2007-06-21 22:19:41 +02:00
Marcos Chaves
f5c072cbc9
Handle CTRL+C in serve under Windows.
2007-06-21 21:58:18 +02:00
Matt Mackall
613a7dfcea
identify: take a path to a remote repo
...
Rather than using -R, we take a path as an argument. This lets us use
url#branch syntaxes that may be in hgrc.
2007-06-21 13:09:01 -05:00
Eric Hopper
964ff0a5e3
Change branches to sort 'active' branches first, and add an option to show only active branches.
2007-06-21 10:40:09 -07:00
Matt Mackall
b5a98f60fd
identify: work with remote repos
2007-06-21 11:54:16 -05:00
Matt Mackall
7d837ca833
identify: add support for output flags
2007-06-21 11:54:13 -05:00
Matt Mackall
a0395f3952
identify: accept a revision argument
2007-06-21 11:54:11 -05:00
Matt Mackall
0ca818e7d0
identify: use contexts
2007-06-21 11:42:39 -05:00
Matt Mackall
1f80f939a9
identify: show nullid for empty repo
2007-06-21 11:42:39 -05:00
Thomas Arendsen Hein
3019bb7a0b
Kill trailing spaces
2007-06-21 09:25:49 +02:00
TK Soh
abffe2b1c3
tag: abort when trying to remove nonexistent tags
2007-06-15 14:48:21 -05:00
Brendan Cully
95c08c2bfc
Small fixes for 3acdabb0ef1d (hg heads branch)
2007-06-20 17:53:11 -07:00
Eric Hopper
0bcc9fc15c
Add option to heads to show only heads for current branch.
2007-06-19 08:37:43 -07:00
Patrick Mezard
9a43b6739b
Fix read mode when importing patch.
2007-06-19 17:03:31 +02:00
Patrick Mezard
0b90ff3d83
Merge with crew-stable
2007-06-20 00:22:51 +02:00
Patrick Mezard
ded8d8999d
Fix debugrename --rev option
2007-06-20 00:09:30 +02: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
c71a2b10a7
dirstate: hide internal vars
...
Add an __iter__ method so commands don't need to poke at _map.
2007-06-18 13:24:34 -05:00
Brendan Cully
b6d2fc3ac4
Notify the user that hg branch does not create a branch until commit
2007-06-18 10:44:43 -07:00
Thomas Arendsen Hein
1bdf3feac6
Make --import-branch option actually work (- is translated to _)
2007-06-17 14:11:30 +02:00
Eric Hopper
4e64ad3b5a
Add --import-branch option to hg import to pull in branch information without --exact
2007-06-14 09:01:51 -07:00
Brendan Cully
228060290f
Make parents with a file but not a revision use working directory revision.
2007-06-14 10:58:49 -07:00
Alexis S. L. Carvalho
2a15874eb2
commands.remove: don't use the unknown list
2007-06-13 19:15:58 -03:00
Alexis S. L. Carvalho
f5f49df61e
commands.commit: don't use the unknown list
2007-06-13 19:15:58 -03:00
Alexis S. L. Carvalho
12900975cc
revert: use util.lexists
2007-06-13 19:15:58 -03:00
Alexis S. L. Carvalho
587c06ebc5
commands.commit: symlinks are supported
2007-06-13 19:15:58 -03:00
Brendan Cully
d9c890b630
Make parents with a file but not a revision use working directory revision.
2007-06-14 10:58:49 -07:00
Thomas Arendsen Hein
635f47fb1d
Revive commands.dispatch as a simple way to call hg from other pythons scripts.
...
This was already used by hg-ssh and others and is really convenient if you
just want a native equivalent of calling the command line version.
2007-06-12 17:39:57 +02:00
Matt Mackall
7daba33088
dispatch: move dispatching code to cmdutil
2007-06-11 21:09:24 -05:00
Matt Mackall
fc13f3eb60
dispatch: move runcommand to cmdutil
2007-06-11 21:09:24 -05:00
Matt Mackall
fe0bc5497b
dispatch: pull final command execution into its own function
2007-06-11 21:09:24 -05:00
Matt Mackall
9ddb5e812f
dispatch: reduce nesting by moving parsing exceptions
2007-06-11 21:09:23 -05:00
Matt Mackall
904b4d70df
dispatch: move signal and exception handling to its own function
2007-06-11 21:09:23 -05:00
Matt Mackall
67bd5873db
Create a separate module for managing extensions
2007-06-11 21:09:23 -05:00
Matt Mackall
cb98d050d6
extensions: separate function for loading single extensions
2007-06-11 21:09:23 -05:00
Matt Mackall
5e5d2fc9f8
dispatch: reorder functions
2007-06-11 21:09:23 -05:00
Alexis S. L. Carvalho
7ca05536b5
docopy: use repo.pathto to format paths for printing
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
e1bf8e80c5
Add dirstate.pathto and localrepo.pathto.
...
Every time util.pathto is called, we have to pass the repo root and the
repo cwd.
dirstate.pathto is a simple convenience function that knows about the
root and the cwd arguments. It's still possible to pass the cwd as an
optimization.
localrepo.pathto is a convenience function that just calls
dirstate.pathto, just like localrepo.getcwd.
dirstate.pathto becomes a single point that converts most (all?) paths
from the internal representation to some OS-specific relative path for
display purposes.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
12e1854b67
Use absolute paths in revert.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
0d958ed072
Use absolute paths in docopy.
2007-06-08 23:49:12 -03:00
Thomas Arendsen Hein
49220695bc
Removed trailing whitespace and tabs from python files
2007-06-06 20:22:52 +02:00
Joel Rosdahl
27bc08a3cc
Fix bug in "hg serve -v"
2007-06-04 21:49:01 +02:00
Bryan O'Sullivan
747ba13e75
Merge with crew.
2007-06-02 09:04:23 -07:00
Matt Mackall
41d9aaebb8
Add support for url#id syntax
...
This allows you to do:
hg clone http://server/repo#stable
which is equivalent to:
hg clone -r stable http://server/repo
Future incoming, outgoing, and push commands will default to using
this id because it's recorded in the default path.
Other commands that accept URLs (push, pull, bundle, incoming, and
outgoing) also accept this syntax.
2007-06-01 18:40:14 -05:00
Thomas Arendsen Hein
2366afd684
merge with stable
2007-06-01 19:49:09 +02:00
Thomas Arendsen Hein
3c2ee08111
Make "hg incoming -r revision_number" work for remote repos (issue566)
...
Uses the remote repository's lookup method as pull does and only transfers
what is needed to calculate incoming changesets.
One minor problem:
As only the needed changesets are transfered and stored in a local bundle
repository, the tip tag of this bundle is shows despite not being the tip
changeset of the remote repository.
(see "+tag: tip" in tests/test-incoming-outgoing.out in this patch)
2007-06-01 19:45:05 +02:00
Bryan O'Sullivan
4eff752451
Automated merge with http://hg.intevation.org/mercurial/crew
2007-05-27 14:43:29 -07:00
Bryan O'Sullivan
d67a234671
Introduce find_exe. Use instead of find_in_path for programs.
...
The behaviour of find_in_path was broken for config options containing
path names, because it always searched the given path, even when not
necessary. The find_exe function is more polite: if the name passed
to it contains a path component, it just returns it.
2007-05-27 14:26:54 -07:00
Daniel Holth
5faf58b019
accept -r REV in more places
...
Commands affected:
* update
* merge
* backout
2007-05-17 13:55:24 -04:00
Eric Hopper
ba811c3509
Fix hg import --exact bug that hangs hg on failure.
2007-05-17 09:29:30 -07:00
Eric Hopper
04bb1c642e
Make hg import --exact work when a new branch is created by an import.
2007-05-17 20:09:52 -07:00
Eric Hopper
9da473c4e8
Add ability to parse branch information to hg import
2007-05-17 20:09:47 -07:00
Alexis S. L. Carvalho
5dde9c8a57
improve warning for hg add foo; hg mv foo bar
2007-07-11 19:56:16 -03:00
Patrick Mezard
3e2c29954d
Add ui.patch option.
...
ui.patch overrides the default patch/gpatch command and options.
2007-05-12 21:09:31 +02:00
Brendan Cully
46c9d09fa2
Also restore old rm -A behavior for inexact patterns
2007-04-30 09:32:44 -07:00
Brendan Cully
9759da5859
Fix rm -A with no patterns, which I just broke.
2007-04-30 09:13:27 -07:00
Brendan Cully
bd110b0cd3
Make rm --after simply mark files as removed, unless --force is also given
2007-04-30 08:51:59 -07:00
Patrick Mezard
6af99d87d5
Use patch.patch() when checking for patch availability.
...
The test is closer to what we want to know. It also makes sense when you deal with patched versions of patch() as most people do under win32.
2007-04-28 11:53:36 +02:00
Brendan Cully
ff66cca34d
Merge with crew
2007-04-28 09:03:47 -07:00
Joel Rosdahl
57515f7282
Fix bad reference to RepoError in import command
2007-04-28 16:28:54 +02:00
Bryan O'Sullivan
7b6d636f19
Refactor commands.serve to allow other commands to run as services.
...
This introduces a new function, cmdutil.service.
2007-04-27 21:30:55 -07:00
Brendan Cully
86e588eafb
Make copy --after work for files that have been hg added.
2007-04-24 18:43:18 -07:00
Patrick Mezard
c9215420e8
Display symlink or executable bit with manifest -v
...
New output looks like:
644 a
755 * b/a
644 @ l
2007-10-06 22:30:22 +02:00
Alexis S. L. Carvalho
ddf41e005d
Merge with crew-stable
2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
bef764be98
make identify an optionalrepo command
...
Fixes issue726.
2007-09-24 19:00:11 -03:00
Alexis S. L. Carvalho
bcee2981c6
copy: if destination ends with "/", make sure it's a directory
...
Fixes issue724.
2007-09-24 19:00:11 -03:00
Matt Mackall
44c4641c5d
debugindex: more robust for damaged indexes
2007-09-21 17:13:38 -05:00
Patrick Mezard
f54216b36e
debuginstall: stop looking for patch utility, just test it
2007-09-15 16:07:05 +02:00
Patrick Mezard
6e671bc489
Merge with crew-stable
2007-09-11 23:38:29 +02:00
Patrick Mezard
285f71a370
parents: make it match the doc when called on a file
...
parents used to return the parent revision of the last revision updating selected file, instead of the updating revision itself.
2007-09-11 23:04:42 +02:00
Brendan Cully
ff7b7ccc24
Merge with crew-stable
2007-08-29 16:19:27 -07:00
Brendan Cully
ebae83c8bb
When reverting a file which was renamed, also revert the old name
2007-08-29 16:15:23 -07:00
Bryan O'Sullivan
6fbb9f2f2f
Push capability checking into protocol-level code.
2007-08-27 14:48:08 -07:00
Alexis S. L. Carvalho
714fa94597
Merge with crew-stable
2007-08-27 02:21:58 -03:00
Alexis S. L. Carvalho
73454f8d16
pull -u: if "url#rev" was given, update to rev
2007-08-27 01:44:35 -03:00
Alexis S. L. Carvalho
88d2731fa8
parseurl: also return the revision after the "#"; add a test
2007-08-27 01:44:35 -03:00
Benoit Boissinot
513ea49cfc
improve error message for 'hg merge' when repo already at branchtip
2007-08-25 11:30:11 +02:00
rupert.thurner@gmail.com
8e267a0e78
add import from url capability
2007-08-20 22:02:05 +02:00
Alexis S. L. Carvalho
0f222fbdf3
Move enabling of demandimport to dispatch.py
...
This avoids loading many modules before enabling demandimport.
2007-08-17 17:33:27 -03:00
Alexis S. L. Carvalho
dc23a7db18
Move cmdtable and reposetup handling out of extensions.py
...
A new function (extensions.extensions) allows the code that is
interested in those attributes to handle them directly.
This allows some cleanups of extensions.py. Notably, we can
remove the extensions.commandtable hack.
It also makes it easier to add standard extension attributes,
like a "hgwebsetup" function or a "helptable" dict that augments
the data in help.py, etc.
2007-08-17 17:33:27 -03: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
Matt Mackall
1d9daf6473
move parseurl from cmdutil to hg
2007-08-15 16:10:36 -05:00
Patrick Mezard
4ad44c80f1
Merge with crew-stable
2007-08-15 16:43:40 +02:00
Patrick Mezard
498ca5601a
Fix issue 685: trackback in grep -r after rename
2007-08-15 16:09:04 +02:00
Bryan O'Sullivan
d003ab09e5
debugstate: print symlinks as 'lnk', not '777'
2007-08-09 20:03:34 -07:00
Bryan O'Sullivan
c42c6ca456
manifest: accept -r for rev specification
2007-08-09 19:42:33 -07:00
Benoit Boissinot
258f71b5a3
merge with -stable
2007-08-08 23:00:01 +02:00
Eric Hopper
e7f6d77433
Fix hgwebdir after aaaee74b883fc144cc3472c81c61157bc69374b6 broke it.
2007-08-08 22:47:30 +02:00
Benoit Boissinot
ce6a51c4eb
refactor options from cmdtable
...
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Thomas Arendsen Hein
bbd3ff0014
merge with crew-stable
2007-08-06 20:31:15 +02:00
Thomas Arendsen Hein
502b9e407c
Update on pull -u when heads were closed (fixes issue666).
...
Patch written by Benoit Boissinot.
This should probably be improved in the future to handle long-living
branches, as joining two "other" heads will switch to that new head.
But this is not a new problem, as adding to the "other" head would have
switched to that new head, too.
2007-08-06 20:25:50 +02:00
Thomas Arendsen Hein
325c8db06b
merge with crew-stable
2007-08-04 22:27:52 +02:00
Thomas Arendsen Hein
ae0d60a260
Simplify/correct finding the hg executable (fixes issue644)
...
Simply use find_exe('hg') as the default value for $HG and require to manually
set it if you have special requirements.
While the default will not always be 100% correct (i.e. the identical hg
version) for many users it is and for the others the hg executable found in
the PATH should do most things correctly.
Developers or other users with multiple installs can set $HG or run something
like util.set_hgexecutable in their shell or python scripts.
Additionally util.hgexecutable() is now available so extensions can access
the value with a public interface, too.
2007-08-04 22:25:12 +02:00
Alexis S. L. Carvalho
5af674774c
del transaction before lock before wlock
...
This way rollbacks happen while the repo is still locked.
Deleting lock before wlock is not strictly necessary, but is
more consistent with the locking order.
2007-08-02 01:56:08 -03:00
Bryan O'Sullivan
3bcee4b94e
commands: move commit to cmdutil as wrapper for commit-like functions
2007-07-31 16:28:05 -07:00
Brendan Cully
5c862af489
archive: abort on empty repository. Fixes #624 .
2007-07-10 10:06:24 -07:00
Alexis S. L. Carvalho
047c4b002b
Merge with crew-stable.
2007-04-07 04:45:27 -03:00
TK Soh
8a4ed5c177
help: log --keyword is case-insensitive
2007-03-29 10:25:19 -05:00
TK Soh
9f11c60f21
log: expand keyword search to full list of files
2007-03-29 09:28:10 -05:00
Alexis S. L. Carvalho
8e9491052e
Add a pointer to "hg -v help" to the bottom of hg help {,cmd} output
...
This should make it easier to discover global options.
As a bonus, they are no longer displayed by something like a
hg -v help dates
2007-04-07 04:27:55 -03:00
Matt Mackall
84a6ecd211
tags: require -f to replace an existing tag
...
based on a patch from Johan Herland <johherla@online.no>
2007-03-23 00:12:28 -05:00
Alexis S. L. Carvalho
1ff95ba799
debugsetparents: wlock the repo before updating the dirstate
2007-03-19 19:07:40 -03:00
Alexis S. L. Carvalho
beebce1bec
avoid a traceback with hg branch newbranch; hg up
2007-03-16 00:22:59 -03:00
Alexis S. L. Carvalho
fcb39243b1
pass repo.root to util.pathto() in preparation for the next patch
2007-03-16 00:22:57 -03:00
Alexis S. L. Carvalho
8cf3bc3446
Merge last few matcher/locate fixes.
2007-04-04 04:22:08 -03:00
Alexis S. L. Carvalho
d766331e6f
locate: don't print "file not found" messages.
...
This should fix issue204.
2007-04-04 04:22:06 -03:00
Alexis S. L. Carvalho
a8939ea9c7
fix hg commit . in the repo root
2007-03-20 22:09:51 -03:00
Alexis S. L. Carvalho
bc0e37f5ff
locate: exit(1) if we didn't print any file
2007-03-10 23:00:58 -03:00
Alexis S. L. Carvalho
b53e6f3897
change locate to use relglobs by default
...
This makes its default behaviour useful again (issue108), and
changes it search the entire repository by default (instead
of just the cwd), just like all other commands.
It also hides issue204 by default, but you'll still see the
same behaviour if you give it a relpath: pattern.
2007-03-10 23:00:57 -03:00
Brendan Cully
09cc2427b1
Make update with no node jump to the tip of the current branch
2007-03-10 17:36:27 -08:00
Thomas Arendsen Hein
1de135fc65
Fix help text for hg status -i
2007-03-06 12:52:07 +01:00
Thomas Arendsen Hein
2c5a2d1059
Don't truncate tag and branch names after 30 chars (introduced 42bf4f46781a)
...
with test added for a long (local) tag name.
2007-03-05 19:48:21 +01:00
Alexis S. L. Carvalho
77c91df790
hg serve: call setconfig on the parentui
...
It makes sense to do this on the "global" ui object, since command line
options should affect the whole process.
This should fix hg serve --style=gitweb inside a repo (part of issue253).
2007-02-13 10:00:17 -02:00
Alexis S. L. Carvalho
60b9229aaa
install reposetup hook right after loading the extension
2007-02-06 15:43:01 -02:00
Alexis S. L. Carvalho
b2dff97617
Open bundle files in binary mode
2007-01-30 20:37:58 -02:00
Alexis S. L. Carvalho
a8f8cca050
unbundle: don't use urllib if it's a local file
2007-01-30 18:32:21 -02:00
Alexis S. L. Carvalho
5b836109d8
docopy: deal with globs on windows in a better way
2007-01-30 18:32:20 -02:00
Benoit Boissinot
20cb213c14
mtime can be -1 after a merge and cause tracebacks on win32.
...
Output "unset" instead.
2007-01-30 00:26:19 +01:00
Patrick Mezard
f73963b537
Copied files sources were not shown by status -C under Win32.
...
repo.dirstate.copied() takes a normalized paths while local paths were passed.
2007-01-14 19:10:35 +01:00
Matt Mackall
035527c39a
Merge with crew
2007-03-24 02:57:27 -05:00
Matt Mackall
1139bf86fc
Merge with -stable
2007-03-24 02:45:08 -05:00
Matt Mackall
d398e34f71
Merge with crew
2007-03-23 01:04:21 -05:00
Matt Mackall
04561e556e
revlog: simplify revlog version handling
...
- pass the default version as an attribute on the opener
- eliminate config option mess
2007-03-22 19:52:38 -05:00