Changeset 3da9cd70deb4…
Parent 3d43a37b08d3…
by
Changes to one file · Browse files at 3da9cd70deb4 Showing diff from parent 3d43a37b08d3 Diff from another changeset...
@@ -141,7 +141,7 @@ self.rev_combo.setMaxVisibleItems(self.rev_combo.count())
self.rev_combo.setCurrentIndex(0)
self.subrepos_chk.setChecked(self.get_subrepos_present())
- self.dest_edit.setText(self.repo.root)
+ self.dest_edit.setText(hglib.tounicode(self.repo.root))
self.filesradio.setChecked(True)
self.update_path()
@@ -185,7 +185,7 @@
def browse_clicked(self):
"""Select the destination directory or file"""
- dest = hglib.fromunicode(self.dest_edit.text())
+ dest = unicode(self.dest_edit.text())
if not os.path.exists(dest):
dest = os.path.dirname(dest)
select = self.get_selected_archive_type()
@@ -249,7 +249,7 @@ def remove_rev(path):
l = ''
for i in xrange(self.rev_combo.count() - 1):
- l += hglib.fromunicode(self.rev_combo.itemText(i))
+ l += unicode(self.rev_combo.itemText(i))
revs = [rev[0] for rev in l]
revs.append(wdrev)
if not self.prevtarget is None:
@@ -265,7 +265,7 @@ if select['type'] != 'files':
path += select['ext']
return path
- text = self.rev_combo.currentText()
+ text = unicode(self.rev_combo.currentText())
if len(text) == 0:
return
wdrev = str(self.repo['.'].rev())
@@ -276,15 +276,15 @@ self.repo[hglib.fromunicode(text)]
except (error.RepoError, error.LookupError):
return
- path = hglib.fromunicode(self.dest_edit.text())
+ path = unicode(self.dest_edit.text())
path = remove_ext(path)
path = remove_rev(path)
- path = add_rev(path, hglib.fromunicode(text))
+ path = add_rev(path, text)
path = add_ext(path)
self.dest_edit.setText(path)
self.prevtarget = text
type = self.get_selected_archive_type()['type']
- self.compose_command(path, type)
+ self.compose_command(hglib.fromunicode(path), type)
def compose_command(self, dest, type):
cmdline = ['archive', '--repository', self.repo.root]
@@ -301,14 +301,14 @@ cmdline.append('-I')
cmdline.append(f)
cmdline.append('--')
- cmdline.append(hglib.fromunicode(dest))
- self.hgcmd_txt.setText('hg ' + ' '.join(cmdline))
+ cmdline.append(dest) # dest: local str
+ self.hgcmd_txt.setText(hglib.tounicode('hg ' + ' '.join(cmdline)))
return cmdline
def archive(self):
# verify input
type = self.get_selected_archive_type()['type']
- dest = self.dest_edit.text()
+ dest = unicode(self.dest_edit.text())
if os.path.exists(dest):
if type == 'files':
if os.path.isfile(dest):
@@ -336,7 +336,7 @@ return False
# prepare command line
- cmdline = self.compose_command(dest, type)
+ cmdline = self.compose_command(hglib.fromunicode(dest), type)
if self.files_in_rev_chk.isChecked():
self.savedcwd = os.getcwd()
|
Loading...