changeset 515:03f27b1381f9

Whitespace cleanups -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Whitespace cleanups manifest hash: ac954bc3a4f034c12638a259ecd65841f5b63c5c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwuubywK+sNU5EO8RAluIAJ98XQpNdZUpSmYKgDmrMRlbL76ZzQCfes0t rknNUN/PhtyA4bzL646dOz4= =UyCE -----END PGP SIGNATURE-----
author mpm@selenic.com
date Wed, 29 Jun 2005 10:42:35 -0800
parents 874e577e332e
children 873228c2f6cf
files hg mercurial/commands.py mercurial/fancyopts.py mercurial/hg.py mercurial/hgweb.py mercurial/lock.py mercurial/mdiff.py mercurial/revlog.py mercurial/transaction.py mercurial/ui.py mercurial/util.py
diffstat 11 files changed, 50 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/hg	Tue Jun 28 11:06:25 2005 -0800
+++ b/hg	Wed Jun 29 10:42:35 2005 -0800
@@ -11,4 +11,3 @@
 from mercurial import commands
 
 commands.run()
-
--- a/mercurial/commands.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/commands.py	Wed Jun 29 10:42:35 2005 -0800
@@ -312,12 +312,12 @@
             update(ui, repo)
 
         success = True
-        
+
     finally:
         if created and not success:
             import shutil
             shutil.rmtree(dest, True)
-    
+
 def commit(ui, repo, *files, **opts):
     """commit the specified files or all outstanding changes"""
     text = opts['text']
--- a/mercurial/fancyopts.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/fancyopts.py	Wed Jun 29 10:42:35 2005 -0800
@@ -10,7 +10,7 @@
         map['-'+s] = map['--'+l]=l
         state[l] = d
         dt[l] = type(d)
-        if not d is None and not callable(d): s, l=s+':', l+'='      
+        if not d is None and not callable(d): s, l=s+':', l+'='
         if s: short = short + s
         if l: long.append(l)
 
--- a/mercurial/hg.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/hg.py	Wed Jun 29 10:42:35 2005 -0800
@@ -231,7 +231,7 @@
             l = e[4]
             pos += 17
             f = st[pos:pos + l]
-            if '\0' in f: 
+            if '\0' in f:
                 f, c = f.split('\0')
                 self.copies[f] = c
             self.map[f] = e[:4]
@@ -244,7 +244,7 @@
 
     def copied(self, file):
         return self.copies.get(file, None)
