Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 582:df8a5a0098d4
Remove all remaining print statements
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Remove all remaining print statements
Convert most prints to ui.warn or ui.write
Pass a write function into transactions
manifest hash: d1b0af7a344fc087a5acfe3ae87b782c20d043e0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCx1Q3ywK+sNU5EO8RAqSTAJwM5t/m+JOlf2ZXOjuItCSdFiubcwCdFm3G
HoicikSYpTgfCj2pIRfyLjo=
=Loqo
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sat, 02 Jul 2005 18:57:59 -0800 |
parents | ffeb2c3a1966 |
children | 0c3bae18403b |
comparison
equal
deleted
inserted
replaced
581:9db6d5455642 | 582:df8a5a0098d4 |
---|---|
518 ds = self.opener("dirstate").read() | 518 ds = self.opener("dirstate").read() |
519 except IOError: | 519 except IOError: |
520 ds = "" | 520 ds = "" |
521 self.opener("undo.dirstate", "w").write(ds) | 521 self.opener("undo.dirstate", "w").write(ds) |
522 | 522 |
523 return transaction.transaction(self.opener, self.join("journal"), | 523 return transaction.transaction(self.ui.warn, |
524 self.opener, self.join("journal"), | |
524 self.join("undo")) | 525 self.join("undo")) |
525 | 526 |
526 def recover(self): | 527 def recover(self): |
527 lock = self.lock() | 528 lock = self.lock() |
528 if os.path.exists(self.join("journal")): | 529 if os.path.exists(self.join("journal")): |
1348 errors += 1 | 1349 errors += 1 |
1349 | 1350 |
1350 try: | 1351 try: |
1351 delta = mdiff.patchtext(self.manifest.delta(n)) | 1352 delta = mdiff.patchtext(self.manifest.delta(n)) |
1352 except KeyboardInterrupt: | 1353 except KeyboardInterrupt: |
1353 print "aborted" | 1354 self.ui.warn("aborted") |
1354 sys.exit(0) | 1355 sys.exit(0) |
1355 except Exception, inst: | 1356 except Exception, inst: |
1356 self.ui.warn("unpacking manifest %s: %s\n" | 1357 self.ui.warn("unpacking manifest %s: %s\n" |
1357 % (short(n), inst)) | 1358 % (short(n), inst)) |
1358 errors += 1 | 1359 errors += 1 |
1390 errors += 1 | 1391 errors += 1 |
1391 | 1392 |
1392 if n not in filenodes[f]: | 1393 if n not in filenodes[f]: |
1393 self.ui.warn("%s: %d:%s not in manifests\n" | 1394 self.ui.warn("%s: %d:%s not in manifests\n" |
1394 % (f, i, short(n))) | 1395 % (f, i, short(n))) |
1395 print len(filenodes[f].keys()), fl.count(), f | |
1396 errors += 1 | 1396 errors += 1 |
1397 else: | 1397 else: |
1398 del filenodes[f][n] | 1398 del filenodes[f][n] |
1399 | 1399 |
1400 flr = fl.linkrev(n) | 1400 flr = fl.linkrev(n) |