78
79
destination = os.path.join(self.wtpath, new_filename)
82
wt1, path1 = WorkingTree.open_containing(self.wt.abspath(source))
83
wt2, path2 = WorkingTree.open_containing(self.wt.abspath(source))
82
wt1, path1 = WorkingTree.open_containing(self.wt.abspath(source))
83
wt2, path2 = WorkingTree.open_containing(self.wt.abspath(source))
85
if wt1.basedir != wt2.basedir:
86
error_dialog(_('Not the same branch'),
87
_('The destination is not in the same branch.'))
89
wt1.rename_one(source, destination)
90
except errors.NotBranchError:
91
error_dialog(_('File is not in a branch'),
92
_('The selected file is not in a branch.'))
85
if wt1.basedir != wt2.basedir:
86
error_dialog(_('Not the same branch'),
87
_('The destination is not in the same branch.'))
94
except errors.BzrError, msg:
95
error_dialog(_('Unknown bzr error'), str(msg))
89
wt1.rename_one(source, destination)
99
92
def close(self, widget=None):