Uhm, looks fine but this belongs on mercurial-deve...@selenic.com On Mon, Jan 18, 2010 at 12:48 PM, <pa...@luma-pictures.com> wrote: > # HG changeset patch > # User paulm > # Date 1263840299 28800 > # Branch stable > # Node ID f6e36cf2a7ff6c97a2b0a269b20546fe2853a91c > # Parent 439d7ea6fe3aa4ab9ec274a68846779153789de9 > merge: if action is permissions change, but not owner, change action to get > > If we're not the file owner, we won't have permissions to > change executable permission bit... but (as long as we have read/write > access to directory), we can just delete / recreate the file, which is > essentially what the "get" action does - so do that instead > > diff -r 439d7ea6fe3a -r f6e36cf2a7ff mercurial/merge.py > --- a/mercurial/merge.py Tue Dec 01 19:28:15 2009 -0600 > +++ b/mercurial/merge.py Mon Jan 18 10:44:59 2010 -0800 > @@ -125,6 +125,7 @@ > partial = function to filter file lists > """ > > + print "merging manifests" > def fmerge(f, f2, fa): > """merge flags""" > a, m, n = ma.flags(fa), m1.flags(f), m2.flags(f2) > @@ -183,7 +184,15 @@ > a = ma.get(f, nullid) > if n == m2[f] or m2[f] == a: # same or local newer > if m1.flags(f) != rflags: > - act("update permissions", "e", f, rflags) > + # If we're not the owner we won't be > + # allowed to change permissions; > + # in this case, act like we're checking out > + # the file, which should work as long as > + # we have write permissions to the directory > + if not util.isowner(os.stat(f)): > + act("remote is newer", "g", f, rflags) > + else: > + act("update permissions", "e", f, rflags) > elif n == a: # remote newer > act("remote is newer", "g", f, rflags) > else: # both changed > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Tortoisehg-develop mailing list > Tortoisehg-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop >
------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop