/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-27 19:11:59 UTC
  • mfrom: (0.8.90 merge)
  • mto: (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 103.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060927191159-cc4e54f613575779
Merge all changes. Release 0.11.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
except:
29
29
    sys.exit(1)
30
30
 
31
 
import olive.backend.errors as errors
32
 
import olive.backend.fileops as fileops
 
31
import bzrlib.errors as errors
33
32
 
34
33
class OliveMove:
35
34
    """ Display the Move dialog and perform the needed actions. """
74
73
        
75
74
        # Move the file to a directory
76
75
        try:
77
 
            fileops.move([source, destination])
 
76
            wt1, path1 = WorkingTree.open_containing(source)
 
77
            wt2, path2 = WorkingTree.open_containing(destination)
 
78
            if wt1.base != wt2.base:
 
79
                self.dialog.error_dialog(_('Not the same branch'),
 
80
                                         _('The destination is not in the same branch.'))
 
81
                return
 
82
 
 
83
            wt1.move([source], destination)
78
84
        except errors.NotBranchError:
79
85
            self.dialog.error_dialog(_('File is not in a branch'),
80
86
                                     _('The selected file is not in a branch.'))
81
87
            return
82
 
        except errors.NotSameBranchError:
83
 
            self.dialog.error_dialog(_('Not the same branch'),
84
 
                                     _('The destination is not in the same branch.'))
85
 
            return
86
 
        except:
87
 
            raise
88
88
 
89
89
        self.close()
90
90
        self.comm.refresh_right()