[Pkg-bazaar-commits] ./bzr/unstable r394: - Fix argument handling in export command
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 07:52:10 UTC 2009
------------------------------------------------------------
revno: 394
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Sun 2005-05-08 13:33:57 +1000
message:
- Fix argument handling in export command
- Add test
Thanks to Aaron and Wilk
modified:
TODO
bzrlib/commands.py
testbzr
-------------- next part --------------
=== modified file 'TODO'
--- a/TODO 2005-05-08 00:21:49 +0000
+++ b/TODO 2005-05-08 03:33:57 +0000
@@ -89,6 +89,11 @@
http://www.gelato.unsw.edu.au/archives/git/0504/2194.html
+* testbzr should by default test the bzr binary in the same directory
+ as the testbzr script, or take a path to it as a first parameter.
+
+ Should show the version from bzr and the path name.
+
Medium things
-------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-05-06 03:45:17 +0000
+++ b/bzrlib/commands.py 2005-05-08 03:33:57 +0000
@@ -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)
=== modified file 'testbzr'
--- a/testbzr 2005-05-06 03:45:17 +0000
+++ b/testbzr 2005-05-08 03:33:57 +0000
@@ -244,6 +244,10 @@
f.close()
runcmd('bzr commit -F msg.tmp')
+
+ assert backtick('bzr revno') == '5\n'
+ runcmd('bzr export -r 5 export-5.tmp')
+ runcmd('bzr export export.tmp')
cd('..')
More information about the Pkg-bazaar-commits
mailing list