/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Gary van der Merwe
  • Date: 2008-09-17 20:53:15 UTC
  • mto: (0.152.55 trunk)
  • mto: This revision was merged to the branch mainline in revision 6649.
  • Revision ID: garyvdm@gmail.com-20080917205315-bczswh81tmeentz7
 Don't require a working tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
import stat
50
50
 
51
51
from bzrlib import (
 
52
    bzrdir,
52
53
    errors,
53
54
    revisionspec,
54
55
    transport,
352
353
            ):
353
354
        if directory is None:
354
355
            directory = u'.'
355
 
 
356
 
        wt = workingtree.WorkingTree.open_containing(directory)[0]
357
 
        changes = wt.changes_from(wt.basis_tree())
358
 
 
359
 
        if revision is None and  changes.has_changed():
360
 
            raise errors.UncommittedChanges(wt)
361
 
 
362
 
        branch = wt.branch
 
356
        
 
357
        wt, branch, relpath = \
 
358
            bzrdir.BzrDir.open_containing_tree_or_branch(directory)
 
359
        
 
360
        if wt:
 
361
            changes = wt.changes_from(wt.basis_tree())
 
362
    
 
363
            if revision is None and  changes.has_changed():
 
364
                raise errors.UncommittedChanges(wt)
363
365
 
364
366
        if location is None:
365
367
            stored_loc = get_upload_location(branch)