=== modified file 'Makefile' --- Makefile 2010-01-07 06:44:05 +0000 +++ Makefile 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'NEWS' --- NEWS 2010-02-16 16:08:40 +0000 +++ NEWS 2010-03-24 07:13:15 +0000 @@ -5,6 +5,66 @@ .. contents:: List of Releases :depth: 1 + +bzr 2.1.1 +######### + +:2.1.1: 2010-03-24 + +This is a small bugfix release. Upgrading is recommended for anyone +running 2.1.0 or earlier. + +Bug Fixes +********* + +* Allow syscalls to automatically restart when ``TextUIFactory``'s + SIGWINCH handler is invoked, avoiding ``EINTR`` errors during blocking + IO, which are often poorly handled by Python's libraries and parts of + bzrlib. (Andrew Bennetts, #496813) + +* Avoid ``malloc(0)`` in ``patiencediff``, which is non-portable. + (Martin Pool, #331095) + +* Fix plugin packaging on Windows. (Ian Clatworthy, #524162) + +* Fix stub sftp test server to call os.getcwdu(). + (Vincent Ladeuil, #526211, #526353) + +* Fixed CHM generation by moving the NEWS section template into + a separate file. (Ian Clatworthy, #524184) + +* Merge correctly when this_tree is not a WorkingTree. (Aaron Bentley) + +* Register SIGWINCH handler only when creating a ``TextUIFactory``; avoids + problems importing bzrlib from a non-main thread. + (Elliot Murphy, #521989) + +* Standardize the error handling when creating a new ``StaticTuple`` + (problems will raise TypeError). (Matt Nordhoff, #457979) + +* Warn if pyrex is too old to compile the new ``SimpleSet`` and + ``StaticTuple`` extensions, rather than having the build fail randomly. + (John Arbash Meinel, #449776) + +Documentation +************* + +* Added a link to the Desktop Guide. (Ian Clatworthy) + +* Added What's New in Bazaar 2.1 document. (Ian Clatworthy) + +* Drop Google Analytics from the core docs as they caused problems + in the CHM files. (Ian Clatworthy, #502010) + +API Changes +*********** + +* Added ``bzrlib.osutils.set_signal_handler``, a convenience function that + can set a signal handler and call ``signal.siginterrupt(signum, + False)`` for it, if the platform and Python version supports it. + (Andrew Bennetts, #496813) + + bzr 2.1.0 ######### @@ -328,23 +388,55 @@ (Martin Pool) -bzr 2.0.5 (not released yet) -############################ +bzr 2.0.5 +######### :Codename: -:2.0.5: +:2.0.5: NOT RELEASED YET Bug Fixes ********* +* Avoid ``malloc(0)`` in ``patiencediff``, which is non-portable. + (Martin Pool, #331095) + +* Concurrent autopacking is more resilient to already-renamed pack files. + If we find that a file we are about to obsolete is already obsoleted, we + do not try to rename it, and we leave the file in ``obsolete_packs``. + The code is also fault tolerant if a file goes missing, assuming that + another process already removed the file. + (John Arbash Meinel, Gareth White, #507557) + +* Cope with the lockdir ``held/info`` file being empty, which seems to + happen fairly often if the process is suddenly interrupted while taking + a lock. + (Martin Pool, #185103) + +* Give the warning about potentially slow cross-format fetches much + earlier on in the fetch operation. Don't show this message during + upgrades, and show the correct format indication for remote + repositories. + (Martin Pool, #456077, #515356, #513157) + * Handle renames correctly when there are files or directories that differ only in case. (Chris Jones, Martin Pool, #368931) +* Fixed CHM generation by moving the NEWS section template into + a separate file. (Ian Clatworthy, #524184) + * If ``bzr push --create-prefix`` triggers an unexpected ``NoSuchFile`` error, report that error rather than failing with an unhelpful ``UnboundLocalError``. (Andrew Bennetts, #423563) +* Running ``bzr`` command without any arguments now shows bzr + version number along with rest of the help text. + (Parth Malwankar, #369501) + +* Use osutils.O_NOINHERIT for some files on win32 to avoid PermissionDenied + errors. + (Inada Naoki, #524560) + Documentation ************* @@ -11829,37 +11921,5 @@ diff, status, etc. -bzr ?.?.? (not released yet) -############################ - -:Codename: template -:2.0.2: ??? - -Compatibility Breaks -******************** - -New Features -************ - -Bug Fixes -********* - -Improvements -************ - -Documentation -************* - -API Changes -*********** - -Internals -********* - -Testing -******* - - - .. vim: tw=74 ft=rst ff=unix === added file 'NEWS-template.txt' --- NEWS-template.txt 1970-01-01 00:00:00 +0000 +++ NEWS-template.txt 2010-03-23 06:37:38 +0000 @@ -0,0 +1,31 @@ +bzr ?.?.? +######### + +:Codename: Nirvana +:2.x.y: NOT RELEASED YET + +Compatibility Breaks +******************** + +New Features +************ + +Bug Fixes +********* + +Improvements +************ + +Documentation +************* + +API Changes +*********** + +Internals +********* + +Testing +******* + + === modified file 'bzr' --- bzr 2009-12-15 19:59:00 +0000 +++ bzr 2010-03-23 06:37:38 +0000 @@ -23,7 +23,7 @@ import warnings # update this on each release -_script_version = (2, 1, 0) +_script_version = (2, 1, 1) if __doc__ is None: print "bzr does not support python -OO." === modified file 'bzrlib/__init__.py' --- bzrlib/__init__.py 2010-02-11 23:07:09 +0000 +++ bzrlib/__init__.py 2010-03-24 07:13:29 +0000 @@ -35,7 +35,7 @@ IGNORE_FILENAME = ".bzrignore" -__copyright__ = "Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd." +__copyright__ = "Copyright 2005-2010 Canonical Ltd." # same format as sys.version_info: "A tuple containing the five components of # the version number: major, minor, micro, releaselevel, and serial. All @@ -44,7 +44,7 @@ # Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a # releaselevel of 'dev' for unreleased under-development code. -version_info = (2, 1, 0, 'final', 0) +version_info = (2, 1, 1, 'final', 0) # API compatibility version: bzrlib is currently API compatible with 1.15. api_minimum_version = (2, 1, 0) === modified file 'bzrlib/_annotator_pyx.pyx' --- bzrlib/_annotator_pyx.pyx 2010-01-05 04:59:57 +0000 +++ bzrlib/_annotator_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_bencode_pyx.pyx' --- bzrlib/_bencode_pyx.pyx 2010-01-04 02:25:11 +0000 +++ bzrlib/_bencode_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007,2009 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_btree_serializer_py.py' --- bzrlib/_btree_serializer_py.py 2009-11-07 00:28:26 +0000 +++ bzrlib/_btree_serializer_py.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_btree_serializer_pyx.pyx' --- bzrlib/_btree_serializer_pyx.pyx 2010-01-05 05:09:45 +0000 +++ bzrlib/_btree_serializer_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_chk_map_py.py' --- bzrlib/_chk_map_py.py 2009-10-21 21:27:19 +0000 +++ bzrlib/_chk_map_py.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_chk_map_pyx.pyx' --- bzrlib/_chk_map_pyx.pyx 2010-01-05 05:09:45 +0000 +++ bzrlib/_chk_map_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_dirstate_helpers_pyx.pyx' --- bzrlib/_dirstate_helpers_pyx.pyx 2010-01-05 07:22:59 +0000 +++ bzrlib/_dirstate_helpers_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_groupcompress_pyx.pyx' --- bzrlib/_groupcompress_pyx.pyx 2010-01-05 05:09:45 +0000 +++ bzrlib/_groupcompress_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_knit_load_data_pyx.pyx' --- bzrlib/_knit_load_data_pyx.pyx 2010-01-04 23:13:20 +0000 +++ bzrlib/_knit_load_data_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_known_graph_py.py' --- bzrlib/_known_graph_py.py 2009-11-30 17:25:22 +0000 +++ bzrlib/_known_graph_py.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_known_graph_pyx.pyx' --- bzrlib/_known_graph_pyx.pyx 2010-01-05 05:09:45 +0000 +++ bzrlib/_known_graph_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_patiencediff_c.c' --- bzrlib/_patiencediff_c.c 2009-10-29 06:11:23 +0000 +++ bzrlib/_patiencediff_c.c 2010-03-23 06:37:38 +0000 @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Canonical Ltd + Copyright (C) 2007, 2010 Canonical Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,6 +46,12 @@ #define SENTINEL -1 +/* malloc returns NULL on some platforms if you try to allocate nothing, + * causing and + * . On glibc it passes, but + * let's make it fail to aid testing. */ +#define guarded_malloc(x) ( (x) ? malloc(x) : NULL ) + enum { OP_EQUAL = 0, OP_INSERT, @@ -183,7 +189,8 @@ while (hsize < bsize + 1) hsize *= 2; - hashtable = (struct bucket *)malloc(sizeof(struct bucket) * hsize); + /* can't be 0 */ + hashtable = (struct bucket *) guarded_malloc(sizeof(struct bucket) * hsize); if (hashtable == NULL) { PyErr_NoMemory(); return 0; @@ -460,7 +467,7 @@ last_a_pos = alo - 1; last_b_pos = blo - 1; - lcs = (struct matching_line *)malloc(sizeof(struct matching_line) * (bhi - blo)); + lcs = (struct matching_line *)guarded_malloc(sizeof(struct matching_line) * (bhi - blo)); if (lcs == NULL) return 0; @@ -620,13 +627,15 @@ if (!equate_lines(&hashtable, a, b, asize, bsize)) goto error; - matches = (struct matching_line *)malloc(sizeof(struct matching_line) * bsize); - if (matches == NULL) - goto error; + if (bsize > 0) { + matches = (struct matching_line *)guarded_malloc(sizeof(struct matching_line) * bsize); + if (matches == NULL) + goto error; - backpointers = (Py_ssize_t *)malloc(sizeof(Py_ssize_t) * bsize * 4); - if (backpointers == NULL) - goto error; + backpointers = (Py_ssize_t *)guarded_malloc(sizeof(Py_ssize_t) * bsize * 4); + if (backpointers == NULL) + goto error; + } nmatches = unique_lcs(matches, &hashtable, backpointers, a, b, 0, 0, asize, bsize); @@ -692,13 +701,19 @@ goto error; matches.count = 0; - matches.matches = (struct matching_block *)malloc(sizeof(struct matching_block) * bsize); - if (matches.matches == NULL) - goto error; - - backpointers = (Py_ssize_t *)malloc(sizeof(Py_ssize_t) * bsize * 4); - if (backpointers == NULL) - goto error; + + if (bsize > 0) { + matches.matches = (struct matching_block *)guarded_malloc(sizeof(struct matching_block) * bsize); + if (matches.matches == NULL) + goto error; + + backpointers = (Py_ssize_t *)guarded_malloc(sizeof(Py_ssize_t) * bsize * 4); + if (backpointers == NULL) + goto error; + } else { + matches.matches = NULL; + backpointers = NULL; + } res = recurse_matches(&matches, &hashtable, backpointers, a, b, alo, blo, ahi, bhi, maxrecursion); @@ -765,11 +780,15 @@ return NULL; } - self->backpointers = (Py_ssize_t *)malloc(sizeof(Py_ssize_t) * self->bsize * 4); - if (self->backpointers == NULL) { - Py_DECREF(self); - PyErr_NoMemory(); - return NULL; + if (self->bsize > 0) { + self->backpointers = (Py_ssize_t *)guarded_malloc(sizeof(Py_ssize_t) * self->bsize * 4); + if (self->backpointers == NULL) { + Py_DECREF(self); + PyErr_NoMemory(); + return NULL; + } + } else { + self->backpointers = NULL; } } @@ -812,9 +831,13 @@ struct matching_blocks matches; matches.count = 0; - matches.matches = (struct matching_block *)malloc(sizeof(struct matching_block) * self->bsize); - if (matches.matches == NULL) - return PyErr_NoMemory(); + if (self->bsize > 0) { + matches.matches = (struct matching_block *) + guarded_malloc(sizeof(struct matching_block) * self->bsize); + if (matches.matches == NULL) + return PyErr_NoMemory(); + } else + matches.matches = NULL; res = recurse_matches(&matches, &self->hashtable, self->backpointers, self->a, self->b, 0, 0, @@ -900,7 +923,7 @@ struct matching_blocks matches; matches.count = 0; - matches.matches = (struct matching_block *)malloc(sizeof(struct matching_block) * (self->bsize + 1)); + matches.matches = (struct matching_block *)guarded_malloc(sizeof(struct matching_block) * (self->bsize + 1)); if (matches.matches == NULL) return PyErr_NoMemory(); @@ -1013,7 +1036,7 @@ return NULL; matches.count = 0; - matches.matches = (struct matching_block *)malloc(sizeof(struct matching_block) * (self->bsize + 1)); + matches.matches = (struct matching_block *)guarded_malloc(sizeof(struct matching_block) * (self->bsize + 1)); if (matches.matches == NULL) return PyErr_NoMemory(); @@ -1031,7 +1054,7 @@ matches.count++; ncodes = 0; - codes = (struct opcode *)malloc(sizeof(struct opcode) * matches.count * 2); + codes = (struct opcode *)guarded_malloc(sizeof(struct opcode) * matches.count * 2); if (codes == NULL) { free(matches.matches); return PyErr_NoMemory(); @@ -1252,3 +1275,7 @@ PyModule_AddObject(m, "PatienceSequenceMatcher_c", (PyObject *)&PatienceSequenceMatcherType); } + + +/* vim: sw=4 et + */ === modified file 'bzrlib/_readdir_pyx.pyx' --- bzrlib/_readdir_pyx.pyx 2010-01-06 22:17:10 +0000 +++ bzrlib/_readdir_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2008, 2009 Canonical Ltd +# Copyright (C) 2006, 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_rio_pyx.pyx' --- bzrlib/_rio_pyx.pyx 2010-01-05 04:59:57 +0000 +++ bzrlib/_rio_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_simple_set_pyx.pxd' --- bzrlib/_simple_set_pyx.pxd 2010-01-05 05:28:42 +0000 +++ bzrlib/_simple_set_pyx.pxd 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_simple_set_pyx.pyx' --- bzrlib/_simple_set_pyx.pyx 2010-01-05 05:28:42 +0000 +++ bzrlib/_simple_set_pyx.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_static_tuple_c.c' --- bzrlib/_static_tuple_c.c 2009-10-27 14:07:16 +0000 +++ bzrlib/_static_tuple_c.c 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Canonical Ltd +/* Copyright (C) 2009, 2010 Canonical Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -140,10 +140,6 @@ StaticTuple_New(Py_ssize_t size) { StaticTuple *stuple; - if (size < 0) { - PyErr_BadInternalCall(); - return NULL; - } if (size < 0 || size > 255) { /* Too big or too small */ @@ -280,6 +276,14 @@ return NULL; } len = PyTuple_GET_SIZE(args); + if (len < 0 || len > 255) { + /* Check the length here so we can raise a TypeError instead of + * StaticTuple_New's ValueError. + */ + PyErr_SetString(PyExc_TypeError, "StaticTuple(...)" + " takes from 0 to 255 items"); + return NULL; + } self = (StaticTuple *)StaticTuple_New(len); if (self == NULL) { return NULL; === modified file 'bzrlib/_static_tuple_c.pxd' --- bzrlib/_static_tuple_c.pxd 2009-10-21 21:27:19 +0000 +++ bzrlib/_static_tuple_c.pxd 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/_static_tuple_py.py' --- bzrlib/_static_tuple_py.py 2009-11-28 21:54:08 +0000 +++ bzrlib/_static_tuple_py.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -34,15 +34,15 @@ def __init__(self, *args): """Create a new 'StaticTuple'""" + num_keys = len(args) + if num_keys < 0 or num_keys > 255: + raise TypeError('StaticTuple(...) takes from 0 to 255 items') for bit in args: if type(bit) not in (str, StaticTuple, unicode, int, long, float, None.__class__, bool): raise TypeError('StaticTuple can only point to' ' StaticTuple, str, unicode, int, long, float, bool, or' ' None not %s' % (type(bit),)) - num_keys = len(args) - if num_keys < 0 or num_keys > 255: - raise ValueError('must have 1 => 256 key bits') # We don't need to pass args to tuple.__init__, because that was # already handled in __new__. tuple.__init__(self) === modified file 'bzrlib/_walkdirs_win32.pyx' --- bzrlib/_walkdirs_win32.pyx 2010-01-07 17:02:44 +0000 +++ bzrlib/_walkdirs_win32.pyx 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/atomicfile.py' --- bzrlib/atomicfile.py 2009-03-23 14:59:43 +0000 +++ bzrlib/atomicfile.py 2010-03-23 06:37:38 +0000 @@ -60,7 +60,7 @@ self.realfilename = filename - flags = os.O_EXCL | os.O_CREAT | os.O_WRONLY + flags = os.O_EXCL | os.O_CREAT | os.O_WRONLY | osutils.O_NOINHERIT if mode == 'wb': flags |= osutils.O_BINARY elif mode != 'wt': === modified file 'bzrlib/benchmarks/bench_dirstate.py' --- bzrlib/benchmarks/bench_dirstate.py 2009-12-22 17:05:47 +0000 +++ bzrlib/benchmarks/bench_dirstate.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2009 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/branch.py' --- bzrlib/branch.py 2010-01-12 02:48:41 +0000 +++ bzrlib/branch.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/btree_index.py' --- bzrlib/btree_index.py 2009-11-07 01:58:11 +0000 +++ bzrlib/btree_index.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/bugtracker.py' --- bzrlib/bugtracker.py 2010-01-08 07:37:25 +0000 +++ bzrlib/bugtracker.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/builtins.py' --- bzrlib/builtins.py 2010-02-03 14:08:55 +0000 +++ bzrlib/builtins.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/bundle/__init__.py' --- bzrlib/bundle/__init__.py 2009-11-28 00:48:03 +0000 +++ bzrlib/bundle/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/bzrdir.py' --- bzrlib/bzrdir.py 2010-01-20 23:28:35 +0000 +++ bzrlib/bzrdir.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005-2010 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/chk_map.py' --- bzrlib/chk_map.py 2010-01-29 15:18:58 +0000 +++ bzrlib/chk_map.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/chk_serializer.py' --- bzrlib/chk_serializer.py 2009-12-03 04:55:02 +0000 +++ bzrlib/chk_serializer.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/cleanup.py' --- bzrlib/cleanup.py 2010-02-05 03:37:52 +0000 +++ bzrlib/cleanup.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/cmd_version_info.py' --- bzrlib/cmd_version_info.py 2009-11-16 02:26:32 +0000 +++ bzrlib/cmd_version_info.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/commands.py' --- bzrlib/commands.py 2010-01-11 13:15:01 +0000 +++ bzrlib/commands.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/commit.py' --- bzrlib/commit.py 2009-10-15 02:53:30 +0000 +++ bzrlib/commit.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/config.py' --- bzrlib/config.py 2009-12-17 10:01:25 +0000 +++ bzrlib/config.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # Authors: Robert Collins # and others # === modified file 'bzrlib/conflicts.py' --- bzrlib/conflicts.py 2010-01-08 07:37:25 +0000 +++ bzrlib/conflicts.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Canonical Ltd +# Copyright (C) 2005, 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/decorators.py' --- bzrlib/decorators.py 2010-01-20 16:05:28 +0000 +++ bzrlib/decorators.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/delta.py' --- bzrlib/delta.py 2009-10-29 05:54:49 +0000 +++ bzrlib/delta.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/diff.py' --- bzrlib/diff.py 2010-01-20 23:26:31 +0000 +++ bzrlib/diff.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006 Canonical Ltd. +# Copyright (C) 2005-2010 Canonical Ltd. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/doc_generate/autodoc_man.py' --- bzrlib/doc_generate/autodoc_man.py 2009-11-04 12:25:49 +0000 +++ bzrlib/doc_generate/autodoc_man.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/doc_generate/autodoc_rstx.py' --- bzrlib/doc_generate/autodoc_rstx.py 2010-01-08 07:34:31 +0000 +++ bzrlib/doc_generate/autodoc_rstx.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/errors.py' --- bzrlib/errors.py 2010-01-20 22:32:07 +0000 +++ bzrlib/errors.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/export/dir_exporter.py' --- bzrlib/export/dir_exporter.py 2009-12-18 05:38:40 +0000 +++ bzrlib/export/dir_exporter.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2009 Canonical Ltd +# Copyright (C) 2005, 2006, 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/export/zip_exporter.py' --- bzrlib/export/zip_exporter.py 2009-11-25 00:14:05 +0000 +++ bzrlib/export/zip_exporter.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005, 2006, 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/fetch.py' --- bzrlib/fetch.py 2010-01-30 09:01:03 +0000 +++ bzrlib/fetch.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008, 2009, 2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/foreign.py' --- bzrlib/foreign.py 2009-10-27 21:54:26 +0000 +++ bzrlib/foreign.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/globbing.py' --- bzrlib/globbing.py 2010-01-11 16:44:02 +0000 +++ bzrlib/globbing.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/graph.py' --- bzrlib/graph.py 2009-11-30 03:16:22 +0000 +++ bzrlib/graph.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/groupcompress.py' --- bzrlib/groupcompress.py 2009-12-01 03:35:25 +0000 +++ bzrlib/groupcompress.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/help.py' --- bzrlib/help.py 2009-12-02 15:24:34 +0000 +++ bzrlib/help.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/help_topics/__init__.py' --- bzrlib/help_topics/__init__.py 2010-02-16 16:08:40 +0000 +++ bzrlib/help_topics/__init__.py 2010-03-23 06:37:38 +0000 @@ -278,7 +278,7 @@ _basic_help = \ -"""Bazaar -- a free distributed version-control tool +"""Bazaar %s -- a free distributed version-control tool http://bazaar-vcs.org/ Basic commands: @@ -302,7 +302,7 @@ bzr help init more help on e.g. init command bzr help commands list all commands bzr help topics list all help topics -""" +""" % bzrlib.__version__ _global_options = \ === modified file 'bzrlib/hooks.py' --- bzrlib/hooks.py 2010-01-15 03:58:20 +0000 +++ bzrlib/hooks.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/index.py' --- bzrlib/index.py 2009-12-02 17:59:15 +0000 +++ bzrlib/index.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/info.py' --- bzrlib/info.py 2009-11-03 09:32:17 +0000 +++ bzrlib/info.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/inventory.py' --- bzrlib/inventory.py 2009-11-13 19:19:11 +0000 +++ bzrlib/inventory.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/knit.py' --- bzrlib/knit.py 2009-11-30 21:21:07 +0000 +++ bzrlib/knit.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/lockdir.py' --- bzrlib/lockdir.py 2010-01-15 02:27:31 +0000 +++ bzrlib/lockdir.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -252,7 +252,7 @@ if info is None: raise LockFailed(self, "lock was renamed into place, but " "now is missing!") - if info['nonce'] != self.nonce: + if info.get('nonce') != self.nonce: self._trace("rename succeeded, " "but lock is still held by someone else") raise LockContention(self) @@ -430,7 +430,7 @@ def peek(self): """Check if the lock is held by anyone. - If it is held, this returns the lock info structure as a rio Stanza, + If it is held, this returns the lock info structure as a dict which contains some information about the current lock holder. Otherwise returns None. """ @@ -459,8 +459,14 @@ return s.to_string() def _parse_info(self, info_bytes): - # TODO: Handle if info_bytes is empty - return rio.read_stanza(osutils.split_lines(info_bytes)).as_dict() + stanza = rio.read_stanza(osutils.split_lines(info_bytes)) + if stanza is None: + # see bug 185013; we fairly often end up with the info file being + # empty after an interruption; we could log a message here but + # there may not be much we can say + return {} + else: + return stanza.as_dict() def attempt_lock(self): """Take the lock; fail if it's already held. @@ -611,11 +617,16 @@ def _format_lock_info(self, info): """Turn the contents of peek() into something for the user""" lock_url = self.transport.abspath(self.path) - delta = time.time() - int(info['start_time']) + start_time = info.get('start_time') + if start_time is None: + time_ago = '(unknown)' + else: + time_ago = format_delta(time.time() - int(info['start_time'])) return [ 'lock %s' % (lock_url,), - 'held by %(user)s on host %(hostname)s [process #%(pid)s]' % info, - 'locked %s' % (format_delta(delta),), + 'held by %s on host %s [process #%s]' % + tuple([info.get(x, '') for x in ['user', 'hostname', 'pid']]), + 'locked %s' % (time_ago,), ] def validate_token(self, token): === modified file 'bzrlib/log.py' --- bzrlib/log.py 2010-02-10 13:08:45 +0000 +++ bzrlib/log.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/merge.py' --- bzrlib/merge.py 2010-02-05 03:37:52 +0000 +++ bzrlib/merge.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -130,7 +130,7 @@ """ affected_files = self.affected_files if affected_files is None: - config = self.merger.this_tree.branch.get_config() + config = self.merger.this_branch.get_config() # Until bzr provides a better policy for caching the config, we # just add the part we're interested in to the params to avoid # reading the config files repeatedly (bazaar.conf, location.conf, === modified file 'bzrlib/merge_directive.py' --- bzrlib/merge_directive.py 2009-11-28 00:48:03 +0000 +++ bzrlib/merge_directive.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/msgeditor.py' --- bzrlib/msgeditor.py 2010-01-12 04:31:02 +0000 +++ bzrlib/msgeditor.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/option.py' --- bzrlib/option.py 2009-08-18 08:10:44 +0000 +++ bzrlib/option.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/osutils.py' --- bzrlib/osutils.py 2010-01-13 15:30:22 +0000 +++ bzrlib/osutils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -85,8 +85,11 @@ # be opened in binary mode, rather than text mode. # On other platforms, O_BINARY doesn't exist, because # they always open in binary mode, so it is okay to -# OR with 0 on those platforms +# OR with 0 on those platforms. +# O_NOINHERIT and O_TEXT exists only on win32 too. O_BINARY = getattr(os, 'O_BINARY', 0) +O_TEXT = getattr(os, 'O_TEXT', 0) +O_NOINHERIT = getattr(os, 'O_NOINHERIT', 0) def get_unicode_argv(): @@ -661,7 +664,7 @@ def sha_file_by_name(fname): """Calculate the SHA1 of a file by reading the full text""" s = sha() - f = os.open(fname, os.O_RDONLY | O_BINARY) + f = os.open(fname, os.O_RDONLY | O_BINARY | O_NOINHERIT) try: while True: b = os.read(f, 1<<16) @@ -1344,6 +1347,27 @@ normalized_filename = _inaccessible_normalized_filename +def set_signal_handler(signum, handler, restart_syscall=True): + """A wrapper for signal.signal that also calls siginterrupt(signum, False) + on platforms that support that. + + :param restart_syscall: if set, allow syscalls interrupted by a signal to + automatically restart (by calling `signal.siginterrupt(signum, + False)`). May be ignored if the feature is not available on this + platform or Python version. + """ + old_handler = signal.signal(signum, handler) + if restart_syscall: + try: + siginterrupt = signal.siginterrupt + except AttributeError: # siginterrupt doesn't exist on this platform, or for this version of + # Python. + pass + else: + siginterrupt(signum, False) + return old_handler + + default_terminal_width = 80 """The default terminal width for ttys. @@ -1438,12 +1462,21 @@ if width is not None: os.environ['COLUMNS'] = str(width) -if sys.platform == 'win32': - # Martin (gz) mentioned WINDOW_BUFFER_SIZE_RECORD from ReadConsoleInput but - # I've no idea how to plug that in the current design -- vila 20091216 - pass -else: - signal.signal(signal.SIGWINCH, _terminal_size_changed) + +_registered_sigwinch = False + +def watch_sigwinch(): + """Register for SIGWINCH, once and only once.""" + global _registered_sigwinch + if not _registered_sigwinch: + if sys.platform == 'win32': + # Martin (gz) mentioned WINDOW_BUFFER_SIZE_RECORD from + # ReadConsoleInput but I've no idea how to plug that in + # the current design -- vila 20091216 + pass + else: + set_signal_handler(signal.SIGWINCH, _terminal_size_changed) + _registered_sigwinch = True def supports_executable(): @@ -2106,3 +2139,46 @@ else: data, _ = self.encode(object, self.errors) self.stream.write(data) + +if sys.platform == 'win32': + def open_file(filename, mode='r', bufsize=-1): + """This function is used to override the ``open`` builtin. + + But it uses O_NOINHERIT flag so the file handle is not inherited by + child processes. Deleting or renaming a closed file opened with this + function is not blocking child processes. + """ + writing = 'w' in mode + appending = 'a' in mode + updating = '+' in mode + binary = 'b' in mode + + flags = O_NOINHERIT + # see http://msdn.microsoft.com/en-us/library/yeby3zcb%28VS.71%29.aspx + # for flags for each modes. + if binary: + flags |= O_BINARY + else: + flags |= O_TEXT + + if writing: + if updating: + flags |= os.O_RDWR + else: + flags |= os.O_WRONLY + flags |= os.O_CREAT | os.O_TRUNC + elif appending: + if updating: + flags |= os.O_RDWR + else: + flags |= os.O_WRONLY + flags |= os.O_CREAT | os.O_APPEND + else: #reading + if updating: + flags |= os.O_RDWR + else: + flags |= os.O_RDONLY + + return os.fdopen(os.open(filename, flags), mode, bufsize) +else: + open_file = open === modified file 'bzrlib/patches.py' --- bzrlib/patches.py 2009-11-03 15:45:56 +0000 +++ bzrlib/patches.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004 - 2006, 2008 Aaron Bentley, Canonical Ltd +# Copyright (C) 2005-2010 Aaron Bentley, Canonical Ltd # # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/plugins/launchpad/__init__.py' --- bzrlib/plugins/launchpad/__init__.py 2009-12-17 04:35:06 +0000 +++ bzrlib/plugins/launchpad/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 - 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/plugins/launchpad/lp_api.py' --- bzrlib/plugins/launchpad/lp_api.py 2009-12-17 03:40:41 +0000 +++ bzrlib/plugins/launchpad/lp_api.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/plugins/launchpad/lp_directory.py' --- bzrlib/plugins/launchpad/lp_directory.py 2009-07-03 14:24:23 +0000 +++ bzrlib/plugins/launchpad/lp_directory.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/plugins/launchpad/lp_registration.py' --- bzrlib/plugins/launchpad/lp_registration.py 2009-12-09 09:20:42 +0000 +++ bzrlib/plugins/launchpad/lp_registration.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/plugins/launchpad/test_lp_api.py' --- bzrlib/plugins/launchpad/test_lp_api.py 2009-12-17 04:35:06 +0000 +++ bzrlib/plugins/launchpad/test_lp_api.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/plugins/launchpad/test_lp_directory.py' --- bzrlib/plugins/launchpad/test_lp_directory.py 2010-01-07 03:03:01 +0000 +++ bzrlib/plugins/launchpad/test_lp_directory.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/plugins/launchpad/test_lp_open.py' --- bzrlib/plugins/launchpad/test_lp_open.py 2009-12-08 10:04:18 +0000 +++ bzrlib/plugins/launchpad/test_lp_open.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/reconcile.py' --- bzrlib/reconcile.py 2010-01-07 01:30:20 +0000 +++ bzrlib/reconcile.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/remote.py' --- bzrlib/remote.py 2010-01-20 16:47:49 +0000 +++ bzrlib/remote.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/repository.py' --- bzrlib/repository.py 2010-01-15 07:00:49 +0000 +++ bzrlib/repository.py 2010-03-23 06:39:05 +0000 @@ -3086,8 +3086,8 @@ # Does the repository inventory storage understand references to trees? supports_tree_reference = None - def __str__(self): - return "<%s>" % self.__class__.__name__ + def __repr__(self): + return "%s()" % self.__class__.__name__ def __eq__(self, other): # format objects are generally stateless @@ -3425,7 +3425,13 @@ provided a default one will be created. :return: None. """ - f = _mod_fetch.RepoFetcher(to_repository=self.target, + from bzrlib.fetch import RepoFetcher + # See asking for a warning here + if self.source._format.network_name() != self.target._format.network_name(): + ui.ui_factory.show_user_warning('cross_format_fetch', + from_format=self.source._format, + to_format=self.target._format) + f = RepoFetcher(to_repository=self.target, from_repository=self.source, last_revision=revision_id, fetch_spec=fetch_spec, @@ -4009,18 +4015,17 @@ """See InterRepository.fetch().""" if fetch_spec is not None: raise AssertionError("Not implemented yet...") - # See asking for a warning here - # - # nb this is only active for local-local fetches; other things using - # streaming. - ui.ui_factory.warn_cross_format_fetch(self.source._format, - self.target._format) if (not self.source.supports_rich_root() and self.target.supports_rich_root()): self._converting_to_rich_root = True self._revision_id_to_root_id = {} else: self._converting_to_rich_root = False + # See asking for a warning here + if self.source._format.network_name() != self.target._format.network_name(): + ui.ui_factory.show_user_warning('cross_format_fetch', + from_format=self.source._format, + to_format=self.target._format) revision_ids = self.target.search_missing_revision_ids(self.source, revision_id, find_ghosts=find_ghosts).get_keys() if not revision_ids: @@ -4313,8 +4318,6 @@ self._extract_and_insert_inventories( substream, src_serializer) elif substream_type == 'inventory-deltas': - ui.ui_factory.warn_cross_format_fetch(src_format, - self.target_repo._format) self._extract_and_insert_inventory_deltas( substream, src_serializer) elif substream_type == 'chk_bytes': === modified file 'bzrlib/revision.py' --- bzrlib/revision.py 2009-11-30 12:24:55 +0000 +++ bzrlib/revision.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/revisionspec.py' --- bzrlib/revisionspec.py 2009-10-27 14:04:29 +0000 +++ bzrlib/revisionspec.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/revisiontree.py' --- bzrlib/revisiontree.py 2010-01-20 23:21:35 +0000 +++ bzrlib/revisiontree.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/serializer.py' --- bzrlib/serializer.py 2009-12-03 04:55:02 +0000 +++ bzrlib/serializer.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/shellcomplete.py' --- bzrlib/shellcomplete.py 2009-11-02 22:24:29 +0000 +++ bzrlib/shellcomplete.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005, 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/bzrdir.py' --- bzrlib/smart/bzrdir.py 2010-01-12 01:10:03 +0000 +++ bzrlib/smart/bzrdir.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/client.py' --- bzrlib/smart/client.py 2010-01-15 06:55:33 +0000 +++ bzrlib/smart/client.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/medium.py' --- bzrlib/smart/medium.py 2010-01-15 07:26:46 +0000 +++ bzrlib/smart/medium.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/protocol.py' --- bzrlib/smart/protocol.py 2009-12-21 17:00:29 +0000 +++ bzrlib/smart/protocol.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/repository.py' --- bzrlib/smart/repository.py 2010-01-14 07:34:37 +0000 +++ bzrlib/smart/repository.py 2010-03-23 06:37:50 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2010 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -503,13 +503,6 @@ yield pack_writer.begin() yield pack_writer.bytes_record(src_format.network_name(), '') for substream_type, substream in stream: - if substream_type == 'inventory-deltas': - # This doesn't feel like the ideal place to issue this warning; - # however we don't want to do it in the Repository that's - # generating the stream, because that might be on the server. - # Instead we try to observe it as the stream goes by. - ui.ui_factory.warn_cross_format_fetch(src_format, - '(remote)') for record in substream: if record.storage_kind in ('chunked', 'fulltext'): serialised = record_to_fulltext_bytes(record) === modified file 'bzrlib/smart/request.py' --- bzrlib/smart/request.py 2010-01-11 05:58:22 +0000 +++ bzrlib/smart/request.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/server.py' --- bzrlib/smart/server.py 2010-01-07 03:03:01 +0000 +++ bzrlib/smart/server.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/smart/vfs.py' --- bzrlib/smart/vfs.py 2009-10-23 04:22:05 +0000 +++ bzrlib/smart/vfs.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/static_tuple.py' --- bzrlib/static_tuple.py 2009-11-28 21:54:08 +0000 +++ bzrlib/static_tuple.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/status.py' --- bzrlib/status.py 2009-12-02 15:24:34 +0000 +++ bzrlib/status.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/switch.py' --- bzrlib/switch.py 2010-01-12 03:53:21 +0000 +++ bzrlib/switch.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd. +# Copyright (C) 2007, 2009, 2010 Canonical Ltd. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/TestUtil.py' --- bzrlib/tests/TestUtil.py 2009-12-05 09:04:19 +0000 +++ bzrlib/tests/TestUtil.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # Author: Robert Collins # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/blackbox/test_add.py' --- bzrlib/tests/blackbox/test_add.py 2009-11-08 00:05:26 +0000 +++ bzrlib/tests/blackbox/test_add.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_annotate.py' --- bzrlib/tests/blackbox/test_annotate.py 2010-01-07 12:32:37 +0000 +++ bzrlib/tests/blackbox/test_annotate.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # -*- coding: utf-8 -*- # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/blackbox/test_branch.py' --- bzrlib/tests/blackbox/test_branch.py 2010-01-12 06:39:06 +0000 +++ bzrlib/tests/blackbox/test_branch.py 2010-03-23 06:37:50 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -325,6 +325,8 @@ ' Packs 5 (adds stacking support, requires bzr 1.6)\n' 'Source branch format does not support stacking, using format:\n' ' Branch format 7\n' + 'Doing on-the-fly conversion from RepositoryFormatKnitPack1() to RepositoryFormatKnitPack5().\n' + 'This may take some time. Upgrade the repositories to the same format for better performance.\n' 'Created new stacked branch referring to %s.\n' % (trunk.base,), err) @@ -338,6 +340,8 @@ ' Packs 5 rich-root (adds stacking support, requires bzr 1.6.1)\n' 'Source branch format does not support stacking, using format:\n' ' Branch format 7\n' + 'Doing on-the-fly conversion from RepositoryFormatKnitPack4() to RepositoryFormatKnitPack5RichRoot().\n' + 'This may take some time. Upgrade the repositories to the same format for better performance.\n' 'Created new stacked branch referring to %s.\n' % (trunk.base,), err) === modified file 'bzrlib/tests/blackbox/test_cat.py' --- bzrlib/tests/blackbox/test_cat.py 2010-01-12 07:02:54 +0000 +++ bzrlib/tests/blackbox/test_cat.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # -*- coding: utf-8 -*- # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/blackbox/test_checkout.py' --- bzrlib/tests/blackbox/test_checkout.py 2009-12-01 06:07:41 +0000 +++ bzrlib/tests/blackbox/test_checkout.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2009 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_commit.py' --- bzrlib/tests/blackbox/test_commit.py 2009-12-07 10:38:09 +0000 +++ bzrlib/tests/blackbox/test_commit.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_debug.py' --- bzrlib/tests/blackbox/test_debug.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/blackbox/test_debug.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_exceptions.py' --- bzrlib/tests/blackbox/test_exceptions.py 2009-12-22 23:09:50 +0000 +++ bzrlib/tests/blackbox/test_exceptions.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_export.py' --- bzrlib/tests/blackbox/test_export.py 2009-11-25 00:14:05 +0000 +++ bzrlib/tests/blackbox/test_export.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_filtered_view_ops.py' --- bzrlib/tests/blackbox/test_filtered_view_ops.py 2009-12-14 15:51:36 +0000 +++ bzrlib/tests/blackbox/test_filtered_view_ops.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_help.py' --- bzrlib/tests/blackbox/test_help.py 2010-01-14 16:41:04 +0000 +++ bzrlib/tests/blackbox/test_help.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_ignore.py' --- bzrlib/tests/blackbox/test_ignore.py 2009-10-23 10:41:15 +0000 +++ bzrlib/tests/blackbox/test_ignore.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_info.py' --- bzrlib/tests/blackbox/test_info.py 2010-01-20 23:28:35 +0000 +++ bzrlib/tests/blackbox/test_info.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_init.py' --- bzrlib/tests/blackbox/test_init.py 2009-11-08 02:23:13 +0000 +++ bzrlib/tests/blackbox/test_init.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_log.py' --- bzrlib/tests/blackbox/test_log.py 2009-11-01 03:45:20 +0000 +++ bzrlib/tests/blackbox/test_log.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_ls.py' --- bzrlib/tests/blackbox/test_ls.py 2009-11-30 00:33:52 +0000 +++ bzrlib/tests/blackbox/test_ls.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_merge.py' --- bzrlib/tests/blackbox/test_merge.py 2009-12-10 17:16:19 +0000 +++ bzrlib/tests/blackbox/test_merge.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_mv.py' --- bzrlib/tests/blackbox/test_mv.py 2009-11-17 01:08:08 +0000 +++ bzrlib/tests/blackbox/test_mv.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_non_ascii.py' --- bzrlib/tests/blackbox/test_non_ascii.py 2010-01-06 05:06:56 +0000 +++ bzrlib/tests/blackbox/test_non_ascii.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_pull.py' --- bzrlib/tests/blackbox/test_pull.py 2010-01-15 03:34:28 +0000 +++ bzrlib/tests/blackbox/test_pull.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_push.py' --- bzrlib/tests/blackbox/test_push.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/blackbox/test_push.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_remerge.py' --- bzrlib/tests/blackbox/test_remerge.py 2009-12-10 23:11:35 +0000 +++ bzrlib/tests/blackbox/test_remerge.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_selftest.py' --- bzrlib/tests/blackbox/test_selftest.py 2010-02-03 14:08:55 +0000 +++ bzrlib/tests/blackbox/test_selftest.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_send.py' --- bzrlib/tests/blackbox/test_send.py 2009-11-28 00:48:03 +0000 +++ bzrlib/tests/blackbox/test_send.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # Authors: Aaron Bentley # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/blackbox/test_serve.py' --- bzrlib/tests/blackbox/test_serve.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/blackbox/test_serve.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_shared_repository.py' --- bzrlib/tests/blackbox/test_shared_repository.py 2010-01-12 01:10:03 +0000 +++ bzrlib/tests/blackbox/test_shared_repository.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_shelve.py' --- bzrlib/tests/blackbox/test_shelve.py 2009-12-11 05:48:21 +0000 +++ bzrlib/tests/blackbox/test_shelve.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_switch.py' --- bzrlib/tests/blackbox/test_switch.py 2010-01-12 03:53:21 +0000 +++ bzrlib/tests/blackbox/test_switch.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # -*- coding: utf-8 -*- # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/blackbox/test_too_much.py' --- bzrlib/tests/blackbox/test_too_much.py 2009-12-02 15:24:34 +0000 +++ bzrlib/tests/blackbox/test_too_much.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/blackbox/test_update.py' --- bzrlib/tests/blackbox/test_update.py 2009-12-23 06:31:19 +0000 +++ bzrlib/tests/blackbox/test_update.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # -*- coding: utf-8 -*- # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/commands/test_branch.py' --- bzrlib/tests/commands/test_branch.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_branch.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_cat.py' --- bzrlib/tests/commands/test_cat.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_cat.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_checkout.py' --- bzrlib/tests/commands/test_checkout.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_checkout.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_commit.py' --- bzrlib/tests/commands/test_commit.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_commit.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_init.py' --- bzrlib/tests/commands/test_init.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_init.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_init_repository.py' --- bzrlib/tests/commands/test_init_repository.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_init_repository.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_merge.py' --- bzrlib/tests/commands/test_merge.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_merge.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_missing.py' --- bzrlib/tests/commands/test_missing.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_missing.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_pull.py' --- bzrlib/tests/commands/test_pull.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_pull.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_push.py' --- bzrlib/tests/commands/test_push.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_push.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/commands/test_update.py' --- bzrlib/tests/commands/test_update.py 2010-01-11 12:37:53 +0000 +++ bzrlib/tests/commands/test_update.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/features.py' --- bzrlib/tests/features.py 2009-12-22 15:39:20 +0000 +++ bzrlib/tests/features.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/ftp_server/__init__.py' --- bzrlib/tests/ftp_server/__init__.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/ftp_server/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/ftp_server/medusa_based.py' --- bzrlib/tests/ftp_server/medusa_based.py 2010-01-08 03:35:09 +0000 +++ bzrlib/tests/ftp_server/medusa_based.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/ftp_server/pyftpdlib_based.py' --- bzrlib/tests/ftp_server/pyftpdlib_based.py 2010-01-13 15:30:22 +0000 +++ bzrlib/tests/ftp_server/pyftpdlib_based.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/http_server.py' --- bzrlib/tests/http_server.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/http_server.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/http_utils.py' --- bzrlib/tests/http_utils.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/http_utils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_branch/test_hooks.py' --- bzrlib/tests/per_branch/test_hooks.py 2010-01-08 05:28:17 +0000 +++ bzrlib/tests/per_branch/test_hooks.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_branch/test_iter_merge_sorted_revisions.py' --- bzrlib/tests/per_branch/test_iter_merge_sorted_revisions.py 2009-12-03 23:34:38 +0000 +++ bzrlib/tests/per_branch/test_iter_merge_sorted_revisions.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_branch/test_parent.py' --- bzrlib/tests/per_branch/test_parent.py 2009-11-08 03:00:33 +0000 +++ bzrlib/tests/per_branch/test_parent.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006 Canonical Ltd +# Copyright (C) 2005, 2006, 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_branch/test_push.py' --- bzrlib/tests/per_branch/test_push.py 2010-01-15 05:11:41 +0000 +++ bzrlib/tests/per_branch/test_push.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_bzrdir/test_bzrdir.py' --- bzrlib/tests/per_bzrdir/test_bzrdir.py 2010-01-08 06:28:53 +0000 +++ bzrlib/tests/per_bzrdir/test_bzrdir.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_foreign_vcs/__init__.py' --- bzrlib/tests/per_foreign_vcs/__init__.py 2009-11-12 22:57:55 +0000 +++ bzrlib/tests/per_foreign_vcs/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_foreign_vcs/test_repository.py' --- bzrlib/tests/per_foreign_vcs/test_repository.py 2009-11-27 03:25:07 +0000 +++ bzrlib/tests/per_foreign_vcs/test_repository.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_interbranch/test_push.py' --- bzrlib/tests/per_interbranch/test_push.py 2010-01-18 17:13:50 +0000 +++ bzrlib/tests/per_interbranch/test_push.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2007, 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_intertree/__init__.py' --- bzrlib/tests/per_intertree/__init__.py 2009-11-12 23:10:43 +0000 +++ bzrlib/tests/per_intertree/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_merger.py' --- bzrlib/tests/per_merger.py 2010-01-28 17:27:16 +0000 +++ bzrlib/tests/per_merger.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_pack_repository.py' --- bzrlib/tests/per_pack_repository.py 2010-01-04 02:25:11 +0000 +++ bzrlib/tests/per_pack_repository.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_repository/test_check.py' --- bzrlib/tests/per_repository/test_check.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/per_repository/test_check.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_repository/test_check_reconcile.py' --- bzrlib/tests/per_repository/test_check_reconcile.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/per_repository/test_check_reconcile.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_repository/test_commit_builder.py' --- bzrlib/tests/per_repository/test_commit_builder.py 2009-11-19 15:06:47 +0000 +++ bzrlib/tests/per_repository/test_commit_builder.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_repository/test_repository.py' --- bzrlib/tests/per_repository/test_repository.py 2009-11-11 22:46:53 +0000 +++ bzrlib/tests/per_repository/test_repository.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_repository_reference/test_check.py' --- bzrlib/tests/per_repository_reference/test_check.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/per_repository_reference/test_check.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_transport.py' --- bzrlib/tests/per_transport.py 2010-01-07 16:27:12 +0000 +++ bzrlib/tests/per_transport.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_tree/test_get_file_with_stat.py' --- bzrlib/tests/per_tree/test_get_file_with_stat.py 2009-11-18 15:47:16 +0000 +++ bzrlib/tests/per_tree/test_get_file_with_stat.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_tree/test_iter_search_rules.py' --- bzrlib/tests/per_tree/test_iter_search_rules.py 2009-12-03 05:21:09 +0000 +++ bzrlib/tests/per_tree/test_iter_search_rules.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_tree/test_path_content_summary.py' --- bzrlib/tests/per_tree/test_path_content_summary.py 2009-11-10 19:38:37 +0000 +++ bzrlib/tests/per_tree/test_path_content_summary.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2009 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_uifactory/__init__.py' --- bzrlib/tests/per_uifactory/__init__.py 2010-01-15 07:45:10 +0000 +++ bzrlib/tests/per_uifactory/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2010 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_versionedfile.py' --- bzrlib/tests/per_versionedfile.py 2009-10-26 06:44:40 +0000 +++ bzrlib/tests/per_versionedfile.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # Authors: # Johan Rydberg === modified file 'bzrlib/tests/per_workingtree/test_content_filters.py' --- bzrlib/tests/per_workingtree/test_content_filters.py 2009-10-28 23:34:13 +0000 +++ bzrlib/tests/per_workingtree/test_content_filters.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/per_workingtree/test_is_ignored.py' --- bzrlib/tests/per_workingtree/test_is_ignored.py 2010-01-01 21:26:25 +0000 +++ bzrlib/tests/per_workingtree/test_is_ignored.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd # Authors: Robert Collins # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/per_workingtree/test_smart_add.py' --- bzrlib/tests/per_workingtree/test_smart_add.py 2009-11-08 04:49:06 +0000 +++ bzrlib/tests/per_workingtree/test_smart_add.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/script.py' --- bzrlib/tests/script.py 2010-01-13 17:21:29 +0000 +++ bzrlib/tests/script.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/stub_sftp.py' --- bzrlib/tests/stub_sftp.py 2010-02-03 14:08:55 +0000 +++ bzrlib/tests/stub_sftp.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Robey Pointer , Canonical Ltd +# Copyright (C) 2005, 2006, 2008, 2009, 2010 Robey Pointer , Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -297,14 +297,14 @@ threading.Thread(target=self._callback, args=(s,)).start() except socket.error, x: sys.excepthook(*sys.exc_info()) - warning('Socket error during accept() within unit test server' - ' thread: %r' % x) + trace.warning('Socket error during accept() ' + 'within unit test server thread: %r' % x) except Exception, x: # probably a failed test; unit test thread will log the # failure/error sys.excepthook(*sys.exc_info()) - warning('Exception from within unit test server thread: %r' % - x) + trace.warning( + 'Exception from within unit test server thread: %r' % x) class SocketDelay(object): @@ -438,13 +438,15 @@ if not (backing_server is None or isinstance(backing_server, local.LocalURLServer)): raise AssertionError( - "backing_server should not be %r, because this can only serve the " - "local current working directory." % (backing_server,)) + 'backing_server should not be %r, because this can only serve ' + 'the local current working directory.' % (backing_server,)) self._original_vendor = ssh._ssh_vendor_manager._cached_ssh_vendor ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor + # FIXME: the following block should certainly just be self._homedir = + # osutils.getcwd() but that fails badly on Unix -- vila 20100224 if sys.platform == 'win32': # Win32 needs to use the UNICODE api - self._homedir = getcwd() + self._homedir = os.getcwdu() else: # But Linux SFTP servers should just deal in bytestreams self._homedir = os.getcwd() === modified file 'bzrlib/tests/test__annotator.py' --- bzrlib/tests/test__annotator.py 2009-12-22 16:47:36 +0000 +++ bzrlib/tests/test__annotator.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__bencode.py' --- bzrlib/tests/test__bencode.py 2009-12-23 04:19:34 +0000 +++ bzrlib/tests/test__bencode.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2009 Canonical Ltd +# Copyright (C) 2007, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__chk_map.py' --- bzrlib/tests/test__chk_map.py 2009-12-22 16:28:47 +0000 +++ bzrlib/tests/test__chk_map.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__chunks_to_lines.py' --- bzrlib/tests/test__chunks_to_lines.py 2009-12-22 17:14:45 +0000 +++ bzrlib/tests/test__chunks_to_lines.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__dirstate_helpers.py' --- bzrlib/tests/test__dirstate_helpers.py 2010-01-05 07:22:59 +0000 +++ bzrlib/tests/test__dirstate_helpers.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__groupcompress.py' --- bzrlib/tests/test__groupcompress.py 2009-12-22 15:50:40 +0000 +++ bzrlib/tests/test__groupcompress.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__known_graph.py' --- bzrlib/tests/test__known_graph.py 2009-12-22 15:50:40 +0000 +++ bzrlib/tests/test__known_graph.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__rio.py' --- bzrlib/tests/test__rio.py 2009-12-22 16:28:47 +0000 +++ bzrlib/tests/test__rio.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__simple_set.py' --- bzrlib/tests/test__simple_set.py 2009-12-22 15:50:40 +0000 +++ bzrlib/tests/test__simple_set.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test__static_tuple.py' --- bzrlib/tests/test__static_tuple.py 2009-12-22 16:28:47 +0000 +++ bzrlib/tests/test__static_tuple.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -77,9 +77,9 @@ def test_create_bad_args(self): args_256 = ['a']*256 # too many args - self.assertRaises(ValueError, self.module.StaticTuple, *args_256) + self.assertRaises(TypeError, self.module.StaticTuple, *args_256) args_300 = ['a']*300 - self.assertRaises(ValueError, self.module.StaticTuple, *args_300) + self.assertRaises(TypeError, self.module.StaticTuple, *args_300) # not a string self.assertRaises(TypeError, self.module.StaticTuple, object()) === modified file 'bzrlib/tests/test__walkdirs_win32.py' --- bzrlib/tests/test__walkdirs_win32.py 2009-12-21 18:03:49 +0000 +++ bzrlib/tests/test__walkdirs_win32.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_btree_index.py' --- bzrlib/tests/test_btree_index.py 2009-12-22 15:50:40 +0000 +++ bzrlib/tests/test_btree_index.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_bundle.py' --- bzrlib/tests/test_bundle.py 2010-01-08 02:43:49 +0000 +++ bzrlib/tests/test_bundle.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_bzrdir.py' --- bzrlib/tests/test_bzrdir.py 2010-01-08 07:34:31 +0000 +++ bzrlib/tests/test_bzrdir.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_chk_map.py' --- bzrlib/tests/test_chk_map.py 2010-01-29 15:18:58 +0000 +++ bzrlib/tests/test_chk_map.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_cleanup.py' --- bzrlib/tests/test_cleanup.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/test_cleanup.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_commit.py' --- bzrlib/tests/test_commit.py 2009-10-29 05:54:49 +0000 +++ bzrlib/tests/test_commit.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_config.py' --- bzrlib/tests/test_config.py 2009-12-22 23:09:50 +0000 +++ bzrlib/tests/test_config.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_conflicts.py' --- bzrlib/tests/test_conflicts.py 2010-01-04 14:56:59 +0000 +++ bzrlib/tests/test_conflicts.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_crash.py' --- bzrlib/tests/test_crash.py 2009-12-22 15:39:20 +0000 +++ bzrlib/tests/test_crash.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_diff.py' --- bzrlib/tests/test_diff.py 2009-12-22 15:50:40 +0000 +++ bzrlib/tests/test_diff.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_directory_service.py' --- bzrlib/tests/test_directory_service.py 2009-11-10 04:58:31 +0000 +++ bzrlib/tests/test_directory_service.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_errors.py' --- bzrlib/tests/test_errors.py 2010-01-20 22:32:07 +0000 +++ bzrlib/tests/test_errors.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_foreign.py' --- bzrlib/tests/test_foreign.py 2009-12-25 13:47:23 +0000 +++ bzrlib/tests/test_foreign.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_globbing.py' --- bzrlib/tests/test_globbing.py 2010-01-11 16:44:02 +0000 +++ bzrlib/tests/test_globbing.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # -*- coding: utf-8 -*- # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/test_graph.py' --- bzrlib/tests/test_graph.py 2009-11-30 03:16:22 +0000 +++ bzrlib/tests/test_graph.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_groupcompress.py' --- bzrlib/tests/test_groupcompress.py 2009-12-22 16:40:48 +0000 +++ bzrlib/tests/test_groupcompress.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_hooks.py' --- bzrlib/tests/test_hooks.py 2009-11-03 09:32:17 +0000 +++ bzrlib/tests/test_hooks.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_http.py' --- bzrlib/tests/test_http.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/test_http.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_http_response.py' --- bzrlib/tests/test_http_response.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/test_http_response.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_ignores.py' --- bzrlib/tests/test_ignores.py 2010-01-05 19:29:07 +0000 +++ bzrlib/tests/test_ignores.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_index.py' --- bzrlib/tests/test_index.py 2009-11-07 01:58:11 +0000 +++ bzrlib/tests/test_index.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_info.py' --- bzrlib/tests/test_info.py 2010-01-21 08:53:42 +0000 +++ bzrlib/tests/test_info.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_knit.py' --- bzrlib/tests/test_knit.py 2009-12-22 16:40:48 +0000 +++ bzrlib/tests/test_knit.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_lockable_files.py' --- bzrlib/tests/test_lockable_files.py 2010-01-06 04:48:59 +0000 +++ bzrlib/tests/test_lockable_files.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_lockdir.py' --- bzrlib/tests/test_lockdir.py 2010-01-15 02:27:31 +0000 +++ bzrlib/tests/test_lockdir.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2010 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -666,6 +666,25 @@ # no kibble check_dir(['held']) + def test_no_lockdir_info(self): + """We can cope with empty info files.""" + # This seems like a fairly common failure case - see + # and all its dupes. + # Processes are often interrupted after opening the file + # before the actual contents are committed. + t = self.get_transport() + t.mkdir('test_lock') + t.mkdir('test_lock/held') + t.put_bytes('test_lock/held/info', '') + lf = LockDir(t, 'test_lock') + info = lf.peek() + formatted_info = lf._format_lock_info(info) + self.assertEquals( + ['lock %s' % t.abspath('test_lock'), + 'held by on host [process #]', + 'locked (unknown)'], + formatted_info) + class TestLockDirHooks(TestCaseWithTransport): === modified file 'bzrlib/tests/test_log.py' --- bzrlib/tests/test_log.py 2010-01-05 02:13:02 +0000 +++ bzrlib/tests/test_log.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_merge.py' --- bzrlib/tests/test_merge.py 2010-02-02 08:36:12 +0000 +++ bzrlib/tests/test_merge.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -2894,6 +2894,11 @@ base=False, other=False) return builder + def test_uses_this_branch(self): + builder = self.make_text_conflict() + tt = builder.make_preview_transform() + self.addCleanup(tt.finalize) + def test_affected_files_cached(self): """Ensures that the config variable is cached""" builder = self.make_text_conflict() === modified file 'bzrlib/tests/test_merge_core.py' --- bzrlib/tests/test_merge_core.py 2010-02-02 08:36:12 +0000 +++ bzrlib/tests/test_merge_core.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -73,6 +73,16 @@ new_file(tt) def merge(self, merge_type=Merge3Merger, interesting_ids=None, **kwargs): + merger = self.make_merger(merge_type, interesting_ids, **kwargs) + merger.do_merge() + return merger.cooked_conflicts + + def make_preview_transform(self): + merger = self.make_merger(Merge3Merger, None, this_revision_tree=True) + return merger.make_preview_transform() + + def make_merger(self, merge_type, interesting_ids, + this_revision_tree=False, **kwargs): self.base_tt.apply() self.base.commit('base commit') for tt, wt in ((self.this_tt, self.this), (self.other_tt, self.other)): @@ -89,9 +99,15 @@ raise AssertionError() self.this.branch.fetch(self.other.branch) other_basis = self.other.branch.basis_tree() - merger = merge_type(self.this, self.this, self.base, other_basis, - interesting_ids=interesting_ids, **kwargs) - return merger.cooked_conflicts + if this_revision_tree: + self.this.commit('message') + this_tree = self.this.basis_tree() + else: + this_tree = self.this + merger = merge_type(this_tree, self.this, self.base, other_basis, + interesting_ids=interesting_ids, do_merge=False, + this_branch=self.this.branch, **kwargs) + return merger def list_transforms(self): return [self.this_tt, self.base_tt, self.other_tt] === modified file 'bzrlib/tests/test_msgeditor.py' --- bzrlib/tests/test_msgeditor.py 2009-11-17 23:05:04 +0000 +++ bzrlib/tests/test_msgeditor.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_osutils.py' --- bzrlib/tests/test_osutils.py 2010-01-06 22:17:10 +0000 +++ bzrlib/tests/test_osutils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_patches.py' --- bzrlib/tests/test_patches.py 2009-11-03 15:45:56 +0000 +++ bzrlib/tests/test_patches.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004 - 2008 Aaron Bentley, Canonical Ltd +# Copyright (C) 2005-2010 Aaron Bentley, Canonical Ltd # # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/test_progress.py' --- bzrlib/tests/test_progress.py 2009-12-09 07:58:06 +0000 +++ bzrlib/tests/test_progress.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_remote.py' --- bzrlib/tests/test_remote.py 2010-01-20 16:47:49 +0000 +++ bzrlib/tests/test_remote.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_revisionspec.py' --- bzrlib/tests/test_revisionspec.py 2009-10-10 05:07:35 +0000 +++ bzrlib/tests/test_revisionspec.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_revisiontree.py' --- bzrlib/tests/test_revisiontree.py 2010-01-20 23:21:35 +0000 +++ bzrlib/tests/test_revisiontree.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006, 2008, 2009, 2010 Canonical Ltd # Authors: Robert Collins # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/test_script.py' --- bzrlib/tests/test_script.py 2010-01-13 17:21:29 +0000 +++ bzrlib/tests/test_script.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_selftest.py' --- bzrlib/tests/test_selftest.py 2010-02-03 14:08:55 +0000 +++ bzrlib/tests/test_selftest.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_sftp_transport.py' --- bzrlib/tests/test_sftp_transport.py 2010-02-03 14:08:55 +0000 +++ bzrlib/tests/test_sftp_transport.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Robey Pointer +# Copyright (C) 2005-2010 Robey Pointer # Copyright (C) 2005, 2006, 2007 Canonical Ltd # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/tests/test_shelf_ui.py' --- bzrlib/tests/test_shelf_ui.py 2010-01-12 22:36:23 +0000 +++ bzrlib/tests/test_shelf_ui.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_smart.py' --- bzrlib/tests/test_smart.py 2010-01-11 05:58:22 +0000 +++ bzrlib/tests/test_smart.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_smart_transport.py' --- bzrlib/tests/test_smart_transport.py 2010-01-07 03:03:01 +0000 +++ bzrlib/tests/test_smart_transport.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_source.py' --- bzrlib/tests/test_source.py 2010-01-05 05:28:42 +0000 +++ bzrlib/tests/test_source.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_ssh_transport.py' --- bzrlib/tests/test_ssh_transport.py 2009-11-07 08:02:13 +0000 +++ bzrlib/tests/test_ssh_transport.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_trace.py' --- bzrlib/tests/test_trace.py 2010-01-12 06:30:41 +0000 +++ bzrlib/tests/test_trace.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_transport.py' --- bzrlib/tests/test_transport.py 2010-02-03 14:08:55 +0000 +++ bzrlib/tests/test_transport.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_transport_log.py' --- bzrlib/tests/test_transport_log.py 2009-12-16 22:29:31 +0000 +++ bzrlib/tests/test_transport_log.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_ui.py' --- bzrlib/tests/test_ui.py 2010-01-15 03:29:33 +0000 +++ bzrlib/tests/test_ui.py 2010-03-24 05:14:08 +0000 @@ -21,8 +21,12 @@ import re import time +from StringIO import StringIO + from bzrlib import ( errors, + remote, + repository, tests, ui as _mod_ui, ) @@ -259,6 +263,32 @@ self.assertIsInstance(ui_factory._progress_view, _mod_ui_text.NullProgressView) + def test_text_ui_show_user_warning(self): + from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a + from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack5 + err = StringIO() + out = StringIO() + ui = tests.TextUIFactory(stdin=None, stdout=out, stderr=err) + remote_fmt = remote.RemoteRepositoryFormat() + remote_fmt._network_name = RepositoryFormatKnitPack5().network_name() + ui.show_user_warning('cross_format_fetch', from_format=RepositoryFormat2a(), + to_format=remote_fmt) + self.assertEquals('', out.getvalue()) + self.assertEquals("Doing on-the-fly conversion from RepositoryFormat2a() to " + "RemoteRepositoryFormat(_network_name='Bazaar RepositoryFormatKnitPack5 " + "(bzr 1.6)\\n').\nThis may take some time. Upgrade the repositories to " + "the same format for better performance.\n", + err.getvalue()) + # and now with it suppressed please + err = StringIO() + out = StringIO() + ui = tests.TextUIFactory(stdin=None, stdout=out, stderr=err) + ui.suppressed_warnings.add('cross_format_fetch') + ui.show_user_warning('cross_format_fetch', from_format=RepositoryFormat2a(), + to_format=remote_fmt) + self.assertEquals('', out.getvalue()) + self.assertEquals('', err.getvalue()) + class TestTextUIOutputStream(tests.TestCase): """Tests for output stream that synchronizes with progress bar.""" === modified file 'bzrlib/tests/test_urlutils.py' --- bzrlib/tests/test_urlutils.py 2009-11-26 04:01:58 +0000 +++ bzrlib/tests/test_urlutils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_version.py' --- bzrlib/tests/test_version.py 2009-12-02 16:36:22 +0000 +++ bzrlib/tests/test_version.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006 Canonical Ltd +# Copyright (C) 2006, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_win32utils.py' --- bzrlib/tests/test_win32utils.py 2009-11-20 16:42:28 +0000 +++ bzrlib/tests/test_win32utils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/test_xml.py' --- bzrlib/tests/test_xml.py 2009-12-03 04:55:02 +0000 +++ bzrlib/tests/test_xml.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/tests/transport_util.py' --- bzrlib/tests/transport_util.py 2009-12-22 16:38:07 +0000 +++ bzrlib/tests/transport_util.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/trace.py' --- bzrlib/trace.py 2010-01-15 03:29:33 +0000 +++ bzrlib/trace.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/__init__.py' --- bzrlib/transport/__init__.py 2010-01-07 03:03:01 +0000 +++ bzrlib/transport/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/chroot.py' --- bzrlib/transport/chroot.py 2010-01-07 03:03:01 +0000 +++ bzrlib/transport/chroot.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/decorator.py' --- bzrlib/transport/decorator.py 2010-01-07 03:03:01 +0000 +++ bzrlib/transport/decorator.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/ftp/__init__.py' --- bzrlib/transport/ftp/__init__.py 2010-01-07 14:05:12 +0000 +++ bzrlib/transport/ftp/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/http/__init__.py' --- bzrlib/transport/http/__init__.py 2009-11-26 14:39:31 +0000 +++ bzrlib/transport/http/__init__.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/http/_urllib.py' --- bzrlib/transport/http/_urllib.py 2009-12-03 17:11:57 +0000 +++ bzrlib/transport/http/_urllib.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/http/_urllib2_wrappers.py' --- bzrlib/transport/http/_urllib2_wrappers.py 2009-12-03 17:11:57 +0000 +++ bzrlib/transport/http/_urllib2_wrappers.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/http/wsgi.py' --- bzrlib/transport/http/wsgi.py 2010-01-07 03:03:01 +0000 +++ bzrlib/transport/http/wsgi.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/local.py' --- bzrlib/transport/local.py 2010-01-07 03:03:01 +0000 +++ bzrlib/transport/local.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,8 +42,8 @@ from bzrlib.transport import Transport, Server -_append_flags = os.O_CREAT | os.O_APPEND | os.O_WRONLY | osutils.O_BINARY -_put_non_atomic_flags = os.O_CREAT | os.O_TRUNC | os.O_WRONLY | osutils.O_BINARY +_append_flags = os.O_CREAT | os.O_APPEND | os.O_WRONLY | osutils.O_BINARY | osutils.O_NOINHERIT +_put_non_atomic_flags = os.O_CREAT | os.O_TRUNC | os.O_WRONLY | osutils.O_BINARY | osutils.O_NOINHERIT class LocalTransport(Transport): @@ -160,7 +160,7 @@ transport._file_streams[canonical_url].flush() try: path = self._abspath(relpath) - return open(path, 'rb') + return osutils.open_file(path, 'rb') except (IOError, OSError),e: if e.errno == errno.EISDIR: return LateReadError(relpath) @@ -329,7 +329,7 @@ # initialise the file self.put_bytes_non_atomic(relpath, "", mode=mode) abspath = self._abspath(relpath) - handle = open(abspath, 'wb') + handle = osutils.open_file(abspath, 'wb') if mode is not None: self._check_mode_and_size(abspath, handle.fileno(), mode) transport._file_streams[self.abspath(relpath)] = handle === modified file 'bzrlib/transport/memory.py' --- bzrlib/transport/memory.py 2010-01-08 17:28:25 +0000 +++ bzrlib/transport/memory.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/pathfilter.py' --- bzrlib/transport/pathfilter.py 2010-01-07 03:03:01 +0000 +++ bzrlib/transport/pathfilter.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Canonical Ltd +# Copyright (C) 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/sftp.py' --- bzrlib/transport/sftp.py 2010-02-03 14:08:55 +0000 +++ bzrlib/transport/sftp.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/transport/ssh.py' --- bzrlib/transport/ssh.py 2009-11-25 07:27:43 +0000 +++ bzrlib/transport/ssh.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Robey Pointer +# Copyright (C) 2006-2010 Robey Pointer # Copyright (C) 2005, 2006, 2007 Canonical Ltd # # This program is free software; you can redistribute it and/or modify === modified file 'bzrlib/ui/__init__.py' --- bzrlib/ui/__init__.py 2010-01-15 08:18:03 +0000 +++ bzrlib/ui/__init__.py 2010-03-23 06:45:24 +0000 @@ -105,10 +105,22 @@ This tells the library how to display things to the user. Through this layer different applications can choose the style of UI. + + :ivar suppressed_warnings: Identifiers for user warnings that should + no be emitted. """ + _user_warning_templates = dict( + cross_format_fetch=("Doing on-the-fly conversion from " + "%(from_format)s to %(to_format)s.\n" + "This may take some time. Upgrade the repositories to the " + "same format for better performance." + ) + ) + def __init__(self): self._task_stack = [] + self.suppressed_warnings = set() self._quiet = False def be_quiet(self, state): @@ -210,6 +222,21 @@ """ pass + def format_user_warning(self, warning_id, message_args): + try: + template = self._user_warning_templates[warning_id] + except KeyError: + fail = "failed to format warning %r, %r" % (warning_id, message_args) + warnings.warn(fail) # so tests will fail etc + return fail + try: + return template % message_args + except ValueError, e: + fail = "failed to format warning %r, %r: %s" % ( + warning_id, message_args, e) + warnings.warn(fail) # so tests will fail etc + return fail + def get_boolean(self, prompt): """Get a boolean question answered from the user. @@ -240,8 +267,11 @@ def recommend_upgrade(self, current_format_name, basedir): - # this should perhaps be in the TextUIFactory and the default can do + # XXX: this should perhaps be in the TextUIFactory and the default can do # nothing + # + # XXX: Change to show_user_warning - that will accomplish the previous + # xxx. -- mbp 2010-02-25 trace.warning("%s is deprecated " "and a better format is available.\n" "It is recommended that you upgrade by " @@ -271,6 +301,24 @@ # Default implementation just does nothing pass + def show_user_warning(self, warning_id, **message_args): + """Show a warning to the user. + + This is specifically for things that are under the user's control (eg + outdated formats), not for internal program warnings like deprecated + APIs. + + This can be overridden by UIFactory subclasses to show it in some + appropriate way; the default UIFactory is noninteractive and does + nothing. format_user_warning maps it to a string, though other + presentations can be used for particular UIs. + + :param warning_id: An identifier like 'cross_format_fetch' used to + check if the message is suppressed and to look up the string. + :param message_args: Arguments to be interpolated into the message. + """ + pass + def show_error(self, msg): """Show an error message (not an exception) to the user. @@ -288,12 +336,13 @@ raise NotImplementedError(self.show_warning) def warn_cross_format_fetch(self, from_format, to_format): - """Warn about a potentially slow cross-format transfer""" - # See asking for a warning here - trace.warning("Doing on-the-fly conversion from %s to %s.\n" - "This may take some time. Upgrade the repositories to the " - "same format for better performance.\n" % - (from_format, to_format)) + """Warn about a potentially slow cross-format transfer. + + This is deprecated in favor of show_user_warning, but retained for api + compatibility in 2.0 and 2.1. + """ + self.show_user_warning('cross_format_fetch', from_format=from_format, + to_format=to_format) class SilentUIFactory(UIFactory): === modified file 'bzrlib/ui/text.py' --- bzrlib/ui/text.py 2010-01-15 03:29:33 +0000 +++ bzrlib/ui/text.py 2010-03-23 06:45:36 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2008, 2009, 2010 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,6 +37,8 @@ """) +from bzrlib.osutils import watch_sigwinch + from bzrlib.ui import ( UIFactory, NullProgressView, @@ -60,7 +62,9 @@ self.stderr = stderr # paints progress, network activity, etc self._progress_view = self.make_progress_view() - + # hook up the signals to watch for terminal size changes + watch_sigwinch() + def be_quiet(self, state): if state and not self._quiet: self.clear_term() @@ -245,6 +249,18 @@ def _progress_all_finished(self): self._progress_view.clear() + def show_user_warning(self, warning_id, **message_args): + """Show a text message to the user. + + Explicitly not for warnings about bzr apis, deprecations or internals. + """ + # eventually trace.warning should migrate here, to avoid logging and + # be easier to test; that has a lot of test fallout so for now just + # new code can call this + if warning_id not in self.suppressed_warnings: + self.stderr.write(self.format_user_warning(warning_id, message_args) + + '\n') + class TextProgressView(object): """Display of progress bar and other information on a tty. === modified file 'bzrlib/upgrade.py' --- bzrlib/upgrade.py 2009-06-23 09:17:21 +0000 +++ bzrlib/upgrade.py 2010-03-23 06:37:50 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2008, 2009 Canonical Ltd +# Copyright (C) 2005, 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,6 +29,9 @@ def __init__(self, url, format=None): self.format = format self.bzrdir = BzrDir.open_unsupported(url) + # XXX: Change to cleanup + warning_id = 'cross_format_fetch' + saved_warning = warning_id in ui.ui_factory.suppressed_warnings if isinstance(self.bzrdir, RemoteBzrDir): self.bzrdir._ensure_real() self.bzrdir = self.bzrdir._real_bzrdir @@ -36,10 +39,13 @@ raise errors.UpgradeReadonly self.transport = self.bzrdir.root_transport self.pb = ui.ui_factory.nested_progress_bar() + ui.ui_factory.suppressed_warnings.add(warning_id) try: self.convert() finally: self.pb.finished() + if not saved_warning: + ui.ui_factory.suppressed_warnings.remove(warning_id) def convert(self): try: === modified file 'bzrlib/urlutils.py' --- bzrlib/urlutils.py 2009-11-26 04:01:58 +0000 +++ bzrlib/urlutils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/version.py' --- bzrlib/version.py 2009-12-10 00:13:16 +0000 +++ bzrlib/version.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007, 2009 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/version_info_formats/format_rio.py' --- bzrlib/version_info_formats/format_rio.py 2009-11-03 09:32:17 +0000 +++ bzrlib/version_info_formats/format_rio.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006 Canonical Ltd +# Copyright (C) 2006, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/versionedfile.py' --- bzrlib/versionedfile.py 2009-12-10 17:16:19 +0000 +++ bzrlib/versionedfile.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # Authors: # Johan Rydberg === modified file 'bzrlib/win32utils.py' --- bzrlib/win32utils.py 2009-12-16 06:38:15 +0000 +++ bzrlib/win32utils.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/workingtree_4.py' --- bzrlib/workingtree_4.py 2010-01-20 23:21:35 +0000 +++ bzrlib/workingtree_4.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd +# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/xml4.py' --- bzrlib/xml4.py 2009-12-03 04:55:02 +0000 +++ bzrlib/xml4.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/xml5.py' --- bzrlib/xml5.py 2009-12-03 04:55:02 +0000 +++ bzrlib/xml5.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2008, 2009, 2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/xml7.py' --- bzrlib/xml7.py 2009-12-03 04:55:02 +0000 +++ bzrlib/xml7.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Canonical Ltd +# Copyright (C) 2006-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/xml8.py' --- bzrlib/xml8.py 2009-12-03 04:55:02 +0000 +++ bzrlib/xml8.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'bzrlib/xml_serializer.py' --- bzrlib/xml_serializer.py 2009-12-03 04:55:02 +0000 +++ bzrlib/xml_serializer.py 2010-03-23 06:37:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006 Canonical Ltd +# Copyright (C) 2005-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by === modified file 'doc/developers/_templates/layout.html' --- doc/developers/_templates/layout.html 2009-11-18 02:08:40 +0000 +++ doc/developers/_templates/layout.html 2010-03-23 06:37:38 +0000 @@ -11,22 +11,3 @@ Documentation |  {{ super() }} {% endblock %} - -{% block document %} - - -{{ super() }} -{% endblock %} === modified file 'doc/en/_templates/index.html' --- doc/en/_templates/index.html 2010-01-08 00:27:40 +0000 +++ doc/en/_templates/index.html 2010-03-23 06:37:38 +0000 @@ -7,8 +7,11 @@
+