Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Martin Pool | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~geoff.bache/bzr/trunk | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
571 lines (+501/-0) (has conflicts) 3 files modified
NEWS (+453/-0) bzrlib/osutils.py (+19/-0) bzrlib/tests/blackbox/test_add.py (+29/-0) Text conflict in NEWS Text conflict in bzrlib/osutils.py Text conflict in bzrlib/tests/blackbox/test_add.py |
||||
To merge this branch: | bzr merge lp:~geoff.bache/bzr/trunk | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Needs Fixing | ||
Robert Collins (community) | Needs Information | ||
Review via email: mp+28463@code.launchpad.net |
Commit message
Behave better when adding symlinks or things found via symlinks.
Description of the change
Handle 'bzr add symlink' (adds the symlink) and 'bzr add symlink/something' (adds something in the tree that something is actually contained in).
John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> Robert Collins has proposed merging lp:~geoff.bache/bzr/trunk into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> #183831 bzr add <symlink> follows the link
> https:/
>
>
> Handle 'bzr add symlink' (adds the symlink) and 'bzr add symlink/something' (adds something in the tree that something is actually contained in).
>
review: needsfixing
Quite a few things here.
1) It applies to a very old NEWS, before it was reformatted. So that
needs to be cleaned up and put in the new area.
2) + def test_add_
+ if not hasattr(os, "symlink"):
+ raise TestNotApplicab
We have a feature for symlinks that should be used.
3) I don't understand why this is getting added:
+ def test_add_
4) The core loop is all confused because the patch is out-of-date.
5) The core loop is calling a function that will raise an exception for
every piece of the path processed.
To do it correctly, we should probably pull 'samepath()' into osutils.
And do:
def _samefile(f1, f2):
return f1 == f2
samefile = getattr(os.path, 'samefile', _samefile)
Or something along those lines.
I don't really understand why samefile(head, base) is getting called,
nor why that would actually fix the symlink issues.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkw
bLoAnif5CgEntdR
=3ABk
-----END PGP SIGNATURE-----
John A Meinel (jameinel) wrote : | # |
I'll poke at this and see if I can get it cleaned up.
Martin Pool (mbp) wrote : | # |
John merged the equivalent of this. Thanks for the branch.
Preview Diff
1 | === modified file 'NEWS' | |||
2 | --- NEWS 2010-06-23 08:14:21 +0000 | |||
3 | +++ NEWS 2010-06-24 20:53:32 +0000 | |||
4 | @@ -1,5 +1,6 @@ | |||
5 | 1 | #################### | 1 | #################### |
6 | 2 | Bazaar Release Notes | 2 | Bazaar Release Notes |
7 | 3 | <<<<<<< TREE | ||
8 | 3 | #################### | 4 | #################### |
9 | 4 | 5 | ||
10 | 5 | .. contents:: List of Releases | 6 | .. contents:: List of Releases |
11 | @@ -4548,6 +4549,458 @@ | |||
12 | 4548 | :Codename: 1234567890 | 4549 | :Codename: 1234567890 |
13 | 4549 | :1.12: 2009-02-13 | 4550 | :1.12: 2009-02-13 |
14 | 4550 | :1.12rc1: 2009-02-10 | 4551 | :1.12rc1: 2009-02-10 |
15 | 4552 | ======= | ||
16 | 4553 | -------------------- | ||
17 | 4554 | |||
18 | 4555 | .. contents:: | ||
19 | 4556 | |||
20 | 4557 | |||
21 | 4558 | |||
22 | 4559 | IN DEVELOPMENT | ||
23 | 4560 | -------------- | ||
24 | 4561 | |||
25 | 4562 | COMPATIBILITY BREAKS: | ||
26 | 4563 | |||
27 | 4564 | * bzr no longer autodetects nested trees as 'tree-references'. They | ||
28 | 4565 | must now be explicitly added tree references. At the commandline, use | ||
29 | 4566 | join --reference instead of add. (Aaron Bentley) | ||
30 | 4567 | |||
31 | 4568 | NEW FEATURES: | ||
32 | 4569 | |||
33 | 4570 | * shelve can now apply changes without storing anything on the shelf, via | ||
34 | 4571 | the new --destroy option. (Aaron Bentley) | ||
35 | 4572 | |||
36 | 4573 | * ``bzr send`` now accepts --body to specify an initial message body. | ||
37 | 4574 | (Aaron bentley) | ||
38 | 4575 | |||
39 | 4576 | IMPROVEMENTS: | ||
40 | 4577 | |||
41 | 4578 | * Branching from a stacked branch using ``bzr*://`` will now stream | ||
42 | 4579 | the data when the target repository does not need topological | ||
43 | 4580 | ordering, reducing round trips and network overhead. This uses the | ||
44 | 4581 | existing smart server methods added in 1.13, so will work on any | ||
45 | 4582 | 1.13 or newer server. (Robert Collins, Andrew Bennetts) | ||
46 | 4583 | |||
47 | 4584 | * ``bzr ignore`` gives a more informative message when existing | ||
48 | 4585 | version controlled files match the ignore pattern. (Neil | ||
49 | 4586 | Martinsen-Burrell, #248895) | ||
50 | 4587 | |||
51 | 4588 | * Progress bars now show the rate of network activity for | ||
52 | 4589 | ``bzr+ssh://`` and ``bzr://`` connections. (Andrew Bennetts) | ||
53 | 4590 | |||
54 | 4591 | * Streaming push can be done to older repository formats. This is | ||
55 | 4592 | implemented using a new ``Repository.insert_stream_locked`` RPC. | ||
56 | 4593 | (Andrew Bennetts, Robert Collins) | ||
57 | 4594 | |||
58 | 4595 | * Tildes are no longer escaped. No more %7Euser/project/branch! | ||
59 | 4596 | (Jonathan Lange) | ||
60 | 4597 | |||
61 | 4598 | BUG FIXES: | ||
62 | 4599 | |||
63 | 4600 | * Authentication plugins now receive all the parameters from the request | ||
64 | 4601 | itself (aka host, port, realm, path, etc). Previously, only the | ||
65 | 4602 | authentication section name, username and encoded password were | ||
66 | 4603 | provided. (Jean-Francois Roy) | ||
67 | 4604 | |||
68 | 4605 | * Fix "is not a stackable format" error when pushing a | ||
69 | 4606 | stackable-format branch with an unstackable-format repository to a | ||
70 | 4607 | destination with a default stacking policy. (Andrew Bennetts) | ||
71 | 4608 | |||
72 | 4609 | * Fixed incorrect "Source format does not support stacking" warning | ||
73 | 4610 | when pushing to a smart server. (Andrew Bennetts, #334114) | ||
74 | 4611 | |||
75 | 4612 | * It is no longer possible to fetch between repositories while the | ||
76 | 4613 | target repository is in a write group. This prevents race conditions | ||
77 | 4614 | that prevent the use of RPC's to perform fetch, and thus allows | ||
78 | 4615 | optimising more operations. (Robert Collins, Andrew Bennetts) | ||
79 | 4616 | |||
80 | 4617 | * ``merge --force`` works again. (Robert Collins, #342105) | ||
81 | 4618 | |||
82 | 4619 | * The GNU Changelog formatter is slightly improved in the case where | ||
83 | 4620 | the delta is empty, and now correctly claims not to support tags. | ||
84 | 4621 | (Andrea Bolognani) | ||
85 | 4622 | |||
86 | 4623 | * Shelve can now shelve changes to a symlink target. | ||
87 | 4624 | (James Westby, #341558) | ||
88 | 4625 | |||
89 | 4626 | * 'add' now works if there is a symlink in the path to the repository | ||
90 | 4627 | (Geoff Bache, #183831) | ||
91 | 4628 | |||
92 | 4629 | DOCUMENTATION: | ||
93 | 4630 | |||
94 | 4631 | * New topic `bzr help debug-flags`. (Martin Pool) | ||
95 | 4632 | |||
96 | 4633 | * The generated manpage now explicitly lists aliases as commands. | ||
97 | 4634 | (James Westby, #336998) | ||
98 | 4635 | |||
99 | 4636 | API CHANGES: | ||
100 | 4637 | |||
101 | 4638 | * New sort order for ``get_record_stream`` ``groupcompress`` which | ||
102 | 4639 | sorts optimally for use with groupcompress compressors. (John Arbash | ||
103 | 4640 | Meinel, Robert Collins) | ||
104 | 4641 | |||
105 | 4642 | * The ``get_credentials`` and ``set_credentials`` methods of | ||
106 | 4643 | ``AuthenticationConfig`` now accept an optional realm argument. | ||
107 | 4644 | (Jean-Francois Roy) | ||
108 | 4645 | |||
109 | 4646 | * The ``pb`` argument to ``fetch()`` is deprecated. | ||
110 | 4647 | (Martin Pool) | ||
111 | 4648 | |||
112 | 4649 | TESTING: | ||
113 | 4650 | |||
114 | 4651 | * ``bzrlib.tests.TestCase`` now fails the test if its own ``setUp`` | ||
115 | 4652 | and ``tearDown`` weren't called. This catches faulty tests that | ||
116 | 4653 | forget to upcall when overriding ``setUp`` and ``tearDown``. Those | ||
117 | 4654 | faulty tests were not properly isolated. | ||
118 | 4655 | (Andrew Bennetts, Robert Collins) | ||
119 | 4656 | |||
120 | 4657 | INTERNALS: | ||
121 | 4658 | |||
122 | 4659 | * New ``assertLength`` method based on one Martin has squirreled away | ||
123 | 4660 | somewhere. (Robert Collins, Martin Pool) | ||
124 | 4661 | |||
125 | 4662 | * New repository method ``refresh_data`` to cause any repository to | ||
126 | 4663 | make visible data inserted into the repository by a smart server | ||
127 | 4664 | fetch operation. (Robert Collins, Andrew Bennetts) | ||
128 | 4665 | |||
129 | 4666 | * Removed ``InterRemoteToOther``, ``InterOtherToRemote`` and | ||
130 | 4667 | ``InterPackToRemotePack`` classes, as they are now unnecessary. | ||
131 | 4668 | (Andrew Bennetts) | ||
132 | 4669 | |||
133 | 4670 | * ``_walk_to_common_revisions`` will now batch up at least 50 | ||
134 | 4671 | revisions before calling ``get_parent_map`` on the target, | ||
135 | 4672 | regardless of ``InterRepository``. | ||
136 | 4673 | (Andrew Bennetts, Robert Collins) | ||
137 | 4674 | |||
138 | 4675 | |||
139 | 4676 | bzr 1.13rc1 "paraskavedekatriaphobia" 2009-03-10 | ||
140 | 4677 | ------------------------------------------------ | ||
141 | 4678 | This release includes bug fixes and a few performance and feature improvements. | ||
142 | 4679 | GNU Changelog output can now be produced by ``bzr log --format gnu-changelog``. | ||
143 | 4680 | Debug flags can now be set in ``~/.bazaar/bazaar.conf``. Lightweight Checkouts | ||
144 | 4681 | and Stacked Branches should both be much faster over remote connections. | ||
145 | 4682 | |||
146 | 4683 | COMPATIBILITY BREAKS: | ||
147 | 4684 | |||
148 | 4685 | * ``bzr log --line`` now indicates which revisions are merges with | ||
149 | 4686 | `[merge]` after the date. Scripts which parse the output of this | ||
150 | 4687 | command may need to be adjusted. | ||
151 | 4688 | (Neil Martinsen-Burrell) | ||
152 | 4689 | |||
153 | 4690 | NEW FEATURES: | ||
154 | 4691 | |||
155 | 4692 | * ``bzr reconfigure`` now supports --with-trees and --with-no-trees | ||
156 | 4693 | options to change the default tree-creation policy of shared | ||
157 | 4694 | repositories. (Matthew Fuller, Marius Kruger, #145033) | ||
158 | 4695 | |||
159 | 4696 | * Debug flags can now be set in ``~/.bazaar/bazaar.conf``. | ||
160 | 4697 | (Martin Pool) | ||
161 | 4698 | |||
162 | 4699 | * Filtered views provide a mask over the tree so that users can focus | ||
163 | 4700 | on a subset of a tree when doing their work. See ``Filtered views`` | ||
164 | 4701 | in chapter 7 of the User Guide and ``bzr help view`` for details. | ||
165 | 4702 | (Ian Clatworthy) | ||
166 | 4703 | |||
167 | 4704 | * GNU Changelog output can now be produced by ``bzr log --format | ||
168 | 4705 | gnu-changelog``. (Andrea Bolognani, Martin Pool) | ||
169 | 4706 | |||
170 | 4707 | * The ``-Dmemory`` flag now gives memory information on Windows. | ||
171 | 4708 | (John Arbash Meinel) | ||
172 | 4709 | |||
173 | 4710 | * Multiple authors for a commit can now be recorded by using the "--author" | ||
174 | 4711 | option multiple times. (James Westby, #185772) | ||
175 | 4712 | |||
176 | 4713 | * New clean-tree command, from bzrtools. (Aaron Bentley, Jelmer Vernoij) | ||
177 | 4714 | |||
178 | 4715 | * New command ``bzr launchpad-open`` opens a Launchpad web page for that | ||
179 | 4716 | branch in your web browser, as long as the branch is on Launchpad at all. | ||
180 | 4717 | (Jonathan Lange) | ||
181 | 4718 | |||
182 | 4719 | * New API for getting bugs fixed by a revision: Revision.iter_bugs(). | ||
183 | 4720 | (Jonathan Lange) | ||
184 | 4721 | |||
185 | 4722 | IMPROVEMENTS: | ||
186 | 4723 | |||
187 | 4724 | * All bzr ``Hooks`` classes are now registered in | ||
188 | 4725 | ``bzrlib.hooks.known_hooks``. This removes the separate list from | ||
189 | 4726 | ``bzrlib.tests`` and ensures that all hooks registered there are | ||
190 | 4727 | correctly isolated by the test suite (previously | ||
191 | 4728 | ``MutableTreeHooks`` were not being isolated correctly). Further, | ||
192 | 4729 | documentation for hooks is now dynamically generated from the | ||
193 | 4730 | present HookPoints. ``bzr hooks`` will now also report on all the | ||
194 | 4731 | hooks present in the ``bzrlib.hooks.known_hooks`` registry. | ||
195 | 4732 | (Robert Collins) | ||
196 | 4733 | |||
197 | 4734 | * ``bzr add`` no longer prints ``add completed`` on success. Failure | ||
198 | 4735 | still prints an error message. (Robert Collins) | ||
199 | 4736 | |||
200 | 4737 | * ``bzr branch`` now has a ``--no-tree`` option which turns off the | ||
201 | 4738 | generation of a working tree in the new branch. | ||
202 | 4739 | (Daniel Watkins, John Klinger, #273993) | ||
203 | 4740 | |||
204 | 4741 | * Bazaar will now point out ``bzr+ssh://`` to the user when they | ||
205 | 4742 | use ssh://. (Jelmer Vernooij, #330535) | ||
206 | 4743 | |||
207 | 4744 | * ``bzr -v info`` now omits the number of committers branch statistic, | ||
208 | 4745 | making it many times faster for large projects. To include that | ||
209 | 4746 | statistic in the output, use ``bzr -vv info``. | ||
210 | 4747 | (Ian Clatworthy) | ||
211 | 4748 | |||
212 | 4749 | * ``bzr push`` to a ``bzr`` url (``bzr://``, ``bzr+ssh://`` etc) will | ||
213 | 4750 | stream if the server is version 1.13 or greater, reducing roundtrips | ||
214 | 4751 | significantly. (Andrew Bennetts, Robert Collins) | ||
215 | 4752 | |||
216 | 4753 | * Lightweight Checkouts and Stacked Branches should both be much | ||
217 | 4754 | faster over remote connections. Building the working tree now | ||
218 | 4755 | batches up requests into approx 5MB requests, rather than a separate | ||
219 | 4756 | request for each file. (John Arbash Meinel) | ||
220 | 4757 | |||
221 | 4758 | * Support for GSSAPI authentication when using HTTP or HTTPS. | ||
222 | 4759 | (Jelmer Vernooij) | ||
223 | 4760 | |||
224 | 4761 | * The ``bzr shelve`` prompt now includes a '?' help option to explain the | ||
225 | 4762 | short options better. (Daniel Watkins, #327429) | ||
226 | 4763 | |||
227 | 4764 | * ``bzr lp-open`` now falls back to the push location if it cannot find a | ||
228 | 4765 | public location. (Jonathan Lange, #332372) | ||
229 | 4766 | |||
230 | 4767 | * ``bzr lp-open`` will try to find the Launchpad URL for the location | ||
231 | 4768 | passed on the command line. This makes ``bzr lp-open lp:foo`` work as | ||
232 | 4769 | expected. (Jonathan Lange, #332705) | ||
233 | 4770 | |||
234 | 4771 | * ``bzr send`` now supports MH-E via ``emacsclient``. (Eric Gillespie) | ||
235 | 4772 | |||
236 | 4773 | BUG FIXES: | ||
237 | 4774 | |||
238 | 4775 | * Bazaar now gives a better message including the filename if it's | ||
239 | 4776 | unable to read a file in the working directory, for example because | ||
240 | 4777 | of a permission error. (Martin Pool, #338653) | ||
241 | 4778 | |||
242 | 4779 | * ``bzr cat -r<old> <path>`` doesn't traceback anymore when <path> has a | ||
243 | 4780 | file id in the working tree different from the one in revision <old>. | ||
244 | 4781 | (Vincent Ladeuil, #341517, #253806) | ||
245 | 4782 | |||
246 | 4783 | * ``bzr send`` help is more specific about how to apply merge | ||
247 | 4784 | directives. (Neil Martinsen-Burrell, #253470) | ||
248 | 4785 | |||
249 | 4786 | * ``bzr missing`` now uses ``Repository.get_revision_delta()`` rather | ||
250 | 4787 | than fetching trees and determining a delta itself. (Jelmer | ||
251 | 4788 | Vernooij, #315048) | ||
252 | 4789 | |||
253 | 4790 | * ``bzr push`` to a smart server no longer causes "Revision | ||
254 | 4791 | {set([('null:',)])} not present ..." errors when the branch has | ||
255 | 4792 | multiple root revisions. (Andrew Bennetts, #317654) | ||
256 | 4793 | |||
257 | 4794 | * ``bzr shelve`` now properly handle patches with no terminating newline. | ||
258 | 4795 | (Benoît PIERRE, #303569) | ||
259 | 4796 | |||
260 | 4797 | * ``bzr unshelve`` gives a more palatable error if passed a non-integer | ||
261 | 4798 | shelf id. (Daniel Watkins) | ||
262 | 4799 | |||
263 | 4800 | * Export now handles files that are not present in the tree. | ||
264 | 4801 | (James Westby, #174539) | ||
265 | 4802 | |||
266 | 4803 | * Fixed incorrect "Source format does not support stacking" warning | ||
267 | 4804 | when pushing to a smart server. (Andrew Bennetts, #334114) | ||
268 | 4805 | |||
269 | 4806 | * Fixed "sprout() got an unexpected keyword argument 'source_branch'" | ||
270 | 4807 | error branching from old repositories. | ||
271 | 4808 | (Martin Pool, #321695) | ||
272 | 4809 | |||
273 | 4810 | * Make ``bzr push --quiet <non-local location>`` less chatty. | ||
274 | 4811 | (Kent Gibson, #221461) | ||
275 | 4812 | |||
276 | 4813 | * Many Branch hooks would not fire with ``bzr://`` and ``bzr+ssh://`` | ||
277 | 4814 | branches, and this was not noticed due to a bug in the test logic | ||
278 | 4815 | for branches. This is now fixed and a test added to prevent it | ||
279 | 4816 | reoccuring. (Robert Collins, Andrew Bennetts) | ||
280 | 4817 | |||
281 | 4818 | * Restore the progress bar on Windows. We were disabling it when TERM | ||
282 | 4819 | wasn't set, but Windows doesn't set TERM. (Alexander Belchenko) | ||
283 | 4820 | |||
284 | 4821 | * ``setup.py build_ext`` now gives a proper error when an extension | ||
285 | 4822 | fails to build. (John Arbash Meinel) | ||
286 | 4823 | |||
287 | 4824 | * Symlinks to non ascii file names are now supported. | ||
288 | 4825 | (Robert Collins, Vincent Ladeuil, #339055, #272444) | ||
289 | 4826 | |||
290 | 4827 | * Under rare circumstances (aka nobody reported a bug about it), the ftp | ||
291 | 4828 | transport could revert to ascii mode. It now stays in binary mode except | ||
292 | 4829 | when needed. | ||
293 | 4830 | (Vincent Ladeuil) | ||
294 | 4831 | |||
295 | 4832 | * Unshelve does not generate warnings about progress bars. | ||
296 | 4833 | (Aaron Bentley, #328148) | ||
297 | 4834 | |||
298 | 4835 | * shelve cleans up properly when unversioned files are specified. | ||
299 | 4836 | (Benoît Pierre, Aaron Bentley) | ||
300 | 4837 | |||
301 | 4838 | DOCUMENTATION: | ||
302 | 4839 | |||
303 | 4840 | * Added ``Organizing your workspace`` to the User Guide appendices, | ||
304 | 4841 | summarizing some common ways of organizing trees, branches and | ||
305 | 4842 | repositories and the processes/workflows implied/enabled by each. | ||
306 | 4843 | (Ian Clatworthy) | ||
307 | 4844 | |||
308 | 4845 | * Hooks can now be self documenting. ``bzrlib.hooks.Hooks.create_hook`` | ||
309 | 4846 | is the entry point for this feature. (Robert Collins) | ||
310 | 4847 | |||
311 | 4848 | * The documentation for ``shelve`` and ``unshelve`` has been clarified. | ||
312 | 4849 | (Daniel Watkins, #327421, #327425) | ||
313 | 4850 | |||
314 | 4851 | API CHANGES: | ||
315 | 4852 | |||
316 | 4853 | * ``bzr selftest`` now fails if the bazaar sources contain trailing | ||
317 | 4854 | whitespace, non-unix style line endings and files not ending in a | ||
318 | 4855 | newline. About 372 files and 3243 lines with trailing whitespace was | ||
319 | 4856 | updated to comply with this. The code already complied with the other | ||
320 | 4857 | criteria, but now it is enforced. (Marius Kruger) | ||
321 | 4858 | |||
322 | 4859 | ``bzrlib.branch.PushResult`` was renamed to | ||
323 | 4860 | ``bzrlib.branch.BranchPushResult``. (Jelmer Vernooij) | ||
324 | 4861 | |||
325 | 4862 | * ``Branch.fetch`` and ``Repository.fetch`` now return None rather | ||
326 | 4863 | than a count of copied revisions and failed revisions. A while back | ||
327 | 4864 | we stopped ever reporting failed revisions because we started | ||
328 | 4865 | erroring instead, and the copied revisions count is not used in the | ||
329 | 4866 | UI at all - indeed it only reflects the repository status not | ||
330 | 4867 | changes to the branch itself. (Robert Collins) | ||
331 | 4868 | |||
332 | 4869 | * ``Inventory.apply_delta`` now raises an AssertionError if a file-id | ||
333 | 4870 | appears multiple times within the delta. (Ian Clatworthy) | ||
334 | 4871 | |||
335 | 4872 | * MutableTree.commit now favours the "authors" argument, with the old | ||
336 | 4873 | "author" argument being deprecated. | ||
337 | 4874 | |||
338 | 4875 | * Remove deprecated EmptyTree. (Martin Pool) | ||
339 | 4876 | |||
340 | 4877 | * ``Repository.fetch`` now accepts an optional ``fetch_spec`` | ||
341 | 4878 | parameter. A ``SearchResult`` or ``MiniSearchResult`` may be passed | ||
342 | 4879 | to ``fetch_spec`` instead of a ``last_revision`` to specify exactly | ||
343 | 4880 | which revisions to fetch. (Andrew Bennetts) | ||
344 | 4881 | |||
345 | 4882 | * ``RepositoryAcquisitionPolicy.acquire_repository`` now returns a | ||
346 | 4883 | tuple of ``(repository, is_new_flag)``, rather than just the | ||
347 | 4884 | repository. (Andrew Bennetts) | ||
348 | 4885 | |||
349 | 4886 | * Revision.get_apparent_author() is now deprecated, replaced by | ||
350 | 4887 | Revision.get_apparent_authors(), which returns a list. The former | ||
351 | 4888 | now returns the first item that would be returned from the second. | ||
352 | 4889 | |||
353 | 4890 | * The ``BranchBuilder`` test helper now accepts a ``timestamp`` | ||
354 | 4891 | parameter to ``build_commit`` and ``build_snapshot``. (Martin Pool) | ||
355 | 4892 | |||
356 | 4893 | * The ``_fetch_*`` attributes on ``Repository`` are now on | ||
357 | 4894 | ``RepositoryFormat``, more accurately reflecting their intent (they | ||
358 | 4895 | describe a disk format capability, not state of a particular | ||
359 | 4896 | repository of that format). (Robert Collins) | ||
360 | 4897 | |||
361 | 4898 | INTERNALS: | ||
362 | 4899 | |||
363 | 4900 | * Branching from a non-stacked branch on a smart protocol is now | ||
364 | 4901 | free of virtual file system methods. | ||
365 | 4902 | (Robert Collins, Andrew Bennetts) | ||
366 | 4903 | |||
367 | 4904 | * Branch and Repository creation on a bzr+ssh://server are now done | ||
368 | 4905 | via RPC calls rather than VFS calls, reducing round trips for | ||
369 | 4906 | pushing new branches substantially. (Robert Collins) | ||
370 | 4907 | |||
371 | 4908 | * ``Branch.clone`` now takes the ``repository_policy`` formerly used | ||
372 | 4909 | inside ``BzrDir.clone_on_transport``, allowing stacking to be | ||
373 | 4910 | configured before the branch tags and revision tip are set. This | ||
374 | 4911 | fixes a race condition cloning stacked branches that would cause | ||
375 | 4912 | plugins to have hooks called on non-stacked instances. | ||
376 | 4913 | (Robert Collins, #334187) | ||
377 | 4914 | |||
378 | 4915 | * ``BzrDir.cloning_metadir`` now has a RPC call. (Robert Collins) | ||
379 | 4916 | |||
380 | 4917 | * ``BzrDirFormat.__str__`` now uses the human readable description | ||
381 | 4918 | rather than the sometimes-absent disk label. (Robert Collins) | ||
382 | 4919 | |||
383 | 4920 | * ``bzrlib.fetch`` is now composed of a sender and a sink component | ||
384 | 4921 | allowing for decoupling over a network connection. Fetching from | ||
385 | 4922 | or into a RemoteRepository with a 1.13 server will use this to | ||
386 | 4923 | stream the operation. | ||
387 | 4924 | (Andrew Bennetts, Robert Collins) | ||
388 | 4925 | |||
389 | 4926 | * ``bzrlib.tests.run_suite`` accepts a runner_class parameter | ||
390 | 4927 | supporting the use of different runners. (Robert Collins) | ||
391 | 4928 | |||
392 | 4929 | * Change how file_ids and revision_ids are interned as part of | ||
393 | 4930 | inventory deserialization. Now we use the real ``intern()``, rather | ||
394 | 4931 | than our own workaround that would also cache a Unicode copy of the | ||
395 | 4932 | string, and never emptied the cache. This should slightly reduce | ||
396 | 4933 | memory consumption. (John Arbash Meinel) | ||
397 | 4934 | |||
398 | 4935 | * New branch method ``create_clone_on_transport`` that returns a | ||
399 | 4936 | branch object. (Robert Collins) | ||
400 | 4937 | |||
401 | 4938 | * New hook Commands['extend_command'] to allow plugins to access a | ||
402 | 4939 | command object before the command is run (or help generated from | ||
403 | 4940 | it), without overriding the command. (Robert Collins) | ||
404 | 4941 | |||
405 | 4942 | * New version of the ``BzrDir.find_repository`` verb supporting | ||
406 | 4943 | ``_network_name`` to support removing more _ensure_real calls. | ||
407 | 4944 | (Robert Collins) | ||
408 | 4945 | |||
409 | 4946 | * ``RemoteBranchFormat`` no longer claims to have a disk format string. | ||
410 | 4947 | (Robert Collins) | ||
411 | 4948 | |||
412 | 4949 | * ``Repository`` objects now have ``suspend_write_group`` and | ||
413 | 4950 | ``resume_write_group`` methods. These are currently only useful | ||
414 | 4951 | with pack repositories. (Andrew Bennetts, Robert Collins) | ||
415 | 4952 | |||
416 | 4953 | * ``BzrDirFormat``, ``BranchFormat`` and ``RepositoryFormat`` objects | ||
417 | 4954 | now have a ``network_name`` for passing the format across RPC calls. | ||
418 | 4955 | (Robert Collins, Andrew Bennetts) | ||
419 | 4956 | |||
420 | 4957 | * ``RepositoryFormat`` objects now all have a new attribute | ||
421 | 4958 | ``_serializer`` used by fetch when reserialising is required. | ||
422 | 4959 | (Robert Collins, Andrew Bennetts) | ||
423 | 4960 | |||
424 | 4961 | * Some methods have been pulled up from ``BzrBranch`` to ``Branch`` | ||
425 | 4962 | to aid branch types that are not bzr branch objects (like | ||
426 | 4963 | RemoteBranch). (Robert Collins, Andrew Bennetts) | ||
427 | 4964 | |||
428 | 4965 | * Test adaptation has been made consistent throughout the built in | ||
429 | 4966 | tests. ``TestScenarioApplier``, ``multiply_tests_from_modules``, | ||
430 | 4967 | ``adapt_tests``, ``adapt_modules`` have all been deleted. Please | ||
431 | 4968 | use ``multiply_tests``, or for lower level needs ``apply_scenarios`` | ||
432 | 4969 | and ``apply_scenario``. (Robert Collins) | ||
433 | 4970 | |||
434 | 4971 | * ``TestSkipped`` is now detected by TestCase and passed to the | ||
435 | 4972 | ``TestResult`` by calling ``addSkip``. For older TestResult objects, | ||
436 | 4973 | where ``addSkip`` is not available, ``addError`` is still called. | ||
437 | 4974 | This permits test filtering in subunit to strip out skipped tests | ||
438 | 4975 | resulting in a faster fix-shrink-list-run cycle. This is compatible | ||
439 | 4976 | with the testtools protocol for skips. (Robert Collins) | ||
440 | 4977 | |||
441 | 4978 | * The ``_index`` of ``KnitVersionedFiles`` now supports the ability | ||
442 | 4979 | to scan an underlying index that is going to be incorporated into | ||
443 | 4980 | the ``KnitVersionedFiles`` object, to determine if it has missing | ||
444 | 4981 | delta references. The method is ``scan_unvalidated_index``. | ||
445 | 4982 | (Andrew Bennetts, Robert Collins) | ||
446 | 4983 | |||
447 | 4984 | * There is a RemoteSink object which handles pushing to smart servers. | ||
448 | 4985 | (Andrew Bennetts, Robert Collins) | ||
449 | 4986 | |||
450 | 4987 | * ``TransportTraceDecorator`` now logs ``put_bytes_non_atomic`` and | ||
451 | 4988 | ``rmdir`` calls. (Robert Collins) | ||
452 | 4989 | |||
453 | 4990 | * ``VersionedFiles`` record adapters have had their signature change | ||
454 | 4991 | from ``(record, record.get_bytes_as(record.storage_kind))`` to | ||
455 | 4992 | ``(record)`` reducing excess duplication and allowing adapters | ||
456 | 4993 | to access private data in record to obtain content more | ||
457 | 4994 | efficiently. (Robert Collins) | ||
458 | 4995 | |||
459 | 4996 | * We no longer probe to see if we should create a working tree during | ||
460 | 4997 | clone if we cannot get a local_abspath for the new bzrdir. | ||
461 | 4998 | (Robert Collins) | ||
462 | 4999 | |||
463 | 5000 | |||
464 | 5001 | bzr 1.12 "1234567890" 2009-02-13 | ||
465 | 5002 | -------------------------------- | ||
466 | 5003 | >>>>>>> MERGE-SOURCE | ||
467 | 4551 | 5004 | ||
468 | 4552 | This release of Bazaar contains many improvements to the speed, | 5005 | This release of Bazaar contains many improvements to the speed, |
469 | 4553 | documentation and functionality of ``bzr log`` and the display of logged | 5006 | documentation and functionality of ``bzr log`` and the display of logged |
470 | 4554 | 5007 | ||
471 | === modified file 'bzrlib/osutils.py' | |||
472 | --- bzrlib/osutils.py 2010-06-18 10:57:20 +0000 | |||
473 | +++ bzrlib/osutils.py 2010-06-24 20:53:32 +0000 | |||
474 | @@ -1128,6 +1128,14 @@ | |||
475 | 1128 | else: | 1128 | else: |
476 | 1129 | return False | 1129 | return False |
477 | 1130 | 1130 | ||
478 | 1131 | def samefile(f1, f2): | ||
479 | 1132 | """ Just a patch for os.path.samefile which would probably be more helpful | ||
480 | 1133 | if it existed and did this on Windows... | ||
481 | 1134 | """ | ||
482 | 1135 | try: | ||
483 | 1136 | return os.path.samefile(f1, f2) | ||
484 | 1137 | except (AttributeError, OSError): | ||
485 | 1138 | return f1 == f2 | ||
486 | 1131 | 1139 | ||
487 | 1132 | def relpath(base, path): | 1140 | def relpath(base, path): |
488 | 1133 | """Return path relative to base, or raise PathNotChild exception. | 1141 | """Return path relative to base, or raise PathNotChild exception. |
489 | @@ -1152,14 +1160,25 @@ | |||
490 | 1152 | 1160 | ||
491 | 1153 | s = [] | 1161 | s = [] |
492 | 1154 | head = rp | 1162 | head = rp |
493 | 1163 | <<<<<<< TREE | ||
494 | 1155 | while True: | 1164 | while True: |
495 | 1156 | if len(head) <= len(base) and head != base: | 1165 | if len(head) <= len(base) and head != base: |
496 | 1157 | raise errors.PathNotChild(rp, base) | 1166 | raise errors.PathNotChild(rp, base) |
497 | 1158 | if head == base: | 1167 | if head == base: |
498 | 1159 | break | 1168 | break |
499 | 1160 | head, tail = split(head) | 1169 | head, tail = split(head) |
500 | 1170 | ======= | ||
501 | 1171 | while not samefile(head, base): | ||
502 | 1172 | head, tail = os.path.split(head) | ||
503 | 1173 | >>>>>>> MERGE-SOURCE | ||
504 | 1161 | if tail: | 1174 | if tail: |
505 | 1175 | <<<<<<< TREE | ||
506 | 1162 | s.append(tail) | 1176 | s.append(tail) |
507 | 1177 | ======= | ||
508 | 1178 | s.insert(0, tail) | ||
509 | 1179 | else: | ||
510 | 1180 | raise errors.PathNotChild(rp, base) | ||
511 | 1181 | >>>>>>> MERGE-SOURCE | ||
512 | 1163 | 1182 | ||
513 | 1164 | if s: | 1183 | if s: |
514 | 1165 | return pathjoin(*reversed(s)) | 1184 | return pathjoin(*reversed(s)) |
515 | 1166 | 1185 | ||
516 | === modified file 'bzrlib/tests/blackbox/test_add.py' | |||
517 | --- bzrlib/tests/blackbox/test_add.py 2010-02-23 07:43:11 +0000 | |||
518 | +++ bzrlib/tests/blackbox/test_add.py 2010-06-24 20:53:32 +0000 | |||
519 | @@ -19,6 +19,7 @@ | |||
520 | 19 | 19 | ||
521 | 20 | import os | 20 | import os |
522 | 21 | 21 | ||
523 | 22 | <<<<<<< TREE | ||
524 | 22 | from bzrlib import ( | 23 | from bzrlib import ( |
525 | 23 | osutils, | 24 | osutils, |
526 | 24 | tests, | 25 | tests, |
527 | @@ -41,6 +42,14 @@ | |||
528 | 41 | def make_branch_and_tree(self, dir): | 42 | def make_branch_and_tree(self, dir): |
529 | 42 | return super(TestAdd, self).make_branch_and_tree( | 43 | return super(TestAdd, self).make_branch_and_tree( |
530 | 43 | dir, format=self.branch_tree_format) | 44 | dir, format=self.branch_tree_format) |
531 | 45 | ======= | ||
532 | 46 | from bzrlib.tests.blackbox import ExternalBase | ||
533 | 47 | from bzrlib.tests.test_win32utils import NeedsGlobExpansionFeature | ||
534 | 48 | from bzrlib.tests import TestNotApplicable | ||
535 | 49 | |||
536 | 50 | |||
537 | 51 | class TestAdd(ExternalBase): | ||
538 | 52 | >>>>>>> MERGE-SOURCE | ||
539 | 44 | 53 | ||
540 | 45 | def test_add_reports(self): | 54 | def test_add_reports(self): |
541 | 46 | """add command prints the names of added files.""" | 55 | """add command prints the names of added files.""" |
542 | @@ -211,9 +220,29 @@ | |||
543 | 211 | out = self.run_bzr(['add', 'link/top.txt'])[0] | 220 | out = self.run_bzr(['add', 'link/top.txt'])[0] |
544 | 212 | self.assertEquals(out, 'adding top.txt\n') | 221 | self.assertEquals(out, 'adding top.txt\n') |
545 | 213 | 222 | ||
546 | 223 | <<<<<<< TREE | ||
547 | 214 | def test_add_symlink_to_abspath(self): | 224 | def test_add_symlink_to_abspath(self): |
548 | 215 | self.requireFeature(tests.SymlinkFeature) | 225 | self.requireFeature(tests.SymlinkFeature) |
549 | 216 | self.make_branch_and_tree('tree') | 226 | self.make_branch_and_tree('tree') |
550 | 217 | os.symlink(osutils.abspath('target'), 'tree/link') | 227 | os.symlink(osutils.abspath('target'), 'tree/link') |
551 | 218 | out = self.run_bzr(['add', 'tree/link'])[0] | 228 | out = self.run_bzr(['add', 'tree/link'])[0] |
552 | 219 | self.assertEquals(out, 'adding link\n') | 229 | self.assertEquals(out, 'adding link\n') |
553 | 230 | ======= | ||
554 | 231 | def test_add_with_wildcards_unicode(self): | ||
555 | 232 | self.requireFeature(NeedsGlobExpansionFeature) | ||
556 | 233 | self.make_branch_and_tree('.') | ||
557 | 234 | self.build_tree([u'\u1234A', u'\u1235A', u'\u1235AA', 'cc']) | ||
558 | 235 | self.run_bzr(['add', u'\u1234?', u'\u1235*']) | ||
559 | 236 | self.assertEquals(self.run_bzr('unknowns')[0], 'cc\n') | ||
560 | 237 | |||
561 | 238 | def test_add_with_symlink(self): | ||
562 | 239 | if not hasattr(os, "symlink"): | ||
563 | 240 | raise TestNotApplicable("Symbolic links not present") | ||
564 | 241 | |||
565 | 242 | self.make_branch_and_tree('source') | ||
566 | 243 | self.build_tree(['source/top.txt']) | ||
567 | 244 | os.symlink('source', 'link') | ||
568 | 245 | out = self.run_bzr(['add', 'link/top.txt'])[0] | ||
569 | 246 | self.assertEquals(out, 'adding top.txt\n') | ||
570 | 247 | |||
571 | 248 | >>>>>>> MERGE-SOURCE |
Need to audit this; we've clearly got *some* code in a similar direction merged from elsewhere already.