2007-04-05 Don Allingham <don@gramps-project.org>
* src/plugins/Checkpoint.py: fix some more Popen issues svn: r8359
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2007-04-05 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/plugins/Checkpoint.py: fix some more Popen issues
|
||||||
|
|
||||||
2007-04-05 Brian Matherly <brian@gramps-project.org>
|
2007-04-05 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/plugins/NarrativeWeb.py: 0000998: Source Ref link refers to nothing in
|
* src/plugins/NarrativeWeb.py: 0000998: Source Ref link refers to nothing in
|
||||||
Narrative web report.
|
Narrative web report.
|
||||||
|
@@ -145,9 +145,10 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
# Display controls according to the state
|
# Display controls according to the state
|
||||||
if self.options.handler.options_dict['rcs']:
|
if self.options.handler.options_dict['rcs']:
|
||||||
self.rcs_rb.set_active(1)
|
self.rcs_rb.set_active(_rcs_found)
|
||||||
|
self.cust_rb.set_active(not _rcs_found)
|
||||||
else:
|
else:
|
||||||
self.cust_rb.set_active(1)
|
self.cust_rb.set_active(True)
|
||||||
self.cust_arch_cb.set_sensitive(self.cust_rb.get_active())
|
self.cust_arch_cb.set_sensitive(self.cust_rb.get_active())
|
||||||
self.cust_ret_cb.set_sensitive(self.cust_rb.get_active())
|
self.cust_ret_cb.set_sensitive(self.cust_rb.get_active())
|
||||||
|
|
||||||
@@ -157,6 +158,7 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
# and show the normally hidden warning
|
# and show the normally hidden warning
|
||||||
if not _rcs_found:
|
if not _rcs_found:
|
||||||
self.rcs_rb.set_sensitive(False)
|
self.rcs_rb.set_sensitive(False)
|
||||||
|
self.cust_rb.set_sensitive(True)
|
||||||
self.glade.get_widget('warning_label').show()
|
self.glade.get_widget('warning_label').show()
|
||||||
|
|
||||||
self.title = _("Checkpoint Data")
|
self.title = _("Checkpoint Data")
|
||||||
@@ -218,11 +220,13 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
if self.options.handler.options_dict['rcs']:
|
if self.options.handler.options_dict['rcs']:
|
||||||
self.rcs(archive, cli)
|
self.rcs(archive, cli)
|
||||||
|
print "RCS Done"
|
||||||
elif archive:
|
elif archive:
|
||||||
self.custom(self.options.handler.options_dict['cacmd'], True, cli)
|
self.custom(self.options.handler.options_dict['cacmd'], True, cli)
|
||||||
else:
|
else:
|
||||||
self.custom(self.options.handler.options_dict['crcmd'], False, cli)
|
self.custom(self.options.handler.options_dict['crcmd'], False, cli)
|
||||||
|
|
||||||
|
print "Continue"
|
||||||
if not cli:
|
if not cli:
|
||||||
self.uistate.window.window.set_cursor(None)
|
self.uistate.window.window.set_cursor(None)
|
||||||
self.window.window.set_cursor(None)
|
self.window.window.set_cursor(None)
|
||||||
@@ -290,9 +294,8 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
# If the archive file does not exist, we either set it up
|
# If the archive file does not exist, we either set it up
|
||||||
# or die trying
|
# or die trying
|
||||||
if not os.path.exists(archive):
|
if not os.path.exists(archive):
|
||||||
proc = subprocess.Popen(
|
cmd = [ 'rcs', '-i', '-U', '-q', '-t-"GRAMPS database"', archive ]
|
||||||
'rcs -i -U -q -t-"GRAMPS database" %s' % archive,
|
proc = subprocess.Popen(cmd, stderr = subprocess.PIPE )
|
||||||
stderr = subprocess.PIPE )
|
|
||||||
status = proc.wait()
|
status = proc.wait()
|
||||||
message = "\n".join(proc.stderr.readlines())
|
message = "\n".join(proc.stderr.readlines())
|
||||||
proc.stderr.close()
|
proc.stderr.close()
|
||||||
@@ -321,15 +324,18 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
xmlwrite = GrampsDb.XmlWriter(self.db, self.callback, False, False)
|
xmlwrite = GrampsDb.XmlWriter(self.db, self.callback, False, False)
|
||||||
xmlwrite.write(archive_base)
|
xmlwrite.write(archive_base)
|
||||||
|
|
||||||
|
cmd = ["ci", archive_base]
|
||||||
|
print cmd
|
||||||
|
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
"ci %s" % archive_base,
|
cmd,
|
||||||
stdin = subprocess.PIPE,
|
stdin = subprocess.PIPE,
|
||||||
stderr = subprocess.PIPE )
|
stderr = subprocess.PIPE )
|
||||||
proc.stdin.write(comment)
|
proc.stdin.write(comment)
|
||||||
proc.stdin.close()
|
proc.stdin.close()
|
||||||
status = proc.wait()
|
|
||||||
message = "\n".join(proc.stderr.readlines())
|
message = "\n".join(proc.stderr.readlines())
|
||||||
proc.stderr.close()
|
proc.stderr.close()
|
||||||
|
status = proc.wait()
|
||||||
del proc
|
del proc
|
||||||
|
|
||||||
if status:
|
if status:
|
||||||
@@ -349,7 +355,7 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
else:
|
else:
|
||||||
|
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
"co -p %s > %s.gramps" % (archive_base,archive_base),
|
("co", "-p", archive_base), stdout=subprocess.PIPE
|
||||||
stderr = subprocess.PIPE )
|
stderr = subprocess.PIPE )
|
||||||
status = proc.wait()
|
status = proc.wait()
|
||||||
message = "\n".join(proc.stderr.readlines())
|
message = "\n".join(proc.stderr.readlines())
|
||||||
|
Reference in New Issue
Block a user