[PATCH 2 of 2 V2] push: move handling of explicitly pushed bookmarks into localrepo.push()

Kevin Bullock kbullock+mercurial at ringworld.org
Mon Dec 10 12:03:56 CST 2012


On Dec 10, 2012, at 4:49 AM, Pierre-Yves David wrote:

> On Fri, Dec 07, 2012 at 01:43:16PM -0600, Kevin Bullock wrote:
>> +        for b in marks:
>> +            # explicit push overrides remote bookmark if any
>> +            if b in unfi._bookmarks:
>> +                unfi.ui.status(_("exporting bookmark %s\n") % b)
>> +                new = unfi[b].hex()
>> +            elif b in rb:
>> +                unfi.ui.status(_("deleting remote bookmark %s\n") % b)
>> +                new = '' # delete
>> +            else:
>> +                unfi.ui.warn(_('bookmark %s does not exist on the local '
>> +                               'or remote repository!\n') % b)
>> +                break
>> +            old = rb.get(b, '')
>> +            r = remote.pushkey('bookmarks', b, old, new)
>> +            if not r:
>> +                unfi.ui.warn(_('updating bookmark %s failed!\n') % b)
> 
> can't this be  factored with the sync of common bookmark?
> (and break still want to be a continue)

Yes. Again, just limiting my scope to the task at hand for now.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121210/aeead26b/attachment.pgp>


More information about the Mercurial-devel mailing list