Commit Graph

35 Commits

Author SHA1 Message Date
Matt Harbison
3ea5067ed3 subrepo: add basic support to hgsubrepo for the files command
Paths into the subrepo are not yet supported.

The need to use the workingctx in the subrepo will likely be used more in the
future, with the proposed working directory revset symbol.  It is also needed
with archive, if that code is to be reused to support 'extdiff -S'.
Unfortunately, it doesn't seem possible to put the smarts in subrepo.subrepo(),
as it breaks various status and diff tests.

I opted not to pass the desired revision into the subrepo method explicitly,
because the only ones that do pass an explicit revision are methods like status
and diff, which actually operate on two contexts- the subrepo state and the
explicitly passed revision.
2015-03-18 23:03:41 -04:00
Laurent Charignon
f97eaa8ce4 revert: add flag to make revert interactive 2015-03-16 16:33:59 -07:00
Laurent Charignon
00e39c0a37 record: add interactive option to the commit command 2015-03-11 15:22:04 -07:00
Siddharth Agarwal
d2a372910d commands.import: accept a prefix option
The --prefix option is meant to be relative to the root rather than the current
working directory. This is for consistency with the rest of 'hg import' --
paths in patches are otherwise considered to be relative to the root.

In upcoming patches we'll hook this option up to the patch functions.

--exact with --prefix is currently disallowed because I can't really come up
with sensible semantics for it, especially when only part of the patch is
preserved.
2015-03-06 22:56:19 -08:00
Yuya Nishihara
34b5e5774a resolve: port to generic templater
Test output changes because color labels are applied separately.
2015-02-11 13:59:13 +09:00
Sean Farley
dc331facee debugnamecomplete: rename from debuglabelcomplete
Now that we have decided on the use of 'name' instead of 'label' we rename this
function accordingly.

The old method 'debuglabelcomplete' has been left as a deprecated command so
that current scripts don't break.
2014-10-17 13:41:29 -07:00
Mateusz Kwapich
158958d7b9 backout: add --commit option
Mercurial backout command makes a commmit by default only when the backed out
revision is the parent of working directory and doesn't commit in any other
case.

The --commit option changes behaviour of backout to make a commit whenever
possible (i.e. there is no unresolved conflicts). This behaviour seems more
intuitive to many use (especially git users migrating to hg).
2014-12-17 17:26:12 -08:00
Matt Harbison
3b63e95b8e addremove: add support for the -S flag
Git and svn subrepos are currently not supported.  It doesn't look like git or
svn have these commands natively, so that's an area for a git or svn expert.
2014-11-24 23:51:26 -05:00
Matt Harbison
17e7835237 remove: recurse into subrepositories with --subrepos/-S flag
Like 'forget', git and svn subrepos are currently not supported.  Unfortunately
the name 'remove' is already used in the subrepo classes, so we break the
convention of naming the subrepo function after the command.
2014-11-15 21:36:19 -05:00
Siddharth Agarwal
4d6e85ce0c diff: add a --noprefix option
See previous patch descriptions for the motivation.

The tests reflect the current state of the world -- as we add support we'll see
changes in the test output.
2014-11-13 00:13:48 -08:00
Yuya Nishihara
5079a4aa16 bookmarks: port to generic templater 2014-10-03 00:43:22 +09:00
Yuya Nishihara
690eb8ddf7 branches: port to generic templater 2014-10-02 22:59:56 +09:00
Matt Mackall
e3f89597c5 commands: add debuglocks to report/clear lock state 2014-09-26 16:44:11 -05:00
Yuya Nishihara
6ecd008e93 annotate: port to generic templater enabled by hidden -T option
If the selected formatter is other than plainformatter, raw data are passed
to the formatter.  In this case, it isn't necessary (and not possible) to
calculate column widths.

Field names are substituted to be the same as "log" command.

There are a few limitations:

 - "binary file" message is not included in formatted output.
 - no data structure for multiple files. all lines are packed to single list.
