[Pkg-bazaar-commits] ./bzr/unstable r338: - cleanup of some imports
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 07:43:47 UTC 2009
------------------------------------------------------------
revno: 338
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Tue 2005-05-03 18:17:43 +1000
message:
- cleanup of some imports
modified:
bzrlib/commands.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-05-03 08:13:15 +0000
+++ b/bzrlib/commands.py 2005-05-03 08:17:43 +0000
@@ -64,14 +64,10 @@
-import sys, os, time, types, shutil, tempfile, fnmatch, difflib, os.path
+import sys, os, time, os.path
from sets import Set
-from pprint import pprint
-from stat import *
-from glob import glob
import bzrlib
-from bzrlib.store import ImmutableStore
from bzrlib.trace import mutter, note, log_error
from bzrlib.errors import bailout, BzrError, BzrCheckError, BzrCommandError
from bzrlib.osutils import quotefn, pumpfile, isdir, isfile
@@ -80,13 +76,6 @@
from bzrlib import Branch, Inventory, InventoryEntry, ScratchBranch, BZRDIR, \
format_date
-BZR_DIFF_FORMAT = "## Bazaar-NG diff, format 0 ##\n"
-BZR_PATCHNAME_FORMAT = 'cset:sha1:%s'
-
-## standard representation
-NONE_STRING = '(none)'
-EMPTY = 'empty'
-
CMD_ALIASES = {
'?': 'help',
@@ -547,14 +536,15 @@
bzr lookup-revision 33
"""
hidden = True
+ takes_args = ['revno']
+
def run(self, revno):
try:
revno = int(revno)
except ValueError:
- raise BzrError("not a valid revision-number: %r" % revno)
-
- print Branch('.').lookup_revision(revno) or NONE_STRING
-
+ raise BzrCommandError("not a valid revision-number: %r" % revno)
+
+ print Branch('.').lookup_revision(revno)
class cmd_export(Command):
@@ -965,7 +955,7 @@
cmdopts[k.replace('-', '_')] = v
if profile:
- import hotshot
+ import hotshot, tempfile
pffileno, pfname = tempfile.mkstemp()
try:
prof = hotshot.Profile(pfname)
More information about the Pkg-bazaar-commits
mailing list