Mercurial > hg
view tests/test-revert-flags.t @ 33768:82d564d5ac4f
sshpeer: make instance attributes and methods internal
Peer types are supposed to conform to a formal interface defined by
peer.peerrepository and wireproto.wirepeer. Every "public" attribute on
*peer types makes it harder to understand what attributes are part
of the interface and what are instance specific.
This commit converts a number of "public" instance attributes and
methods on sshpeer to internal so they can't be confused to be part of
the peer API.
The URL-related instance attributes were introduced in 876333a295ff
in 2005. AFAICT most of them aren't used and could potentially be
removed. But I kept them around anyway.
I also reorded some code to make things slightly easier to read.
.. api::
Rename attributes on sshpeer to reflect peer API
Differential Revision: https://phab.mercurial-scm.org/D331
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 10 Aug 2017 20:55:28 -0700 |
parents | 7a9cbb315d84 |
children |
line wrap: on
line source
#require execbit $ hg init repo $ cd repo $ echo foo > foo $ chmod 644 foo $ hg ci -qAm '644' $ chmod 755 foo $ hg ci -qAm '755' reverting to rev 0 $ hg revert -a -r 0 reverting foo $ hg st M foo $ hg diff --git diff --git a/foo b/foo old mode 100755 new mode 100644 $ cd ..