[Zope3-checkins] CVS: Zope3/src/zope/fssync - fsmerger.py:1.14
fssync.py:1.40 main.py:1.29 merger.py:1.13 zsync.txt:1.9
Fred L. Drake, Jr.
fred at zope.com
Mon Aug 11 19:02:48 EDT 2003
Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv5398
Modified Files:
fsmerger.py fssync.py main.py merger.py zsync.txt
Log Message:
Convert to use Subversion's explicit model of conflict resolution instead of the
implicit (mtime-based) model used by CVS.
=== Zope3/src/zope/fssync/fsmerger.py 1.13 => 1.14 ===
--- Zope3/src/zope/fssync/fsmerger.py:1.13 Tue Jul 8 13:33:39 2003
+++ Zope3/src/zope/fssync/fsmerger.py Mon Aug 11 18:02:08 2003
@@ -98,8 +98,7 @@
# Reset sticky conflict if file was edited or removed
entry = self.metadata.getentry(local)
conflict = entry.get("conflict")
- if conflict and (not os.path.exists(local) or
- conflict != os.path.getmtime(local)):
+ if conflict and not os.path.exists(local):
del entry["conflict"]
original = fsutil.getoriginal(local)
=== Zope3/src/zope/fssync/fssync.py 1.39 => 1.40 ===
--- Zope3/src/zope/fssync/fssync.py:1.39 Mon Aug 11 10:55:01 2003
+++ Zope3/src/zope/fssync/fssync.py Mon Aug 11 18:02:09 2003
@@ -401,6 +401,23 @@
if isdir(tmpdir):
shutil.rmtree(tmpdir)
+ def resolve(self, target):
+ entry = self.metadata.getentry(target)
+ if "conflict" in entry:
+ del entry["conflict"]
+ self.metadata.flush()
+ elif isdir(target):
+ self.dirresolve(target)
+
+ def dirresolve(self, target):
+ assert isdir(target)
+ names = self.metadata.getnames(target)
+ for name in names:
+ t = join(target, name)
+ e = self.metadata.getentry(t)
+ if e:
+ self.resolve(t)
+
def revert(self, target):
entry = self.metadata.getentry(target)
if not entry:
=== Zope3/src/zope/fssync/main.py 1.28 => 1.29 ===
--- Zope3/src/zope/fssync/main.py:1.28 Mon Aug 11 16:55:21 2003
+++ Zope3/src/zope/fssync/main.py Mon Aug 11 18:02:09 2003
@@ -285,6 +285,13 @@
fs = FSSync()
fs.multiple(args, fs.mkdir)
+def resolve(opts, args):
+ """%(program)s resolve [TARGET ...]
+
+ """
+ fs = FSSync()
+ fs.multiple(args, fs.resolve)
+
def extract_message(opts, cmd):
L = []
message = None
@@ -319,6 +326,7 @@
(diff, "di", "bBcC:iNuU:", "brief context= unified="),
(mkdir, "", "", ""),
(remove, "del delete rm", "", ""),
+ (resolve, "", "", ""),
(revert, "", "", ""),
(status, "stat st", "", ""),
(update, "up", "", ""),
=== Zope3/src/zope/fssync/merger.py 1.12 => 1.13 ===
--- Zope3/src/zope/fssync/merger.py:1.12 Wed Aug 6 16:11:01 2003
+++ Zope3/src/zope/fssync/merger.py Mon Aug 11 18:02:09 2003
@@ -173,7 +173,7 @@
self.getentry(local).update(self.getentry(remote))
self.clearflag(local)
if sts:
- self.getentry(local)["conflict"] = os.path.getmtime(local)
+ self.getentry(local)["conflict"] = "yes"
return "Conflict"
else:
return "Modified"
=== Zope3/src/zope/fssync/zsync.txt 1.8 => 1.9 ===
--- Zope3/src/zope/fssync/zsync.txt:1.8 Fri Aug 8 10:36:47 2003
+++ Zope3/src/zope/fssync/zsync.txt Mon Aug 11 18:02:09 2003
@@ -62,6 +62,12 @@
not made to the object database itself until the next **zsync
commit**.
+**resolve**
+ Remove a conflict indicator for a file that has been updated on
+ both the server and the working copy. (This does not actually
+ modify the file to resolve conflicts; this is used to tell **zsync**
+ that you're done making changes to resolve the conflict.)
+
**revert**
Restore targets to their unmodified state.
@@ -279,6 +285,22 @@
The **remove** command has no specific options. It requires at least
one *path* argument.
+
+
+The **zsync resolve** Command
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Synopsis
+++++++++
+
+**resolve** [*path* ...]
+
+Description
++++++++++++
+
+Clear conflict markers from each *path*.
+
+The **resolve** command has no specific options.
The **zsync revert** Command
More information about the Zope3-Checkins
mailing list