Merge lp:~beuno/bzr-upload/bug-499525 into lp:bzr-upload

Proposed by Martin Albisetti on 2009-12-23
Status: Rejected
Rejected by: Vincent Ladeuil on 2010-01-06
Proposed branch: lp:~beuno/bzr-upload/bug-499525
Merge into: lp:bzr-upload
Diff against target: 46 lines (+17/-2)
2 files modified
__init__.py (+4/-2)
tests/test_upload.py (+13/-0)
To merge this branch: bzr merge lp:~beuno/bzr-upload/bug-499525
Reviewer Review Type Date Requested Status
Vincent Ladeuil 2009-12-23 Disapprove on 2010-01-06
Review via email: mp+16552@code.launchpad.net
To post a comment you must log in.
Martin Albisetti (beuno) wrote :

This branch fixes bug 499525, which makes the behavior of ignoring directories wonky since it tries to upload files to unexisting dirs.

Vincent Ladeuil (vila) wrote :

Counter-proposal here: https://code.edge.launchpad.net/~vila/bzr-upload/499525-ignore/+merge/16906

The problem was far more complex than I initially thought, but I think the (counter-:)proposed implementation should address the same issues.

Voting disapprove here really means that the discussion should continue on the other merge proposal.

review: Disapprove

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '__init__.py'
2--- __init__.py 2009-12-02 10:02:05 +0000
3+++ __init__.py 2009-12-23 19:22:13 +0000
4@@ -289,7 +289,8 @@
5
6 def upload_file(self, relpath, id, mode=None):
7 ignored_files = self.get_ignored()
8- if relpath not in ignored_files:
9+ is_ignored = osutils.is_inside_any(ignored_files, relpath)
10+ if is_ignored is False:
11 if mode is None:
12 if self.tree.is_executable(id):
13 mode = 0775
14@@ -322,7 +323,8 @@
15
16 def make_remote_dir(self, relpath, mode=None):
17 ignored_files = self.get_ignored()
18- if relpath not in ignored_files:
19+ is_ignored = osutils.is_inside_any(ignored_files, relpath)
20+ if is_ignored is False:
21 if mode is None:
22 mode = 0775
23 self.to_transport.mkdir(relpath, mode)
24
25=== modified file 'tests/test_upload.py'
26--- tests/test_upload.py 2009-12-02 10:02:05 +0000
27+++ tests/test_upload.py 2009-12-23 19:22:13 +0000
28@@ -462,6 +462,19 @@
29
30 self.failIfUpFileExists('dir')
31
32+ def test_ignore_nested_directory(self):
33+ self.make_branch_and_working_tree()
34+ self.do_full_upload()
35+ self.add_file('.bzrignore-upload','dir')
36+ self.add_dir('dir')
37+ self.add_dir('dir/foo')
38+ self.add_file('dir/foo/bar','')
39+
40+ self.do_upload()
41+
42+ self.failIfUpFileExists('dir')
43+ self.failIfUpFileExists('dir/foo/bar')
44+
45
46 class TestFullUpload(tests.TestCaseWithTransport, TestUploadMixin):
47

Subscribers

People subscribed via source and target branches

to status/vote changes: