diff options
author | Guido van Rossum <guido@python.org> | 1995-04-28 15:33:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-04-28 15:33:03 (GMT) |
commit | ba244688c608917a25793622950a0ef176565d53 (patch) | |
tree | c3be0040592bdccf793c66b592830e7d4aec7aae /Demo/pdist | |
parent | 6bb4a51daacef23a08dc0e4df60f1c48d778041a (diff) | |
download | cpython-ba244688c608917a25793622950a0ef176565d53.zip cpython-ba244688c608917a25793622950a0ef176565d53.tar.gz cpython-ba244688c608917a25793622950a0ef176565d53.tar.bz2 |
Handled new and delete properly
Diffstat (limited to 'Demo/pdist')
-rwxr-xr-x | Demo/pdist/rcvs.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Demo/pdist/rcvs.py b/Demo/pdist/rcvs.py index 5b7ace8..9947bf1 100755 --- a/Demo/pdist/rcvs.py +++ b/Demo/pdist/rcvs.py @@ -28,6 +28,8 @@ class MyFile(File): 'C' -- conflict: changed locally as well as remotely (includes cases where the file has been added or removed locally and remotely) + 'D' -- deleted remotely + 'N' -- new remotely 'r' -- get rid of entry 'c' -- create entry 'u' -- update entry @@ -80,11 +82,25 @@ class MyFile(File): def update(self): code = self.action() print code, self.file - if code == 'U': + if code in ('U', 'N'): self.get() elif code == 'C': print "%s: conflict resolution not yet implemented" % \ self.file + elif code == 'D': + try: + os.unlink(self.file) + except os.error: + pass + self.eseen = 0 + elif code == 'r': + self.eseen = 0 + elif code in ('c', 'u'): + self.erev = self.rrev + self.enew = 0 + self.edeleted = 0 + self.esum = self.rsum + self.emtime, self.ectime = os.stat(self.file)[-2:] def commit(self, message = ""): code = self.action() |