2014-09-17 23:21:20 +09:00
Matt Mackall
aa7d73cbbb commands: add hidden -T option for files/manifest/status/tags
These commands have generic formatting support but no way to enable it
yet. When this feature is more fully developed, this flag will be unhidden.
2014-09-15 13:15:07 -05:00
Matt Mackall
e7503a440b files: add new command unifying locate and manifest functionality 2014-09-12 18:32:46 -05:00
Pierre-Yves David
dfccc53b1c debugobsolete: add a --rev argument
This argument can be used to list markers relevant to a set of revisions. We
add a test for this option and the relevant computation in the same move.
2014-08-19 23:22:44 -07:00
Pierre-Yves David
4a696375af debugobsolete: add a way to record parent information
We add a ``--record-parents`` flag to debugobsolete. This can be used to record
parent information in the marker when the precursors are known locally. This
will be useful to test the "relevant markers" computation.
2014-08-20 00:43:08 -07:00
Siddharth Agarwal
871030a1ab graft: allow regrafting ancestors with --force (issue3220) 2014-07-25 18:21:16 -07:00
FUJIWARA Katsunori
2b812d91a3 backout: accept '--edit' like other commands creating new changeset
After this patch, users can invoke editor for the commit message by
'--edit' option regardless of '--message'/'--logfile'.
2014-06-01 00:08:32 +09:00
Pierre-Yves David
b7c330c46d import: add --partial flag to create a changeset despite failed hunks
The `hg import` command gains a `--partial` flag. When specified, a commit will
always be created from a patch import. Any hunk that fails to apply will
create .rej file, same as what `hg qimport` would do. This change is mainly
aimed at preserving changeset metadata when applying a patch, something very
important for reviewers.

In case of failure with `--partial`, `hg import` returns 1 and the following
message is displayed:

    patch applied partially
    (fix the .rej files and run `hg commit --amend`)

When multiple patches are imported, we stop at the first one with failed hunks.

In the future, someone may feel brave enough to tackle a --continue flag to
import.
2014-05-08 17:08:17 -07:00
Mads Kiilerich
8244be3a60 update: introduce --tool for controlling the merge tool
Update is a kind of merge and may also need a merge tool and should have the
options described in the merge-tools help.
2014-05-19 01:53:34 +02:00
Bradley M. Kuhn
4cd8c219ba commit: --edit/-e to force edit of otherwise-supplied commit message
The --edit/-e option for the 'commit' command forces editor, even when a
commit message has been provided already by other means, such as by the -m or
-l options.
2013-09-08 19:02:08 -04:00
Matt Mackall
55a0f78973 config: add --global and --local flags
These start an editor on the system-wide or repository-level config files.
2014-03-18 18:49:30 -05:00
Matt Mackall
6b078f60b5 config: add initial implementation of --edit
This launches the preferred editor on either:

a) the first non-empty user rc file found
b) the first user rc file in the search list
2014-02-27 13:46:32 -06:00
Matt Mackall
ae628826e6 config: move showconfig code and add config as primary alias
Preparation for adding config --edit to launch an editor
2014-02-27 12:42:09 -06:00
Siddharth Agarwal
bf7fddd84c commands.debugrevspec: add an option to print the optimized expression tree
This will be used in an upcoming patch to test that the optimizer works.
2014-02-13 13:52:45 -08:00
Sean Farley
5f6b3d5623 pathcomplete: remove ambiguous entries for sole completion on a directory
Previously, directories were added with the trailing slash and, if there was
only one completion, then another ambiguous entry was created using '.', as
follows:

$ hg rm mer<TAB>
mercurial/./  mercurial//

This was added in bc559aff745c (though, some logic existed before that) to work
around bash completion adding a space after the sole entry because we treated
directories and files the same. We no longer do that now so we remove this
unneeded code.

Tests have been updated to match this new behavior.
2013-11-25 12:12:42 -05:00
Matt Mackall
fe7062dd37 tests: update for commit --secret 2013-07-18 16:29:05 -05:00
Mads Kiilerich
b81e3cdb96 debugrebuildstate: rename to debugrebuilddirstate
There is a lot of state, but this command is for rebuilding the dirstate.
2013-04-15 01:41:47 +02:00
Mads Kiilerich
a855980324 debugstate: rename to debugdirstate
There is a lot of state, but this command is for debugging the dirstate.
2013-04-15 01:41:27 +02:00
Bryan O'Sullivan
738dd167db debuglabelcomplete: compute active branch heads correctly
The previous computation was simply wrong.
2013-04-09 09:40:40 -07:00
Bryan O'Sullivan
7b1c9969ac test-completion: test completion of tags 2013-03-21 22:42:51 -07:00
Bryan O'Sullivan
2d86040062 tests: test debugpathcomplete and debuglabelcomplete 2013-03-21 22:26:01 -07:00
Bryan O'Sullivan
5d282d6339 tests: rename test-debugcomplete.t to test-completion.t 2013-03-21 22:22:21 -07:00