sapling/mercurial
Greg Ward bc1dfb1ac9 atomictempfile: make close() consistent with other file-like objects.
The usual contract is that close() makes your writes permanent, so
atomictempfile's use of close() to *discard* writes (and rename() to
keep them) is rather unexpected. Thus, change it so close() makes
things permanent and add a new discard() method to throw them away.
discard() is only used internally, in __del__(), to ensure that writes
are discarded when an atomictempfile object goes out of scope.

I audited mercurial.*, hgext.*, and ~80 third-party extensions, and
found no one using the existing semantics of close() to discard
writes, so this should be safe.
2011-08-25 20:21:04 -04:00
..
help merge with stable 2011-08-18 17:24:04 -05:00
hgweb wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
httpclient httpclient: import ca33b88d143c from py-nonblocking-http (issue2932) 2011-07-29 12:46:45 -05:00
pure merge with stable 2011-08-17 14:17:35 +02:00
templates hgweb: add a "web/logoimg" setting to customize the web logo image 2011-07-21 15:10:16 +02:00
__init__.py Add back links from file revisions to changeset revisions 2005-05-03 13:16:10 -08:00
ancestor.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
archival.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
base85.c backout of e4cb9628354c 2011-01-27 11:15:08 +01:00
bdiff.c bdiff.c: rename all variables which hold a hash value to "hash" 2011-03-23 02:33:24 +01:00
bookmarks.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
bundlerepo.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
byterange.py byterange: replace uses of hasattr with getattr 2011-07-25 15:09:17 -05:00
changegroup.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
changelog.py hidden: Add a hiddenrevs attributes to changelog. 2011-06-16 01:57:53 +02:00
cmdutil.py export: add %m to file format string (first line of the commit message) 2011-07-30 11:08:45 +01:00
commands.py ui: use labels when outputting tags 2011-08-20 21:47:10 +01:00
commandserver.py cmdserver: repo.invalidate() on every runcommand 2011-07-25 22:19:28 +03:00
config.py config.sortdict: override clear method 2011-06-20 10:51:37 +02:00
context.py match: allow passing a context object to match core 2011-06-18 16:52:51 -05:00
copies.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
dagparser.py cleanup: use x in (a, b) instead of x == a or x == b 2010-09-23 00:02:31 -05:00
dagutil.py dagutil: fix off-by-one in inverserevlogdag buildup 2011-08-25 17:20:00 +02:00
demandimport.py demandimport: use getattr instead of hasattr 2011-07-25 21:15:48 -05:00
diffhelpers.c backout of e4cb9628354c 2011-01-27 11:15:08 +01:00
dirstate.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
discovery.py prepush: show details about new remote heads with --verbose 2011-06-03 13:10:22 +02:00
dispatch.py merge with stable 2011-08-05 16:07:51 -05:00
encoding.py encoding: use getattr isntead of hasattr 2011-07-25 15:19:43 -05:00
error.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
extensions.py globally: use safehasattr(x, '__call__') instead of hasattr(x, '__call__') 2011-07-25 16:24:37 -05:00
fancyopts.py globally: use safehasattr(x, '__call__') instead of hasattr(x, '__call__') 2011-07-25 16:24:37 -05:00
filelog.py filelog: add file function to open other filelogs 2011-05-10 17:38:58 +02:00
filemerge.py filemerge: use ui out descriptor when calling util.system 2011-06-24 17:04:37 +03:00
fileset.py fileset: fix typo in binary() doc 2011-07-04 14:36:16 +03:00
graphmod.py graphmod: correctly emit nodes with more than 2 predecessors 2011-05-01 15:51:46 +02:00
hbisect.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
help.py windows: check util.mainfrozen() instead of ad-hoc checks everywhere 2011-07-25 16:14:02 -05:00
hg.py hg: use safehasattr instead of hasattr 2011-07-25 15:22:18 -05:00
hook.py merge with stable 2011-08-01 10:54:34 -05:00
httpconnection.py http: pass user to readauthforuri() (fix f7ae45a69fcd) 2011-08-05 21:05:41 +02:00
httprepo.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
i18n.py i18n: use getattr instead of hasattr 2011-07-25 20:46:30 -05:00
ignore.py remove unnecessary list comprehensions 2011-02-03 10:31:17 +01:00
keepalive.py keepalive: use safehasattr instead of hasattr 2011-07-25 20:36:59 -05:00
localrepo.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
lock.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
lsprof.py lsprof: use getattr instead of hasattr 2011-07-25 15:41:46 -05:00
lsprofcalltree.py drop unused imports 2009-05-14 15:35:46 +02:00
mail.py mail: use safehasattr instead of hasattr 2011-07-25 16:02:15 -05:00
manifest.py manifest: use "\0" instead of "\000" 2011-06-16 08:49:26 +02:00
match.py match: remove unused assignment 2011-08-09 11:05:13 +02:00
mdiff.py mdiff: carriage return (\r) is also ignorable whitespace 2010-10-19 03:55:06 +02:00
merge.py merge: use repo.ui directly instead local variable 2011-08-17 14:11:46 +02:00
minirst.py minirst: add a helper function to build an RST table from an array 2011-08-11 22:40:43 -05:00
mpatch.c parsers: avoid pointer aliasing 2011-08-10 13:40:01 -05:00
node.py Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
osutil.c osutil: emulate os.listdir's OSError for long names (issue2898) 2011-07-13 16:58:51 -05:00
parser.py parsers: fix localization markup of parser errors 2011-06-21 00:17:52 +02:00
parsers.c parsers: avoid pointer aliasing 2011-08-10 13:40:01 -05:00
patch.py patch: use safehasattr instead of hasattr 2011-07-25 16:02:27 -05:00
posix.py posix: check for executable bits on files identified by findexe function 2011-08-24 05:42:41 -04:00
pushkey.py bookmarks: move pushkey functions into core 2011-02-10 13:46:27 -06:00
py3kcompat.py py3kcompat: added fake ord implementation for py3k 2010-08-07 16:38:38 -03:00
repair.py remove unused imports and variables 2011-04-30 13:59:14 +02:00
repo.py Make sure bundlerepo doesn't leak temp files (issue2491) 2011-02-12 10:58:11 +01:00
revlog.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
revset.py revset: add formatspec convenience query builder 2011-07-21 14:05:45 -05:00
scmutil.py merge with stable 2011-07-29 17:27:38 -05:00
setdiscovery.py setdiscovery: return anyincoming=False when remote's only head is nullid 2011-07-27 18:32:54 -04:00
similar.py fix coding style 2010-05-02 00:48:33 +02:00
simplemerge.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
sshrepo.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
sshserver.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
sslutil.py sslutil: make messages for Python without certificate handling more helpful 2011-06-18 01:08:54 +02:00
statichttprepo.py statichttprepo: replace hasattr with getattr 2011-07-25 15:47:43 -05:00
store.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
strutil.py Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
subrepo.py merge with stable 2011-08-01 10:54:34 -05:00
tags.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
templatefilters.py templatefilters: use safehasattr instead of hasattr 2011-07-25 16:02:42 -05:00
templatekw.py patch: restore the previous output of 'diff --stat' 2011-05-26 22:51:02 +08:00
templater.py globally: use safehasattr(x, '__iter__') instead of hasattr(x, '__iter__') 2011-07-25 15:30:19 -05:00
transaction.py transaction: use posixfile and unlink from util 2011-02-15 14:41:49 +01:00
treediscovery.py treediscovery: always return all remote heads 2011-06-20 14:11:01 +02:00
ui.py merge with stable 2011-08-25 16:21:53 -05:00
url.py merge with stable 2011-08-05 16:07:51 -05:00
util.h backout of e4cb9628354c 2011-01-27 11:15:08 +01:00
util.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
verify.py verify: fix mq misfire 2011-07-14 12:39:39 -05:00
win32.py win32.py: add argtypes and restype 2011-05-15 21:33:51 +02:00
windows.py windows: fix pyflakes warning on unused imports 2011-08-03 16:41:14 -05:00
wireproto.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00