Merge lp:~mnn282/bzr/auto-rename-fix into lp:bzr
Proposed by
mnn
Status: | Needs review |
---|---|
Proposed branch: | lp:~mnn282/bzr/auto-rename-fix |
Merge into: | lp:bzr |
Diff against target: |
51 lines (+25/-1) 2 files modified
bzrlib/rename_map.py (+8/-1) bzrlib/tests/test_rename_map.py (+17/-0) |
To merge this branch: | bzr merge lp:~mnn282/bzr/auto-rename-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Packman (community) | Approve | ||
bzr-core | Pending | ||
Review via email: mp+117203@code.launchpad.net |
Description of the change
Fixed bug with RenameMap (bzr move --auto), also RenameMap has ability to detect files moved into new unversioned directories.
To post a comment you must log in.
Thanks for working on this!
I'm still a little uncertain on the core logic here, will look again later.
+ if self.tree. has_filename( self.tree. id2path( parent[ 0])) == False:
Normal style is not to compare against booleans, just use `if not condition` instead.
+ self.assertEqua l('added: \n folder/\nrenamed:\n file => folder/file2\n', bzr("status" )[0])
+ self.run_
At this level, in bzrlib.tests rather than bzrlib. tests.blackbox, you really want to be writing assertions based on api calls rather than the commandline ui. Mostly this just confirms the check above, but adding an assertion for the current tree shape does seem reasonable.
I see you've already fixed the other style stuff I mentioned on IRC, thanks!