-        
+
     def update(self, files, state):
         ''' current states:
         n  normal
@@ -345,7 +345,7 @@
         self.ui = ui
 
         if create:
-            os.mkdir(self.path)  
+            os.mkdir(self.path)
             os.mkdir(self.join("data"))
 
         self.opener = opener(self.path)
@@ -478,7 +478,7 @@
         except IOError:
             ds = ""
         self.opener("undo.dirstate", "w").write(ds)
-        
+
         return transaction.transaction(self.opener, self.join("journal"),
                                        self.join("undo"))
 
@@ -668,7 +668,7 @@
         for dir, subdirs, files in os.walk(path):
             d = dir[len(self.root)+1:]
             if ".hg" in subdirs: subdirs.remove(".hg")
-            
+
             for f in files:
                 fn = util.pconvert(os.path.join(d, f))
                 try: s = os.stat(os.path.join(self.root, fn))
@@ -714,10 +714,10 @@
                 del mf1[fn]
             else:
                 added.append(fn)
-                
+
         deleted = mf1.keys()
         deleted.sort()
-    
+
         return (changed, added, deleted)
 
     def add(self, list):
@@ -846,7 +846,7 @@
 
         rep = {}
         reqcnt = 0
-        
+
         unknown = remote.branches(unknown)
         while unknown:
             r = []
@@ -891,7 +891,7 @@
                                       (short(b[0]), short(b[1])))
                         if b[0] not in m and b[0] not in seen:
                             unknown.append(b)
-  
+
         while search:
             n = search.pop(0)
             reqcnt += 1
@@ -969,7 +969,7 @@
                         break
                 d, self.buf = self.buf[:l], self.buf[l:]
                 return d
-                
+
         def getchunk():
             d = source.read(4)
             if not d: return ""
@@ -1270,7 +1270,7 @@
                 self.ui.warn("duplicate changeset at revision %d\n" % i)
                 errors += 1
             seen[n] = 1
-            
+
             for p in self.changelog.parents(n):
                 if p not in self.changelog.nodemap:
                     self.ui.warn("changeset %s has unknown parent %s\n" %
@@ -1293,7 +1293,7 @@
                 self.ui.warn("duplicate manifest at revision %d\n" % i)
                 errors += 1
             seen[n] = 1
-            
+
             for p in self.manifest.parents(n):
                 if p not in self.manifest.nodemap:
                     self.ui.warn("manifest %s has unknown parent %s\n" %
@@ -1408,7 +1408,7 @@
             no = os.environ.get("no_proxy")
         if no:
             no_list = no_list + no.split(",")
-            
+
         no_proxy = 0
         for h in no_list:
             if (path.startswith("http://" + h + "/") or
--- a/mercurial/hgweb.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/hgweb.py	Wed Jun 29 10:42:35 2005 -0800
@@ -76,7 +76,7 @@
             if fl:
                 for f in fl.split("|")[1:]:
                     v = filters[f](v)
-                
+
             yield v
             tmpl = tmpl[m.end(0):]
         else:
@@ -89,7 +89,7 @@
         self.map = {}
         self.base = os.path.dirname(mapfile)
         self.filters = filters
-        
+
         for l in file(mapfile):
             m = re.match(r'(\S+)\s*=\s*"(.*)"$', l)
             if m:
@@ -107,7 +107,7 @@
         except KeyError:
             tmpl = self.cache[t] = file(self.map[t]).read()
         return template(tmpl, self.filters, **map)
-        
+
 class hgweb:
     maxchanges = 10
     maxfiles = 10
@@ -158,7 +158,7 @@
     def diff(self, node1, node2, files):
         def filterfiles(list, files):
             l = [ x for x in list if x in files ]
-            
+
             for f in files:
                 if f[-1] != os.sep: f += os.sep
                 l += [ x for x in list if x.startswith(f) ]
@@ -172,7 +172,7 @@
                          file = f,
                          filenode = hex(fn or nullid))
             parity[0] = 1 - parity[0]
-            
+
         def prettyprintlines(diff):
             for l in diff.splitlines(1):
                 if l.startswith('+'):
@@ -234,7 +234,7 @@
                 if pos - f >= 0: l.insert(0, ("-" + r, pos - f))
 
             yield self.t("naventry", rev = 0, label="(0)")
-                    
+
             for label, rev in l:
                 yield self.t("naventry", label = label, rev = rev)
 
@@ -293,7 +293,7 @@
         p1, p2 = cl.parents(n)
         p1rev, p2rev = cl.rev(p1), cl.rev(p2)
         t = float(changes[2].split(' ')[0])
-        
+
         files = []
         mf = self.repo.manifest.read(changes[0])
         for f in changes[3]:
@@ -330,7 +330,7 @@
         def entries():
             l = []
             parity = (count - 1) & 1
-            
+
             for i in range(count):
 
                 n = fl.node(i)
@@ -423,7 +423,7 @@
                     cnode = ncache[r]
                 except KeyError:
                     cnode = ncache[r] = self.repo.changelog.node(r)
-                    
+
                 try:
                     name = bcache[r]
                 except KeyError:
@@ -474,7 +474,7 @@
         mff=self.repo.manifest.readflags(bin(mnode))
 
         files = {}
- 
+
         p = path[1:]
         l = len(p)
 
@@ -501,7 +501,7 @@
                                  manifest = mnode,
                                  filenode = hex(fnode),
                                  parity = parity,
-                                 basename = f, 
+                                 basename = f,
                                  permissions = mff[full])
                 else:
                     yield self.t("manifestdirentry",
@@ -550,7 +550,7 @@
         p1 = cl.parents(n)[0]
         cs = cl.read(n)
         mf = self.repo.manifest.read(cs[0])
-        
+
         def diff():
             yield self.diff(p1, n, file)
 
@@ -565,7 +565,7 @@
                      p1 = hex(p1),
                      p1rev = self.repo.changelog.rev(p1),
                      diff = diff)
-                     
+
     # add tags to things
     # tags -> list of changesets corresponding to tags
     # find tag, changeset, file
@@ -579,7 +579,7 @@
             b = os.path.basename("map-" + args['style'][0])
             p = os.path.join(self.templates, b)
             if os.path.isfile(p): m = p
-            
+
         self.t = templater(m, self.filters)
 
         if not args.has_key('cmd') or args['cmd'][0] == 'changelog':
@@ -591,7 +591,7 @@
                 except KeyError: pass
 
             write(self.changelog(hi))
-            
+
         elif args['cmd'][0] == 'changeset':
             write(self.changeset(args['node'][0]))
 
@@ -674,7 +674,7 @@
             if p:
                 query = self.path[p + 1:]
                 query = query.replace('+', ' ')
-        
+
             env = {}
             env['GATEWAY_INTERFACE'] = 'CGI/1.1'
             env['REQUEST_METHOD'] = self.command
--- a/mercurial/lock.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/lock.py	Wed Jun 29 10:42:35 2005 -0800
@@ -31,7 +31,7 @@
                     time.sleep(1)
                     continue
                 raise inst
-        
+
     def trylock(self):
         pid = os.getpid()
         try:
--- a/mercurial/mdiff.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/mdiff.py	Wed Jun 29 10:42:35 2005 -0800
@@ -47,7 +47,7 @@
     la = lb = 0
     lena = len(a)
     lenb = len(b)
-    
+
     while 1:
         am, bm, = la, lb
 
@@ -65,14 +65,14 @@
 
         if lb >= lenb:
             break
-        
+
         # skip mismatched lines from a
         while la < lena and lb < lenb and b[lb] > a[la]:
             la += 1
 
         if la >= lena:
             break
-        
+
     yield (lena, lenb, 0)
 
 def diff(a, b, sorted=0):
@@ -100,7 +100,7 @@
             bin.append(struct.pack(">lll", p[la], p[am], len(s)) + s)
         la = am + size
         lb = bm + size
-    
+
     return "".join(bin)
 
 def patchtext(bin):
--- a/mercurial/revlog.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/revlog.py	Wed Jun 29 10:42:35 2005 -0800
@@ -64,14 +64,14 @@
             end = self.l
             self.revlog.index = self.index
             self.revlog.nodemap = self.map
-            
+
         while i < end:
             d = self.data[i * self.s: (i + 1) * self.s]
             e = struct.unpack(indexformat, d)
             self.index[i] = e
             self.map[e[6]] = i
             i += 1
-        
+
 class lazyindex:
     def __init__(self, parser):
         self.p = parser
@@ -84,7 +84,7 @@
         return self.p.index[pos] or self.load(pos)
     def append(self, e):
         self.p.index.append(e)
-        
+
 class lazymap:
     def __init__(self, parser):
         self.p = parser
@@ -150,7 +150,6 @@
 
             self.nodemap = dict(m)
             self.nodemap[nullid] = -1
-            
 
     def tip(self): return self.node(len(self.index) - 1)
     def count(self): return len(self.index)
@@ -189,7 +188,7 @@
                 elif pn == nullid:
                     continue
         return c
-    
+
     def lookup(self, id):
         try:
             rev = int(id)
@@ -205,7 +204,7 @@
             if len(c) > 1: raise KeyError("Ambiguous identifier")
             if len(c) < 1: raise KeyError("No match found")
             return c[0]
-                
+
         return None
 
     def diff(self, a, b):
@@ -263,7 +262,7 @@
                           % (self.datafile, rev))
 
         self.cache = (node, rev, text)
-        return text  
+        return text
 
     def addrevision(self, text, transaction, link, p1=None, p2=None):
         if text is None: text = ""
@@ -300,7 +299,7 @@
             offset = self.end(t)
 
         e = (offset, len(data), base, link, p1, p2, node)
-        
+
         self.index.append(e)
         self.nodemap[node] = n
         entry = struct.pack(indexformat, *e)
@@ -320,7 +319,7 @@
             n = self.node(i)
             p1, p2 = self.parents(n)
             dist[n] = max(dist[p1], dist[p2]) + 1
-        
+
         # traverse ancestors in order of decreasing distance from root
         def ancestors(node):
             # we store negative distances because heap returns smallest member
@@ -441,7 +440,7 @@
                     ta = construct(ta, base, a)
                 else:
                     ta = ""
-                    
+
                 base = self.base(b)
                 if a > base:
                     base = a
@@ -471,7 +470,7 @@
         r = self.count()
         t = r - 1
         node = nullid
-        
+
         base = prev = -1
         start = end = 0
         if r:
--- a/mercurial/transaction.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/transaction.py	Wed Jun 29 10:42:35 2005 -0800
@@ -65,7 +65,7 @@
         self.entries = []
 
         print "rollback completed"
-        
+
 def rollback(opener, file):
     for l in open(file).readlines():
         f, o = l.split('\0')
--- a/mercurial/ui.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/ui.py	Wed Jun 29 10:42:35 2005 -0800
@@ -84,4 +84,3 @@
         t = re.sub("(?m)^HG:.*\n", "", t)
 
         return t
-    
--- a/mercurial/util.py	Tue Jun 28 11:06:25 2005 -0800
+++ b/mercurial/util.py	Wed Jun 29 10:42:35 2005 -0800
@@ -21,7 +21,7 @@
         val = os.STOPSIG(code)
         return "stopped by signal %d" % val, val
     raise ValueError("invalid exit code")
-    
+
 def system(cmd, errprefix = "abort"):
     """execute a shell command that must succeed"""
     rc = os.system(cmd)
@@ -46,7 +46,7 @@
 
     def set_exec(f, mode):
         pass
-    
+
     def pconvert(path):
         return path.replace("\\", "/")