Show More
@@ -142,7 +142,10 b' def archive(ui, repo, dest, **opts):' | |||||
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 |
|
|
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')) |
@@ -63,3 +63,9 b' hg archive -t zip -r 2 test.zip' | |||||
63 | unzip -t test.zip |
|
63 | unzip -t test.zip | |
64 |
|
64 | |||
65 | hg archive -t tar - | tar tf - | sed "s/$QTIP/TIP/" |
|
65 | hg archive -t tar - | tar tf - | sed "s/$QTIP/TIP/" | |
|
66 | ||||
|
67 | echo '% empty repo' | |||
|
68 | hg init ../empty | |||
|
69 | cd ../empty | |||
|
70 | hg archive ../test-empty | |||
|
71 | exit 0 No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now