/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/move.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:
77
77
                         _('Please select a file from the list to proceed.'))
78
78
            return
79
79
        
80
 
        if self.wtpath == "":
81
 
            source = self.wt.abspath(filename)
82
 
        else:
83
 
            source = self.wt.abspath(self.wtpath + os.sep + filename)
 
80
        source = os.path.join(self.wtpath, filename)
84
81
        
85
82
        # Move the file to a directory
86
83
        try:
87
 
            wt1, path1 = WorkingTree.open_containing(source)
 
84
            wt1, path1 = WorkingTree.open_containing(self.wt.abspath(source))
88
85
            wt2, path2 = WorkingTree.open_containing(destination)
89
 
            if wt1.base != wt2.base:
 
86
            if wt1.basedir != wt2.basedir:
90
87
                error_dialog(_('Not the same branch'),
91
88
                             _('The destination is not in the same branch.'))
92
89
                return
93
90
 
94
 
            wt1.move([source], destination)
 
91
            wt1.move([source], wt1.relpath(destination))
95
92
        except errors.NotBranchError:
96
93
            error_dialog(_('File is not in a branch'),
97
94
                         _('The selected file is not in a branch.'))