Mercurial > evolve
changeset 131:3124889cad55
keep branch on amend
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 23 Jan 2012 18:22:10 +0100 |
parents | b70fadbccc2a |
children | 64d16f07d67f |
files | hgext/evolution.py hgext/obsolete.py |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolution.py Wed Jan 11 17:01:06 2012 +0100 +++ b/hgext/evolution.py Mon Jan 23 18:22:10 2012 +0100 @@ -307,6 +307,9 @@ branch = opts.get('branch') if branch: opts.setdefault('extra', {})['branch'] = branch + else: + if old.branch() != 'default': + opts.setdefault('extra', {})['branch'] = old.branch() lock = repo.lock() try:
--- a/hgext/obsolete.py Wed Jan 11 17:01:06 2012 +0100 +++ b/hgext/obsolete.py Mon Jan 23 18:22:10 2012 +0100 @@ -302,6 +302,8 @@ sub = None if obj in self._obssubrels.get(sub, set()): return 0 + if sub == obj: + return 0 self._obssubrels.setdefault(sub, set()).add(obj) self._obsobjrels.setdefault(obj, set()).add(sub) try: