/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/rename.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-30 13:04:15 UTC
  • mto: (0.14.3 main)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060930130415-aba4100709e11f0a
Loads of fixes. Pyflakes cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
                         _('Please specify a new name for the file.'))
72
72
            return
73
73
        
74
 
        if self.wtpath == "":
75
 
            source = self.wt.abspath(old_filename)
76
 
            destination = self.wt.abspath(new_filename)
77
 
        else:
78
 
            source = self.wt.abspath(self.wtpath + os.sep + old_filename)
79
 
            destination = self.wt.abspath(self.wtpath + os.sep + new_filename)
 
74
        source = os.path.join(self.wtpath, old_filename)
 
75
        destination = os.path.join(self.wtpath, new_filename)
80
76
        
81
77
        # Rename the file
82
78
        try:
83
 
            wt1, path1 = WorkingTree.open_containing(source)
84
 
            wt2, path2 = WorkingTree.open_containing(source)
 
79
            wt1, path1 = WorkingTree.open_containing(self.wt.abspath(source))
 
80
            wt2, path2 = WorkingTree.open_containing(self.wt.abspath(source))
85
81
 
86
 
            if wt1.base != wt2.base:
 
82
            if wt1.basedir != wt2.basedir:
87
83
                error_dialog(_('Not the same branch'),
88
84
                             _('The destination is not in the same branch.'))
89
85
                return
92
88
            error_dialog(_('File is not in a branch'),
93
89
                         _('The selected file is not in a branch.'))
94
90
            return
 
91
        except errors.BzrError, msg:
 
92
            error_dialog(_('Unknown bzr error'), str(msg))
95
93
 
96
94
        self.close()
97
95