comparison mercurial/localrepo.py @ 4633:ff7253a0d1da

Cleanup of whitespace, indentation and line continuation.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 19 Jun 2007 08:06:37 +0200
parents fff50306e6dd
children 63b9d2deed48
comparison
equal deleted inserted replaced
4632:8d46056960ab 4633:ff7253a0d1da
203 if key in filetags: 203 if key in filetags:
204 n, h = filetags[key] 204 n, h = filetags[key]
205 h.append(n) 205 h.append(n)
206 filetags[key] = (bin_n, h) 206 filetags[key] = (bin_n, h)
207 207
208 for k,nh in filetags.items(): 208 for k, nh in filetags.items():
209 if k not in globaltags: 209 if k not in globaltags:
210 globaltags[k] = nh 210 globaltags[k] = nh
211 continue 211 continue
212 # we prefer the global tag if: 212 # we prefer the global tag if:
213 # it supercedes us OR 213 # it supercedes us OR
214 # mutual supercedes and it has a higher rank 214 # mutual supercedes and it has a higher rank
215 # otherwise we win because we're tip-most 215 # otherwise we win because we're tip-most
216 an, ah = nh 216 an, ah = nh
217 bn, bh = globaltags[k] 217 bn, bh = globaltags[k]
218 if bn != an and an in bh and \ 218 if (bn != an and an in bh and
219 (bn not in ah or len(bh) > len(ah)): 219 (bn not in ah or len(bh) > len(ah))):
220 an = bn 220 an = bn
221 ah.extend([n for n in bh if n not in ah]) 221 ah.extend([n for n in bh if n not in ah])
222 globaltags[k] = an, ah 222 globaltags[k] = an, ah
223 223
224 # read the tags file from each head, ending with the tip 224 # read the tags file from each head, ending with the tip
669 else: 669 else:
670 branchname = "" 670 branchname = ""
671 671
672 if use_dirstate: 672 if use_dirstate:
673 oldname = c1[5].get("branch") # stored in UTF-8 673 oldname = c1[5].get("branch") # stored in UTF-8
674 if not commit and not remove and not force and p2 == nullid and \ 674 if (not commit and not remove and not force and p2 == nullid
675 branchname == oldname: 675 and branchname == oldname):
676 self.ui.status(_("nothing changed\n")) 676 self.ui.status(_("nothing changed\n"))
677 return None 677 return None
678 678
679 xp1 = hex(p1) 679 xp1 = hex(p1)
680 if p2 == nullid: xp2 = '' 680 if p2 == nullid: xp2 = ''
913 mf2keys = mf2.keys() 913 mf2keys = mf2.keys()
914 mf2keys.sort() 914 mf2keys.sort()
915 getnode = lambda fn: mf1.get(fn, nullid) 915 getnode = lambda fn: mf1.get(fn, nullid)
916 for fn in mf2keys: 916 for fn in mf2keys:
917 if mf1.has_key(fn): 917 if mf1.has_key(fn):
918 if mf1.flags(fn) != mf2.flags(fn) or \ 918 if (mf1.flags(fn) != mf2.flags(fn) or
919 (mf1[fn] != mf2[fn] and (mf2[fn] != "" or 919 (mf1[fn] != mf2[fn] and
920 fcmp(fn, getnode))): 920 (mf2[fn] != "" or fcmp(fn, getnode)))):
921 modified.append(fn) 921 modified.append(fn)
922 elif list_clean: 922 elif list_clean:
923 clean.append(fn) 923 clean.append(fn)
924 del mf1[fn] 924 del mf1[fn]
925 else: 925 else: