Error during merge: No final name for trans_id 'new-70'
John Arbash Meinel
john at arbash-meinel.com
Wed Sep 19 07:54:27 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 9/19/2012 11:36 AM, Thorsten Glaser wrote:
> On Tue, 18 Sep 2012, Aaron Bentley wrote:
>
>>> Also, it would be very handy if bzr could resolve these types
>>> of conflicts automatically. Can bzr automatically ignore
>>> changes for files which are removed in the target branch?
>>
>> No, but you could certainly extend resolve or write a plugin to
>> clean it up afterward.
>
> That would be so awesome! I’m working on something where I’d love
> to delete lots of junk (unused or even not DFSG- free) from the
> code, but that makes merging a PITA.
>
> On the other hand, I can imagine a situation where I’d want to have
> the directory added back, so I’d probably need that on a
> case-by-case basis. Or something like
> deleted-subdirectories-to-ignore-on-merge=foo,bar/baz/*/bla,…
>
> bye, //mirabilos
>
I thought someone wrote a plugin to say something like "DELETE
supersedes modifications".
I forget exactly how to write it, but you are looking to inherit from
bzrlib.merge.PerFileMerger and define something like:
class DeleteWinsMerger(PerFileMerger):
def file_matches(self, params):
if params.this_kind is None:
# In this tree the object is deleted, so we match
return True
return False
def merge_matching(self, merge_params):
return ('delete', None)
You can look at bzrlib/plugin/news_merge/__init__.py for how to let
bzr know about your custom merger.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBZejMACgkQJdeBCYSNAAPPQQCbBq2YPweDlJPDtYnFQBiRRM3+
8dIAn29VNpnyjSe6oA9iExjysszX+WlW
=1NMl
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list