1527 fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root, |
1527 fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root, |
1528 files=files) |
1528 files=files) |
1529 finally: |
1529 finally: |
1530 files = patch.updatedir(ui, repo, files) |
1530 files = patch.updatedir(ui, repo, files) |
1531 if not opts.get('no_commit'): |
1531 if not opts.get('no_commit'): |
1532 n = repo.commit(files, message, user, date) |
1532 n = repo.commit(files, message, opts.get('user') or user, |
|
1533 opts.get('date') or date) |
1533 if opts.get('exact'): |
1534 if opts.get('exact'): |
1534 if hex(n) != nodeid: |
1535 if hex(n) != nodeid: |
1535 repo.rollback() |
1536 repo.rollback() |
1536 raise util.Abort(_('patch is damaged' |
1537 raise util.Abort(_('patch is damaged' |
1537 ' or loses information')) |
1538 ' or loses information')) |
2899 _('skip check for outstanding uncommitted changes')), |
2900 _('skip check for outstanding uncommitted changes')), |
2900 ('', 'no-commit', None, _("don't commit, just update the working directory")), |
2901 ('', 'no-commit', None, _("don't commit, just update the working directory")), |
2901 ('', 'exact', None, |
2902 ('', 'exact', None, |
2902 _('apply patch to the nodes from which it was generated')), |
2903 _('apply patch to the nodes from which it was generated')), |
2903 ('', 'import-branch', None, |
2904 ('', 'import-branch', None, |
2904 _('Use any branch information in patch (implied by --exact)'))] + commitopts, |
2905 _('Use any branch information in patch (implied by --exact)'))] + |
2905 _('hg import [-p NUM] [-m MESSAGE] [-f] PATCH...')), |
2906 commitopts + commitopts2, |
|
2907 _('hg import [OPTION]... PATCH...')), |
2906 "incoming|in": |
2908 "incoming|in": |
2907 (incoming, |
2909 (incoming, |
2908 [('M', 'no-merges', None, _('do not show merges')), |
2910 [('M', 'no-merges', None, _('do not show merges')), |
2909 ('f', 'force', None, |
2911 ('f', 'force', None, |
2910 _('run even when remote repository is unrelated')), |
2912 _('run even when remote repository is unrelated')), |