Mercurial > hg
diff mercurial/exchange.py @ 23082:0fc4686de1d7 stable
exchange: don't report failure from identical bookmarks
b901645a8784 regressed the behavior of pushing an unchanged bookmark to
a remote. Before that commit, pushing a unchanged bookmark would result
in "exporting bookmark @" being printed. After that commit, we now see
an incorrect message "bookmark %s does not exist on the local or remote
repository!"
This patch fixes the regression introduced by b901645a8784 by having
the bookmark error reporting code filter identical bookmarks and adds
a test for the behavior.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 24 Oct 2014 17:24:46 -0500 |
parents | e62c330a044f |
children | e53f6b72a0e4 2e65da5f80df |
line wrap: on
line diff
--- a/mercurial/exchange.py Fri Oct 24 10:40:37 2014 -0700 +++ b/mercurial/exchange.py Fri Oct 24 17:24:46 2014 -0500 @@ -355,6 +355,10 @@ explicit.remove(b) # treat as "deleted locally" pushop.outbookmarks.append((b, dcid, '')) + # identical bookmarks shouldn't get reported + for b, scid, dcid in same: + if b in explicit: + explicit.remove(b) if explicit: explicit = sorted(explicit)