checking even if it is identical; fix -t option;
(find_revisions): get the date from rlog; (__populate): Use date and comment, not rcs version numbers. (__button_press): Fix double-click handling. svn: r8610
This commit is contained in:
parent
239f7e8450
commit
72b74e4ae2
@ -1,7 +1,10 @@
|
|||||||
2007-06-19 Alex Roitman <shura@gramps-project.org>
|
2007-06-19 Alex Roitman <shura@gramps-project.org>
|
||||||
* data/grampsxml.dtd: Typo.
|
* data/grampsxml.dtd: Typo.
|
||||||
* src/DbManager.py (check_in): Add -f option to ci to force
|
* src/DbManager.py (check_in): Add -f option to ci to force
|
||||||
checking even if it is identical; fix -t option.
|
checking even if it is identical; fix -t option;
|
||||||
|
(find_revisions): get the date from rlog;
|
||||||
|
(__populate): Use date and comment, not rcs version numbers.
|
||||||
|
(__button_press): Fix double-click handling.
|
||||||
|
|
||||||
2007-06-19 Don Allingham <don@gramps-project.org>
|
2007-06-19 Don Allingham <don@gramps-project.org>
|
||||||
* src/DbManager.py: handle RCS init properly, don't use gziped files
|
* src/DbManager.py: handle RCS init properly, don't use gziped files
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -31,7 +31,6 @@ __revision__ = "$Revision: 8197 $"
|
|||||||
# Standard python modules
|
# Standard python modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import const
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -63,6 +62,7 @@ import gtk.glade
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
import const
|
||||||
import QuestionDialog
|
import QuestionDialog
|
||||||
import GrampsDb
|
import GrampsDb
|
||||||
import GrampsDbUtils
|
import GrampsDbUtils
|
||||||
@ -148,10 +148,10 @@ class DbManager:
|
|||||||
to make sure that an item was selected first.
|
to make sure that an item was selected first.
|
||||||
"""
|
"""
|
||||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||||
data = self.selection.get_selected()
|
store, node = self.selection.get_selected()
|
||||||
if data[STOCK_COL] == 'gramps-lock':
|
if store.get_value(node,STOCK_COL) == 'gramps-lock':
|
||||||
return
|
return
|
||||||
if data[1]:
|
if store.get_value(node,PATH_COL):
|
||||||
self.top.response(gtk.RESPONSE_OK)
|
self.top.response(gtk.RESPONSE_OK)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
@ -293,8 +293,8 @@ class DbManager:
|
|||||||
data = [items[0], items[1], items[2], items[3],
|
data = [items[0], items[1], items[2], items[3],
|
||||||
items[4], items[5], items[6]]
|
items[4], items[5], items[6]]
|
||||||
iter = self.model.append(None, data)
|
iter = self.model.append(None, data)
|
||||||
for rdata in find_revisions(os.path.join(items[1], "rev.gramps,v")):
|
for rdata in find_revisions(os.path.join(items[1],"rev.gramps,v")):
|
||||||
data = [ _("Version %s") % rdata[0], "", "", rdata[1], 0, False, "" ]
|
data = [ rdata[2], "", "", rdata[1], 0, False, "" ]
|
||||||
self.model.append(iter, data)
|
self.model.append(iter, data)
|
||||||
self.dblist.set_model(self.model)
|
self.dblist.set_model(self.model)
|
||||||
|
|
||||||
@ -521,6 +521,7 @@ def find_revisions(name):
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
rev = re.compile("\s*revision\s+([\d\.]+)")
|
rev = re.compile("\s*revision\s+([\d\.]+)")
|
||||||
|
date = re.compile("date:\s+(\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d);")
|
||||||
|
|
||||||
if not os.path.isfile(name):
|
if not os.path.isfile(name):
|
||||||
return []
|
return []
|
||||||
@ -533,20 +534,26 @@ def find_revisions(name):
|
|||||||
revlist = []
|
revlist = []
|
||||||
date_str = ""
|
date_str = ""
|
||||||
rev_str = ""
|
rev_str = ""
|
||||||
|
com_str = ""
|
||||||
|
|
||||||
next_com = False
|
get_next = False
|
||||||
if os.path.isfile(name):
|
if os.path.isfile(name):
|
||||||
for i in proc.stdout:
|
for line in proc.stdout:
|
||||||
match = rev.match(i)
|
match = rev.match(line)
|
||||||
if match:
|
if match:
|
||||||
rev_str = match.groups()[0]
|
rev_str = match.groups()[0]
|
||||||
elif next_com:
|
continue
|
||||||
next_com = False
|
match = date.match(line)
|
||||||
date_str = i.strip()
|
if match:
|
||||||
revlist.append((rev_str, date_str))
|
date_str = time.asctime(time.strptime(match.groups()[0],
|
||||||
elif i[0:5] == "date:":
|
'%Y/%m/%d %H:%M:%S'))
|
||||||
next_com = True
|
|
||||||
|
get_next = True
|
||||||
|
continue
|
||||||
|
if get_next:
|
||||||
|
get_next = False
|
||||||
|
com_str = line.strip()
|
||||||
|
revlist.append((rev_str, date_str, com_str))
|
||||||
return revlist
|
return revlist
|
||||||
|
|
||||||
def check_in(db, filename, callback):
|
def check_in(db, filename, callback):
|
||||||
|
Loading…
Reference in New Issue
Block a user