Doug's changes are back
svn: r9542
This commit is contained in:
parent
6af58e348b
commit
a7da42bdc3
@ -33,6 +33,7 @@ __revision__ = "$Revision: 8197 $"
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
import copy
|
||||||
import subprocess
|
import subprocess
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -293,6 +294,7 @@ class DbManager:
|
|||||||
path_name = os.path.join(dirpath, NAME_FILE)
|
path_name = os.path.join(dirpath, NAME_FILE)
|
||||||
if os.path.isfile(path_name):
|
if os.path.isfile(path_name):
|
||||||
name = file(path_name).readline().strip()
|
name = file(path_name).readline().strip()
|
||||||
|
|
||||||
(tval, last) = time_val(dirpath)
|
(tval, last) = time_val(dirpath)
|
||||||
(enable, stock_id) = icon_values(dirpath, self.active,
|
(enable, stock_id) = icon_values(dirpath, self.active,
|
||||||
self.dbstate.db.is_open())
|
self.dbstate.db.is_open())
|
||||||
@ -501,7 +503,7 @@ class DbManager:
|
|||||||
rev = self.data_to_delete[0]
|
rev = self.data_to_delete[0]
|
||||||
parent = store[(path[0],)][0]
|
parent = store[(path[0],)][0]
|
||||||
QuestionDialog.QuestionDialog(
|
QuestionDialog.QuestionDialog(
|
||||||
_("Remove the '%{revision}s' version of %{database}s") % {
|
_("Remove the '%(revision)s' version of '%(database)s'") % {
|
||||||
'revision' : rev,
|
'revision' : rev,
|
||||||
'database' : parent
|
'database' : parent
|
||||||
},
|
},
|
||||||
@ -551,7 +553,7 @@ class DbManager:
|
|||||||
rev = self.data_to_delete[PATH_COL]
|
rev = self.data_to_delete[PATH_COL]
|
||||||
archive = os.path.join(db_dir, ARCHIVE_V)
|
archive = os.path.join(db_dir, ARCHIVE_V)
|
||||||
|
|
||||||
cmd = [ "rcs", "-o%s" % rev, archive ]
|
cmd = [ "rcs", "-o%s" % rev, "-q", archive ]
|
||||||
|
|
||||||
proc = subprocess.Popen(cmd, stderr = subprocess.PIPE)
|
proc = subprocess.Popen(cmd, stderr = subprocess.PIPE)
|
||||||
status = proc.wait()
|
status = proc.wait()
|
||||||
@ -653,9 +655,11 @@ class DbManager:
|
|||||||
if title == None:
|
if title == None:
|
||||||
name_list = [ name[0] for name in self.current_names ]
|
name_list = [ name[0] for name in self.current_names ]
|
||||||
title = find_next_db_name(name_list)
|
title = find_next_db_name(name_list)
|
||||||
|
|
||||||
name_file = open(path_name, "w")
|
name_file = open(path_name, "w")
|
||||||
name_file.write(title)
|
name_file.write(title)
|
||||||
name_file.close()
|
name_file.close()
|
||||||
|
|
||||||
self.current_names.append(title)
|
self.current_names.append(title)
|
||||||
node = self.model.append(None, [title, new_path, path_name,
|
node = self.model.append(None, [title, new_path, path_name,
|
||||||
_("Never"), 0, False, ''])
|
_("Never"), 0, False, ''])
|
||||||
@ -816,7 +820,7 @@ def find_revisions(name):
|
|||||||
for line in proc.stdout:
|
for line in proc.stdout:
|
||||||
match = rev.match(line)
|
match = rev.match(line)
|
||||||
if match:
|
if match:
|
||||||
rev_str = match.groups()[0]
|
rev_str = copy.copy(match.groups()[0])
|
||||||
continue
|
continue
|
||||||
match = date.match(line)
|
match = date.match(line)
|
||||||
if match:
|
if match:
|
||||||
@ -829,6 +833,8 @@ def find_revisions(name):
|
|||||||
get_next = False
|
get_next = False
|
||||||
com_str = line.strip()
|
com_str = line.strip()
|
||||||
revlist.append((rev_str, date_str, com_str))
|
revlist.append((rev_str, date_str, com_str))
|
||||||
|
proc.stdout.close()
|
||||||
|
del proc
|
||||||
return revlist
|
return revlist
|
||||||
|
|
||||||
def find_locker_name(dirpath):
|
def find_locker_name(dirpath):
|
||||||
@ -909,8 +915,8 @@ def check_in(dbase, filename, callback, cursor_func = None):
|
|||||||
|
|
||||||
proc = subprocess.Popen(cmd, stderr = subprocess.PIPE )
|
proc = subprocess.Popen(cmd, stderr = subprocess.PIPE )
|
||||||
message = "\n".join(proc.stderr.readlines())
|
message = "\n".join(proc.stderr.readlines())
|
||||||
proc.stderr.close()
|
|
||||||
status = proc.wait()
|
status = proc.wait()
|
||||||
|
proc.stderr.close()
|
||||||
del proc
|
del proc
|
||||||
|
|
||||||
if status != 0:
|
if status != 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user