Mercurial > hg
changeset 1972:ce127cb4ee6e
Documented behaviour of write_bundle regarding file handles.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 18 Mar 2006 10:45:21 +0100 |
parents | 915b81a35e46 |
children | 9103902a5a8d |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Mar 18 09:13:27 2006 +0100 +++ b/mercurial/commands.py Sat Mar 18 10:45:21 2006 +0100 @@ -275,6 +275,10 @@ mode) def write_bundle(cg, filename, compress=True, fh=None): + """Write a bundle file, optionally without bz2 compression. + + A file handle (fh) may be passed and is guaranteed to be closed. + """ if fh is None: fh = open(filename, "wb") @@ -1792,6 +1796,7 @@ cg = other.changegroup(incoming, "incoming") write_bundle(cg, fname, compress=other.local(), fh=f) + # write_bundle closed f for us. if not other.local(): # use a bundlerepo other = bundlerepo.bundlerepository(ui, repo.root, fname)