Commit Graph

8035 Commits

Author SHA1 Message Date
Angel Ezquerra
16f9562667 revert: warn that subrepos cannot be reverted
(tests added by mpm)
2011-10-15 01:06:52 +02:00
Greg Ward
aeec456986 merge: expand environment variables and ~/ in tool.executable
hgrc(5) already implies that this works, so we might as well support it.

Another approach would be to implement this in util.findexe(): that
would benefit other callers of findexe(), e.g. convert and anyone
calling the user's editor. But findexe() is really implemented in
both posix.py and windows.py, so this would make both of those modules
depend on util.py: not good. So keep it narrow and only for merge
tools.
2011-10-12 21:45:58 -04:00
Matt Mackall
7791d14df5 minirst: add style flag to format 2011-10-15 00:39:04 -05:00
Matt Mackall
cdd258d4fd minirst: add basic HTML formatting support 2011-10-15 00:39:01 -05:00
Matt Mackall
7751048134 graft: use status verbosity for reporting grafts 2011-10-14 15:40:50 -05:00
Mads Kiilerich
c91fb0e17c httprepo: make __del__ more stable in error situations
Some errors could leave self.urlopener uninitialized and thus cause strange
crashes in __del__.

This member variable is now "declared statically" and checked for assignment
before use.
2011-10-13 04:27:49 +02:00
Matt Mackall
3c9792e3dc graft: add examples and information about copied metadata 2011-10-12 18:59:59 -05:00
Matt Mackall
1841aff181 graft: add --continue support 2011-10-12 18:48:57 -05:00
Matt Mackall
d5e94e6c90 graft: add user, date, and tool options 2011-10-12 18:46:23 -05:00
Matt Mackall
0069040fa2 graft: add --edit 2011-10-12 18:46:03 -05:00
Matt Mackall
06ac7c8606 graft: add initial implementation 2011-10-12 18:45:36 -05:00
Augie Fackler
6d4a8aa3a9 bookmarks: delegate writing to the repo just like reading
This makes it easier for alternate storage backends to not use flat
files for bookmarks storage.
2011-10-12 11:09:57 -05:00
Eric Roshan Eisner
070c37b77f subrepo: fix git branch tracking logic (issue2920) 2011-10-11 21:34:55 -07:00
Augie Fackler
b0cd40af6a alias: don't shadow commands that we only partially matched (issue2993) (BC)
Previously, if you set an alias for "ci", it'd also shadow "commit"
even though you didn't specify that. This occurred for all commands
with explicit short variations.
2011-10-11 17:20:03 -05:00
Pierre-Yves David
ad8f123b6d resolve: update documentation to mention the .orig backup 2011-10-11 18:48:45 +02:00
Eric Roshan Eisner
a6f358182b cmdutil.bailifchanged: abort for dirty subrepos 2011-10-11 18:18:15 -07:00
Matt Mackall
944b7f7b5c pyflakes: clean up some import noise 2011-10-11 23:16:05 -05:00
Matt Mackall
776ce88bdd bdiff: fix pointer aliasing 2011-10-11 20:21:13 -05:00
Matt Mackall
72fd6652f4 import: add --edit switch 2011-10-11 08:32:04 -05:00
Augie Fackler
3b65f30ba9 httpclient: update to 07d8c356f4d1 of py-nonblocking-http
This addresses a defect when the server closes the socket before
finishing a response (if it crashes, for example) first spotted in
Issue2951.
2011-10-10 17:57:40 -05:00
Andreas Freimuth
5fe27df173 wireproto: do not call pushkey module directly (issue3041)
Call the repos pushkey/listkeys member function instead.
So the pushkey-hooks are triggered.
2011-10-10 13:52:54 +02:00
Matt Mackall
7d65735c38 rebase: move updatedirstate into cmdutil so it can be shared 2011-10-09 16:14:37 -05:00
Matt Mackall
fe476543eb subrepo: add git to the help topic 2011-10-09 11:03:57 -05:00
Matt Mackall
0649c57d76 branch: fix formatting of help note 2011-10-08 15:19:05 -05:00
Matt Mackall
36ed787d41 backout: deprecate/hide support for backing out merges
This has never worked usefully:

- it can't undo a completely unwanted merge, as it leaves the merge in the DAG

- it can't undo a faulty merge as that means doing a merge correctly,
  not simply reverting to one or the other parent

Both of these kinds of merge also require coordinated action among
developers to avoid the bad merge continuing to affect future merges,
so we should stop pretending that backout is of any help here.

