Show More
@@ -1771,6 +1771,8 b' def tryimportone(ui, repo, patchdata, pa' | |||
|
1771 | 1771 | overrides = {} |
|
1772 | 1772 | if partial: |
|
1773 | 1773 | overrides[(b'ui', b'allowemptycommit')] = True |
|
1774 | if opts.get(b'secret'): | |
|
1775 | overrides[(b'phases', b'new-commit')] = b'secret' | |
|
1774 | 1776 | with repo.ui.configoverride(overrides, b'import'): |
|
1775 | 1777 | n = repo.commit( |
|
1776 | 1778 | message, user, date, match=m, editor=editor, extra=extra |
@@ -4033,6 +4033,7 b' def identify(' | |||
|
4033 | 4033 | _(b'NUM'), |
|
4034 | 4034 | ), |
|
4035 | 4035 | (b'b', b'base', b'', _(b'base path (DEPRECATED)'), _(b'PATH')), |
|
4036 | (b'', b'secret', None, _(b'use the secret phase for committing')), | |
|
4036 | 4037 | (b'e', b'edit', False, _(b'invoke editor on commit messages')), |
|
4037 | 4038 | ( |
|
4038 | 4039 | b'f', |
@@ -4181,6 +4182,8 b' def import_(ui, repo, patch1=None, *patc' | |||
|
4181 | 4182 | update = not opts.get(b'bypass') |
|
4182 | 4183 | if not update and opts.get(b'no_commit'): |
|
4183 | 4184 | raise error.Abort(_(b'cannot use --no-commit with --bypass')) |
|
4185 | if opts.get(b'secret') and opts.get(b'no_commit'): | |
|
4186 | raise error.Abort(_(b'cannot use --no-commit with --secret')) | |
|
4184 | 4187 | try: |
|
4185 | 4188 | sim = float(opts.get(b'similarity') or 0) |
|
4186 | 4189 | except ValueError: |
@@ -328,7 +328,7 b' Show all commands + options' | |||
|
328 | 328 | heads: rev, topo, active, closed, style, template |
|
329 | 329 | help: extension, command, keyword, system |
|
330 | 330 | identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure, template |
|
331 | import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity | |
|
331 | import: strip, base, secret, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity | |
|
332 | 332 | incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos |
|
333 | 333 | init: ssh, remotecmd, insecure |
|
334 | 334 | locate: rev, print0, fullpath, include, exclude |
@@ -435,6 +435,49 b' hg email --plain, should read X-Mercuria' | |||
|
435 | 435 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
436 | 436 | summary: second change |
|
437 | 437 | |
|
438 | $ hg --cwd b phase tip | |
|
439 | 1: draft | |
|
440 | $ rm -r b | |
|
441 | ||
|
442 | ||
|
443 | hg import --secret | |
|
444 | ||
|
445 | $ hg clone -r0 a b -q | |
|
446 | $ hg --cwd b import --no-commit --secret ../exported-tip.patch | |
|
447 | abort: cannot use --no-commit with --secret | |
|
448 | [255] | |
|
449 | $ hg --cwd b import --secret ../exported-tip.patch | |
|
450 | applying ../exported-tip.patch | |
|
451 | $ hg --cwd b diff -c . --nodates | |
|
452 | diff -r 80971e65b431 -r 1d4bd90af0e4 a | |
|
453 | --- a/a | |
|
454 | +++ b/a | |
|
455 | @@ -1,1 +1,2 @@ | |
|
456 | line 1 | |
|
457 | +line 2 | |
|
458 | $ hg --cwd b phase | |
|
459 | 1: secret | |
|
460 | $ hg --cwd b --config extensions.strip= strip 1 --no-backup --quiet | |
|
461 | $ HGEDITOR=cat hg --cwd b import --secret --edit ../exported-tip.patch | |
|
462 | applying ../exported-tip.patch | |
|
463 | second change | |
|
464 | ||
|
465 | ||
|
466 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
|
467 | HG: Leave message empty to abort commit. | |
|
468 | HG: -- | |
|
469 | HG: user: someone | |
|
470 | HG: branch 'default' | |
|
471 | HG: changed a | |
|
472 | $ hg --cwd b diff -c . --nodates | |
|
473 | diff -r 80971e65b431 -r 1d4bd90af0e4 a | |
|
474 | --- a/a | |
|
475 | +++ b/a | |
|
476 | @@ -1,1 +1,2 @@ | |
|
477 | line 1 | |
|
478 | +line 2 | |
|
479 | $ hg --cwd b phase | |
|
480 | 1: secret | |
|
438 | 481 | $ rm -r b |
|
439 | 482 | |
|
440 | 483 |
General Comments 0
You need to be logged in to leave comments.
Login now