equal
deleted
inserted
replaced
140 Each member added to an archive file has a directory prefix |
140 Each member added to an archive file has a directory prefix |
141 prepended. Use "-p" to specify a format string for the prefix. |
141 prepended. Use "-p" to specify a format string for the prefix. |
142 The default is the basename of the archive, with suffixes removed. |
142 The default is the basename of the archive, with suffixes removed. |
143 ''' |
143 ''' |
144 |
144 |
145 node = repo.changectx(opts['rev']).node() |
145 ctx = repo.changectx(opts['rev']) |
|
146 if not ctx: |
|
147 raise util.Abort(_('repository has no revisions')) |
|
148 node = ctx.node() |
146 dest = cmdutil.make_filename(repo, dest, node) |
149 dest = cmdutil.make_filename(repo, dest, node) |
147 if os.path.realpath(dest) == repo.root: |
150 if os.path.realpath(dest) == repo.root: |
148 raise util.Abort(_('repository root cannot be destination')) |
151 raise util.Abort(_('repository root cannot be destination')) |
149 dummy, matchfn, dummy = cmdutil.matchpats(repo, [], opts) |
152 dummy, matchfn, dummy = cmdutil.matchpats(repo, [], opts) |
150 kind = opts.get('type') or 'files' |
153 kind = opts.get('type') or 'files' |