def __init__(self, path, revision=None): InterfaceView.__init__(self, "branch", "Branch") self.vcs = rabbitvcs.vcs.VCS() self.svn = self.vcs.svn() self.path = path self.revision = revision status = self.vcs.status(self.path) repo_paths = rabbitvcs.util.helper.get_repository_paths() self.from_urls = rabbitvcs.ui.widget.ComboBox( self.get_widget("from_urls"), repo_paths) self.to_urls = rabbitvcs.ui.widget.ComboBox( self.get_widget("to_urls"), rabbitvcs.util.helper.get_repository_paths()) repository_url = self.svn.get_repo_url(path) self.from_urls.set_child_text(repository_url) self.to_urls.set_child_text(repository_url) self.message = rabbitvcs.ui.widget.TextView(self.get_widget("message")) self.revision_selector = rabbitvcs.ui.widget.RevisionSelector( self.get_widget("revision_container"), self.svn, revision=revision, url_combobox=self.from_urls, expand=True) if (self.revision is None and status.has_modified()): self.revision_selector.set_kind_working()
def __init__(self, path, revision=None): InterfaceView.__init__(self, "branch", "Branch") self.vcs = rabbitvcs.vcs.VCS() self.svn = self.vcs.svn() self.path = path self.revision = revision status = self.vcs.status(self.path) repo_paths = rabbitvcs.util.helper.get_repository_paths() self.from_urls = rabbitvcs.ui.widget.ComboBox( self.get_widget("from_urls"), repo_paths ) self.to_urls = rabbitvcs.ui.widget.ComboBox( self.get_widget("to_urls"), rabbitvcs.util.helper.get_repository_paths() ) repository_url = self.svn.get_repo_url(path) self.from_urls.set_child_text(repository_url) self.to_urls.set_child_text(repository_url) self.message = rabbitvcs.ui.widget.TextView( self.get_widget("message") ) self.revision_selector = rabbitvcs.ui.widget.RevisionSelector( self.get_widget("revision_container"), self.svn, revision=revision, url_combobox=self.from_urls, expand=True ) if (self.revision is None and status.has_modified()): self.revision_selector.set_kind_working()