As backing out a merge now requires a hidden option, it can't be done
by accident, but will continue to 'work' for anyone who's already
dependent on --parent for some unknown reason.
2011-10-08 14:18:18 -05:00
Matt Mackall
f26269e791 backout: add a note about not working on merges 2011-10-08 13:28:13 -05:00
Matt Mackall
631fb3ec67 backout: mark some help verbose 2011-10-08 13:23:57 -05:00
Matt Mackall
871da8c4a2 merge with stable 2011-10-07 17:22:12 -05:00
Matt Mackall
6435383b32 help: generate command help into a single RST string for formatting 2011-10-07 17:08:24 -05:00
Matt Mackall
58c81fa35e help: unify the two -v notes for command help 2011-10-07 16:36:54 -05:00
Kirill Elagin
a331869573 diff: enhance highlighting with color (issue3034)
Now the highlighter knows whether it is in the header of the patch or not.
2011-10-05 09:20:38 +03:00
Matt Mackall
f315765fd4 debuginstall: report the template path 2011-10-07 15:36:50 -05:00
Matt Mackall
f407e6b85d subrepo: fix repo relative path calculation for root directories (issue3033) 2011-10-02 16:41:07 -05:00
Greg Ward
122fc5d49f extensions: print some debug info on import failure
This is handy if hgext.foo exists but has a bogus "import blah":
previously we just discarded the "No module named blah" error. Now at
least you can see it with --debug. Not perfect, but better than
nothing.
2011-10-01 16:42:39 -04:00
Greg Ward
eb46fccd3a import: wrap a transaction around the whole command
Now 'rollback' after 'import' is less surprising: it rolls back all of
the imported changesets, not just the last one. As an extra added
benefit, you don't need 'rollback -f' after 'import --bypass', which
was an undesired side effect of fixing issue2998 (f9f52d71c33b)..

Note that this is a different take on issue963, which complained that
rollback after importing multiple patches returned the working dir
parent to the starting point, not to the second-last patch applied.
Since we now rollback the entire import, returning the working dir to
the starting point is entirely logical. So this change also undoes
b12d79024900, the fix to issue963, and updates its tests accordingly.

Bottom line: rollback after import was weird before issue963,
understandable since the fix for issue963, and even better now.
2011-10-02 14:34:28 -04:00
Greg Ward
dc0fd85c49 import: improve error reporting
When applying a series of patch files, it's nice to be explicitly told *which* file is broken.
2011-10-01 21:52:44 -04:00
Greg Ward
a0e8643eb9 import: join base with patchurl *after* checking for stdin
This only matters when using the deprecated --base option, and
combining --base with a patch on stdin makes no sense. But it's such
an obvious bug and easy fix that I couldn't pass it by.
2011-10-01 21:51:25 -04:00
Greg Ward
2e336bf41b import: rename some local variables 2011-10-01 21:49:04 -04:00
Greg Ward
dccb64c8ca import: simplify status reporting logic (and make it more I18N-friendly)
The old code printed (with ui.status()) the changeset ID created by
patch N after committing patch N+1, e.g.

  applying patch1
  applying patch2
  applied 1d4bd90af0e4

where 1d4bd90af0e4 is the changeset ID resulting from patch1. That's
just weird. It's also inconsistent: we only reported the changeset ID
when applying >1 patches. And it's inconsistent with 'commit', which
only tells you the new changeset ID in verbose mode. Finally, the
existing code was I18N-hostile, since it concatenated translated
strings.

The new way is to print the just-created changeset ID with ui.note()
immediately after committing it. It also clarifies what the user
message is for easier I18N.
2011-10-01 21:30:49 -04:00
Matt Mackall
2a412dcdd8 rst: fix detection of single-row tables
This fixes option lists for commands with only an --mq option.
2011-10-02 13:13:46 -05:00
Matt Mackall
55e59c2f85 subrepo: improve error message when svn isn't found
subprocess was returning the following unhelpful message:

 abort: No such file or directory
2011-10-02 13:02:15 -05:00
Matt Mackall
9b00238567 rollback: use a hint for force 2011-10-01 16:18:51 -05:00
Greg Ward
3e3c1d99c8 rollback: avoid unsafe rollback when not at tip (issue2998)
You can get into trouble if you commit, update back to an older
changeset, and then rollback. The update removes your valuable changes
from the working dir, then rollback removes them history. Oops: you've
just irretrievably lost data running nothing but core Mercurial
commands. (More subtly: rollback from a shared clone that was already
at an older changeset -- no update required, just rollback from the
wrong directory.)

The fix assumes that only "commit" transactions have irreplaceable
data, and allows rolling back non-commit transactions as always. But
when rolling back a commit, check that the working dir is checked out
to tip, i.e. the changeset we're about to destroy. If not, abort. You
can get back the old (dangerous) behaviour with --force.
2011-09-30 21:58:54 -04:00
Matt Mackall
069653930c clone: add help examples 2011-09-30 14:26:36 -05:00
Matt Mackall
dafa846b62 clone: add a note about -u/-U 2011-09-30 14:12:48 -05:00
Matt Mackall
f9176212e9 clone: move portions of help into the verbose section 2011-09-30 14:09:45 -05:00
Matt Mackall
ab06daee96 clone: move url crossref to bottom 2011-09-30 11:30:00 -05:00
Matt Mackall
b1d2de3f73 clone: improve help on -r/-b and tags 2011-09-30 11:27:59 -05:00
Steffen Daode Nurpmeso
f5ba5be1a8 patch: correctly handle non-tabular Subject: line
The line content of continued Subject: lines was yet joined via
str.replace('\n\t', ' '), which does not handle continuation via
spaces.  So expan the regular expression instead to
handle all allowed forms of mail header line continuation.
2011-09-27 18:41:09 -05:00
Kevin Gessner
d0a563a1b5 util: fix crash converting an invalid future date to string
Post-2038 timestamps cannot be handled on 32-bit architectures. Clamp
such dates to the maximum 32-bit timestamp.
2011-09-23 09:02:27 -07:00