bugfix: single-argument export was borked
Wilk
wilk-ml at flibuste.net
Sat May 7 15:15:49 BST 2005
Aaron Bentley <aaron.bentley at utoronto.ca> writes:
> Hi Martin,
> Here's a fix for a bug I found in single-arg export.
>
> Aaron
>
> abentley at lappy:~/bzr.dev2$ bzr diff
> *** modified file 'bzrlib/commands.py'
> --- bzrlib/commands.py
> +++ bzrlib/commands.py
> @@ -541,7 +541,7 @@
> def run(self, dest, revno=None):
> b = Branch('.')
> if revno == None:
> - rh = b.revision_history[-1]
> + rh = b.revision_history()[-1]
> else:
> rh = b.lookup_revision(int(revno))
> t = b.revision_tree(rh)
It's ``revision`` instead of ``revno`` isn'it ? (from last rsync 16h40 +0200)
--- bzrlib/commands.py
+++ bzrlib/commands.py
@@ -538,12 +538,12 @@
If no revision is specified this exports the last committed revision."""
takes_args = ['dest']
takes_options = ['revision']
- def run(self, dest, revno=None):
+ def run(self, dest, revision=None):
b = Branch('.')
- if revno == None:
- rh = b.revision_history[-1]
+ if revision == None:
+ rh = b.revision_history()[-1]
else:
- rh = b.lookup_revision(int(revno))
+ rh = b.lookup_revision(int(revision))
t = b.revision_tree(rh)
t.export(dest)
--
William - http://flibuste.net
More information about the bazaar
mailing list