2129
2129
if location is None:
2130
2130
location = u'.'
2131
b, relpath = Branch.open_containing(location)
2131
control, relpath = bzrdir.BzrDir.open_containing(location)
2132
b = control.open_branch()
2134
tree = control.open_workingtree()
2135
except (errors.NoWorkingTree, errors.NotLocalUrl):
2133
2138
if revision is None:
2134
2139
revno = b.revno()
2155
2160
print 'Canceled'
2158
uncommit(b, dry_run=dry_run, verbose=verbose,
2163
uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,