##// END OF EJS Templates
export: export working directory parent by default...
Mads Kiilerich -
r18956:1a9ad845 default
parent child Browse files
Show More
@@ -2709,11 +2709,12 b' def diff(ui, repo, *pats, **opts):'
2709 ('', 'switch-parent', None, _('diff against the second parent')),
2709 ('', 'switch-parent', None, _('diff against the second parent')),
2710 ('r', 'rev', [], _('revisions to export'), _('REV')),
2710 ('r', 'rev', [], _('revisions to export'), _('REV')),
2711 ] + diffopts,
2711 ] + diffopts,
2712 _('[OPTION]... [-o OUTFILESPEC] [-r] REV...'))
2712 _('[OPTION]... [-o OUTFILESPEC] [-r] [REV]...'))
2713 def export(ui, repo, *changesets, **opts):
2713 def export(ui, repo, *changesets, **opts):
2714 """dump the header and diffs for one or more changesets
2714 """dump the header and diffs for one or more changesets
2715
2715
2716 Print the changeset header and diffs for one or more revisions.
2716 Print the changeset header and diffs for one or more revisions.
2717 If no revision is given, the parent of the working directory is used.
2717
2718
2718 The information shown in the changeset header is: author, date,
2719 The information shown in the changeset header is: author, date,
2719 branch name (if non-default), changeset hash, parent(s) and commit
2720 branch name (if non-default), changeset hash, parent(s) and commit
@@ -2769,6 +2770,8 b' def export(ui, repo, *changesets, **opts'
2769 Returns 0 on success.
2770 Returns 0 on success.
2770 """
2771 """
2771 changesets += tuple(opts.get('rev', []))
2772 changesets += tuple(opts.get('rev', []))
2773 if not changesets:
2774 changesets = ['.']
2772 revs = scmutil.revrange(repo, changesets)
2775 revs = scmutil.revrange(repo, changesets)
2773 if not revs:
2776 if not revs:
2774 raise util.Abort(_("export requires at least one changeset"))
2777 raise util.Abort(_("export requires at least one changeset"))
@@ -148,8 +148,23 b' Checking if only alphanumeric characters'
148 Catch exporting unknown revisions (especially empty revsets, see issue3353)
148 Catch exporting unknown revisions (especially empty revsets, see issue3353)
149
149
150 $ hg export
150 $ hg export
151 abort: export requires at least one changeset
151 # HG changeset patch
152 [255]
152 # User test
153 # Date 0 0
154 # Thu Jan 01 00:00:00 1970 +0000
155 # Node ID 197ecd81a57f760b54f34a58817ad5b04991fa47
156 # Parent f3acbafac161ec68f1598af38f794f28847ca5d3
157 !"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
158
159 diff -r f3acbafac161 -r 197ecd81a57f foo
160 --- a/foo Thu Jan 01 00:00:00 1970 +0000
161 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
162 @@ -10,3 +10,4 @@
163 foo-9
164 foo-10
165 foo-11
166 +line
167
153 $ hg export ""
168 $ hg export ""
154 hg: parse error: empty query
169 hg: parse error: empty query
155 [255]
170 [255]
General Comments 0
You need to be logged in to leave comments. Login now