Show More
@@ -1529,7 +1529,8 b' def import_(ui, repo, patch1, *patches, ' | |||
|
1529 | 1529 | finally: |
|
1530 | 1530 | files = patch.updatedir(ui, repo, files) |
|
1531 | 1531 | if not opts.get('no_commit'): |
|
1532 |
n = repo.commit(files, message, user, |
|
|
1532 | n = repo.commit(files, message, opts.get('user') or user, | |
|
1533 | opts.get('date') or date) | |
|
1533 | 1534 | if opts.get('exact'): |
|
1534 | 1535 | if hex(n) != nodeid: |
|
1535 | 1536 | repo.rollback() |
@@ -2901,8 +2902,9 b' table = {' | |||
|
2901 | 2902 | ('', 'exact', None, |
|
2902 | 2903 | _('apply patch to the nodes from which it was generated')), |
|
2903 | 2904 | ('', 'import-branch', None, |
|
2904 |
_('Use any branch information in patch (implied by --exact)'))] + |
|
|
2905 | _('hg import [-p NUM] [-m MESSAGE] [-f] PATCH...')), | |
|
2905 | _('Use any branch information in patch (implied by --exact)'))] + | |
|
2906 | commitopts + commitopts2, | |
|
2907 | _('hg import [OPTION]... PATCH...')), | |
|
2906 | 2908 | "incoming|in": |
|
2907 | 2909 | (incoming, |
|
2908 | 2910 | [('M', 'no-merges', None, _('do not show merges')), |
@@ -32,6 +32,13 b' hg --cwd a diff -r0:1 > tip.patch' | |||
|
32 | 32 | hg --cwd b import -mpatch ../tip.patch |
|
33 | 33 | rm -r b |
|
34 | 34 | |
|
35 | echo % import of plain diff with specific date and user | |
|
36 | hg clone -r0 a b | |
|
37 | hg --cwd a diff -r0:1 > tip.patch | |
|
38 | hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../tip.patch | |
|
39 | hg -R b tip -pv | |
|
40 | rm -r b | |
|
41 | ||
|
35 | 42 | echo % import of plain diff should be ok with --no-commit |
|
36 | 43 | hg clone -r0 a b |
|
37 | 44 | hg --cwd a diff -r0:1 > tip.patch |
@@ -31,6 +31,30 b' adding file changes' | |||
|
31 | 31 | added 1 changesets with 2 changes to 2 files |
|
32 | 32 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 33 | applying ../tip.patch |
|
34 | % import of plain diff with specific date and user | |
|
35 | requesting all changes | |
|
36 | adding changesets | |
|
37 | adding manifests | |
|
38 | adding file changes | |
|
39 | added 1 changesets with 2 changes to 2 files | |
|
40 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
41 | applying ../tip.patch | |
|
42 | changeset: 1:ca68f19f3a40 | |
|
43 | tag: tip | |
|
44 | user: user@nowhere.net | |
|
45 | date: Thu Jan 01 00:00:01 1970 +0000 | |
|
46 | files: a | |
|
47 | description: | |
|
48 | patch | |
|
49 | ||
|
50 | ||
|
51 | diff -r 80971e65b431 -r ca68f19f3a40 a | |
|
52 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
|
53 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
|
54 | @@ -1,1 +1,2 @@ | |
|
55 | line 1 | |
|
56 | +line 2 | |
|
57 | ||
|
34 | 58 | % import of plain diff should be ok with --no-commit |
|
35 | 59 | requesting all changes |
|
36 | 60 | adding changesets |
General Comments 0
You need to be logged in to leave comments.
Login now