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

Proposed by Martin Albisetti
Status: Rejected
Rejected by: Vincent Ladeuil
Proposed branch: lp://staging/~beuno/bzr-upload/bug-499525
Merge into: lp://staging/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://staging/~beuno/bzr-upload/bug-499525
Reviewer Review Type Date Requested Status
Vincent Ladeuil Disapprove
Review via email: mp+16552@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
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.

Revision history for this message
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
=== modified file '__init__.py'
--- __init__.py 2009-12-02 10:02:05 +0000
+++ __init__.py 2009-12-23 19:22:13 +0000
@@ -289,7 +289,8 @@
289289
290 def upload_file(self, relpath, id, mode=None):290 def upload_file(self, relpath, id, mode=None):
291 ignored_files = self.get_ignored()291 ignored_files = self.get_ignored()
292 if relpath not in ignored_files:292 is_ignored = osutils.is_inside_any(ignored_files, relpath)
293 if is_ignored is False:
293 if mode is None:294 if mode is None:
294 if self.tree.is_executable(id):295 if self.tree.is_executable(id):
295 mode = 0775296 mode = 0775
@@ -322,7 +323,8 @@
322323
323 def make_remote_dir(self, relpath, mode=None):324 def make_remote_dir(self, relpath, mode=None):
324 ignored_files = self.get_ignored()325 ignored_files = self.get_ignored()
325 if relpath not in ignored_files:326 is_ignored = osutils.is_inside_any(ignored_files, relpath)
327 if is_ignored is False:
326 if mode is None:328 if mode is None:
327 mode = 0775329 mode = 0775
328 self.to_transport.mkdir(relpath, mode)330 self.to_transport.mkdir(relpath, mode)
329331
=== modified file 'tests/test_upload.py'
--- tests/test_upload.py 2009-12-02 10:02:05 +0000
+++ tests/test_upload.py 2009-12-23 19:22:13 +0000
@@ -462,6 +462,19 @@
462462
463 self.failIfUpFileExists('dir')463 self.failIfUpFileExists('dir')
464464
465 def test_ignore_nested_directory(self):
466 self.make_branch_and_working_tree()
467 self.do_full_upload()
468 self.add_file('.bzrignore-upload','dir')
469 self.add_dir('dir')
470 self.add_dir('dir/foo')
471 self.add_file('dir/foo/bar','')
472
473 self.do_upload()
474
475 self.failIfUpFileExists('dir')
476 self.failIfUpFileExists('dir/foo/bar')
477
465478
466class TestFullUpload(tests.TestCaseWithTransport, TestUploadMixin):479class TestFullUpload(tests.TestCaseWithTransport, TestUploadMixin):
467480

Subscribers

People subscribed via source and target branches

to status/vote changes: