Commit Graph

8046 Commits

Author SHA1 Message Date
Martin Geisler
acfa971cf1 subrepos: abort commit by default if a subrepo is dirty (BC)
This changeset flips the default value of ui.commitsubrepos setting
from True to False and adds a --subrepos flag to commit.

The commit, status, and diff commands behave like this with regard to
recusion and the ui.commitsubrepos setting:

          | recurses      | recurses
          | by default    | with --subrepos
  --------+---------------+----------------
  commit: | commitsubrepo | True
  status: | False         | True
  diff:   | False         | True

By changing the default from True to False, the table becomes
consistent in the two columns:

* without --subrepos on the command line, commit will abort if a
  subrepo is dirty and status/diff wont show changes inside subrepos.

* with --subrepos, all three commands will recurse.

A --subrepos flag on the command line overrides the config settin.g
2011-10-21 00:33:08 +02:00
Wagner Bruna
7a521d704e bisect: add i18n contexts 2011-10-18 09:38:14 -02:00
Wagner Bruna
d4e8e13b0d import: add i18n context 2011-10-18 09:38:10 -02:00
Mads Kiilerich
06d30b903b grep: correct handling of matching lines without line ending (issue3050)
Matching lines without trailing '\n' was missing the last character.

That seems to have been an unintended side effect of 8abe3f27975c.
The test in c21748e4cd4d documents the bad behaviour.
2011-10-16 01:26:06 +02:00
Pierre-Yves David
88aa929fad discovery: Fix error print mentioning a 'None' branch
When talking to old server discovery use heads of the 'None' branch to refer to
topological heads. This use of None should never make it to the end user.
2011-10-17 11:37:59 +02:00
Matt Mackall
9dea83bdb8 auth: fix realm handling with Python < 2.4.3 (issue2739) 2011-10-17 13:42:42 -05:00
Martin Geisler
c49aaff90e subrepo: abort in hgsubrepo._get if the destination is obstructed
Before, we deleted foo when we determined that there were zero
changesets in the foo subrepo. Any files in foo was deleted too. We
now delete foo/.hg instead, and the normal checks in hg.clone will
then abort if there are untracked files in foo.
2011-10-17 18:01:38 +02:00
Martin Geisler
ebc547d4c7 subrepo: pull revisions on demand when archiving hg subrepos
Before, running 'hg archive -S' could result in

 abort: unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'!

if a subrepo was missing completely or had missing changesets. Now,
the missing changesets will be pulled or cloned as appropriate.

This make Mercurial subrepos match Git subrepos which already took
care to fetch any missing commits before starting the archive.
2011-10-17 16:45:19 +02:00
Thomas Arendsen Hein
5a6f0ca4ac commands: use separate try/except and try/finally as needed for python2.4
69d55e9a084a introduced a try/except/finally block, which breaks compatibility
with python2.4
2011-10-16 11:12:59 +02:00
Matt Mackall
2ba9ce4879 revset: fix %r handling in formatspec 2011-10-15 12:52:43 -05:00
Matt Mackall
275981abb2 revset: add %r for embedded revset support to formatspec
This allows folding external revsets or lists of revsets into a revset
expression. Revsets are pre-parsed for validity so that syntax errors
don't escape.
2011-10-15 10:20:08 -05:00
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