# HG changeset patch # User mpm@selenic.com # Date 2005-06-08 18:46:39 # Node ID 79279550c8ffa4cf556e403e9855bc1ed28b8bdd # Parent 10e325db7347208964fbb934b640fdd3af14359c merge: update permissions even if file contents didn't change -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 merge: update permissions even if file contents didn't change manifest hash: f24ed7970c6ca48329a7aa9c2037d96333f7172e -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCpz0PywK+sNU5EO8RArOMAJ9CImCJMdubq5HsB3KrxOt1EG7PEgCgpPWg lnVxviZhv31EHtnxujQBoqM= =qxYq -----END PGP SIGNATURE----- diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -896,6 +896,8 @@ class localrepository: for f, n in mw.iteritems(): if f in m2: + s = 0 + if n != m2[f]: a = ma.get(f, nullid) if n != a and m2[f] != a: @@ -906,9 +908,24 @@ class localrepository: a, b, c = mfa.get(f, 0), mfw[f], mf2[f] mode = ((a^b) | (a^c)) ^ a merge[f] = (m1.get(f, nullid), m2[f], mode) + s = 1 elif m2[f] != a: self.ui.debug(" remote %s is newer, get\n" % f) get[f] = m2[f] + s = 1 + + if not s and mfw[f] != mf2[f]: + if force: + self.ui.debug(" updating permissions for %s\n" % f) + set_exec(self.wjoin(f), mf2[f]) + else: + a, b, c = mfa.get(f, 0), mfw[f], mf2[f] + mode = ((a^b) | (a^c)) ^ a + print a, b, c, mode + if mode != b: + self.ui.debug(" updating permissions for %s\n" % f) + set_exec(self.wjoin(f), mode) + del m2[f] elif f in ma: if not force and n != ma[f]: