diff options
author | Guido van Rossum <guido@python.org> | 1995-04-28 21:48:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-04-28 21:48:16 (GMT) |
commit | 8b5e0fa8628d6035a5b5ce428972bd946876a0fc (patch) | |
tree | a93fc49f33a1f2e2336bef92b4a86057cd199892 | |
parent | cf97469407e045a05241d89ca3c999ed87932081 (diff) | |
download | cpython-8b5e0fa8628d6035a5b5ce428972bd946876a0fc.zip cpython-8b5e0fa8628d6035a5b5ce428972bd946876a0fc.tar.gz cpython-8b5e0fa8628d6035a5b5ce428972bd946876a0fc.tar.bz2 |
added setentry() and use it in commit so CVS/Entries gets updated
-rwxr-xr-x | Demo/pdist/rcvs.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Demo/pdist/rcvs.py b/Demo/pdist/rcvs.py index d9d1c55..9d14ad4 100755 --- a/Demo/pdist/rcvs.py +++ b/Demo/pdist/rcvs.py @@ -81,6 +81,7 @@ class MyFile(File): def update(self): code = self.action() + if code == '=': return print code, self.file if code in ('U', 'N'): self.get() @@ -143,19 +144,23 @@ class MyFile(File): messages = self.proxy.put(self.file, data, message) if messages: print messages + self.setentry(self.proxy.head(self.file), self.lsum) def get(self): data = self.proxy.get(self.file) f = open(self.file, 'w') f.write(data) f.close() - self.eseen = 1 - self.esum = self.rsum + self.setentry(self.rrev, self.rsum) + + def setentry(self, erev, esum): + self.eseen = 0 # While we're hacking... + self.esum = esum self.emtime, self.ectime = os.stat(self.file)[-2:] - self.erev = self.rrev + self.erev = erev self.enew = 0 self.edeleted = 0 - # XXX anything else? + self.eseen = 1 # Done class RCVS(CVS): |