##// END OF EJS Templates
Removed trailing whitespace and tabs from python files
Thomas Arendsen Hein -
r4516:96d8a56d default
parent child Browse files
Show More
@@ -50,7 +50,7 b' class converter_source(object):'
50 50
51 51 def getchanges(self, version):
52 52 """Return sorted list of (filename, id) tuples for all files changed in rev.
53
53
54 54 id just tells us which revision to return in getfile(), e.g. in
55 55 git it's an object hash."""
56 56 raise NotImplementedError()
@@ -252,7 +252,7 b' class convert_cvs(converter_source):'
252 252 user, host, root = m.group(1), m.group(2), m.group(3)
253 253
254 254 if conntype != "pserver":
255 if conntype == "rsh":
255 if conntype == "rsh":
256 256 rsh = os.environ.get("CVS_RSH" or "rsh")
257 257 if user:
258 258 cmd = [rsh, '-l', user, host] + cmd
@@ -1,7 +1,7 b''
1 1 # ASCII graph log extension for Mercurial
2 2 #
3 3 # Copyright 2007 Joel Rosdahl <joel@rosdahl.net>
4 #
4 #
5 5 # This software may be used and distributed according to the terms of
6 6 # the GNU General Public License, incorporated herein by reference.
7 7
@@ -83,12 +83,12 b' def _check_missing(ui, repo, missing, fo'
83 83 dirstate.walk() can yield filenames different from the ones
84 84 stored in the dirstate. This already confuses the status and
85 85 add commands, but with purge this may cause data loss.
86
86
87 87 To prevent this, _check_missing will abort if there are missing
88 files. The force option will let the user skip the check if he
88 files. The force option will let the user skip the check if he
89 89 knows it is safe.
90
91 Even with the force option this function will check if any of the
90
91 Even with the force option this function will check if any of the
92 92 missing files is still available in the working dir: if so there
93 93 may be some problem with the underlying filesystem, so it
94 94 aborts unconditionally."""
@@ -336,7 +336,7 b' class transplanter:'
336 336 inmsg = True
337 337 message.append(line)
338 338 return (node, user, date, '\n'.join(message), parents)
339
339
340 340 def log(self, user, date, message, p1, p2, merge=False):
341 341 '''journal changelog metadata for later recover'''
342 342
@@ -901,7 +901,7 b' def debuginstall(ui):'
901 901 fa = writetemp(a)
902 902 d = mdiff.unidiff(a, None, b, None, os.path.basename(fa))
903 903 fd = writetemp(d)
904
904
905 905 files = {}
906 906 try:
907 907 patch.patch(fd, ui, cwd=os.path.dirname(fa), files=files)
@@ -909,7 +909,7 b' def debuginstall(ui):'
909 909 ui.write(_(" patch call failed:\n"))
910 910 ui.write(" " + str(e) + "\n")
911 911 problems += 1
912 else:
912 else:
913 913 if list(files) != [os.path.basename(fa)]:
914 914 ui.write(_(" unexpected patch output!"))
915 915 ui.write(_(" (you may have an incompatible version of patch)\n"))
@@ -919,7 +919,7 b' def debuginstall(ui):'
919 919 ui.write(_(" patch test failed!"))
920 920 ui.write(_(" (you may have an incompatible version of patch)\n"))
921 921 problems += 1
922
922
923 923 os.unlink(fa)
924 924 os.unlink(fd)
925 925
@@ -2548,7 +2548,7 b' def tags(ui, repo):'
2548 2548 hexfunc = ui.debugflag and hex or short
2549 2549 for t, n in l:
2550 2550 try:
2551 hn = hexfunc(n)
2551 hn = hexfunc(n)
2552 2552 r = "%5d:%s" % (repo.changelog.rev(n), hexfunc(n))
2553 2553 except revlog.LookupError:
2554 2554 r = " ?:%s" % hn
@@ -195,11 +195,11 b' def create_server(ui, repo):'
195 195 pass
196 196
197 197 class MercurialHTTPServer(object, _mixin, BaseHTTPServer.HTTPServer):
198
198
199 199 # SO_REUSEADDR has broken semantics on windows
200 200 if os.name == 'nt':
201 201 allow_reuse_address = 0
202
202
203 203 def __init__(self, *args, **kargs):
204 204 BaseHTTPServer.HTTPServer.__init__(self, *args, **kargs)
205 205 self.accesslog = accesslog
@@ -208,7 +208,7 b' class httprepository(remoterepository):'
208 208 # 1.0 here is the _protocol_ version
209 209 opener.addheaders = [('User-agent', 'mercurial/proto-1.0')]
210 210 urllib2.install_opener(opener)
211
211
212 212 def __del__(self):
213 213 if self.handler:
214 214 self.handler.close_all()
@@ -651,8 +651,8 b' class localrepository(repo.repository):'
651 651 cp = self.dirstate.copied(fn)
652 652 if cp:
653 653 # Mark the new revision of this file as a copy of another
654 # file. This copy data will effectively act as a parent
655 # of this new revision. If this is a merge, the first
654 # file. This copy data will effectively act as a parent
655 # of this new revision. If this is a merge, the first
656 656 # parent will be the nullid (meaning "look up the copy data")
657 657 # and the second one will be the other parent. For example:
658 658 #
@@ -305,7 +305,7 b' def patch(patchname, ui, strip=1, cwd=No'
305 305 raise util.Abort(_('no patch command found in hgrc or PATH'))
306 306 if util.needbinarypatch():
307 307 args.append('--binary')
308
308
309 309 if cwd:
310 310 args.append('-d %s' % util.shellquote(cwd))
311 311 fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
@@ -823,7 +823,7 b" if os.name == 'nt':"
823 823 if inst.errno != 0: raise
824 824 self.close()
825 825 raise IOError(errno.EPIPE, 'Broken pipe')
826
826
827 827 def flush(self):
828 828 try:
829 829 return self.fp.flush()
@@ -912,7 +912,7 b" if os.name == 'nt':"
912 912 # username and groupname functions above, too.
913 913 def isowner(fp, st=None):
914 914 return True
915
915
916 916 def find_in_path(name, path, default=None):
917 917 '''find name in search path. path can be string (will be split
918 918 with os.pathsep), or iterable thing that returns strings. if name
@@ -920,17 +920,17 b" if os.name == 'nt':"
920 920 using cmd.exe rules, using PATHEXT.'''
921 921 if isinstance(path, str):
922 922 path = path.split(os.pathsep)
923
923
924 924 pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD')
925 925 pathext = pathext.lower().split(os.pathsep)
926 926 isexec = os.path.splitext(name)[1].lower() in pathext
927
927
928 928 for p in path:
929 929 p_name = os.path.join(p, name)
930
930
931 931 if isexec and os.path.exists(p_name):
932 932 return p_name
933
933
934 934 for ext in pathext:
935 935 p_name_ext = p_name + ext
936 936 if os.path.exists(p_name_ext):
@@ -1074,7 +1074,7 b' else:'
1074 1074 if st is None:
1075 1075 st = fstat(fp)
1076 1076 return st.st_uid == os.getuid()
1077
1077
1078 1078 def find_in_path(name, path, default=None):
1079 1079 '''find name in search path. path can be string (will be split
1080 1080 with os.pathsep), or iterable thing that returns strings. if name
@@ -38,7 +38,7 b' def split_lines(t):'
38 38 # common base
39 39 TZU = split_lines(""" The Nameless is the origin of Heaven and Earth;
40 40 The named is the mother of all things.
41
41
42 42 Therefore let there always be non-being,
43 43 so we may see their subtlety,
44 44 And let there always be being,
@@ -69,7 +69,7 b' TAO = split_lines(""" The Way that c'
69 69 The name that can be named is not the eternal name.
70 70 The Nameless is the origin of Heaven and Earth;
71 71 The named is the mother of all things.
72
72
73 73 Therefore let there always be non-being,
74 74 so we may see their subtlety,
75 75 And let there always be being,
@@ -77,7 +77,7 b' TAO = split_lines(""" The Way that c'
77 77 The two are the same,
78 78 But after they are produced,
79 79 they have different names.
80
80
81 81 -- The Way of Lao-Tzu, tr. Wing-tsit Chan
82 82
83 83 """)
@@ -95,7 +95,7 b' MERGED_RESULT = split_lines(""" The '
95 95 they have different names.
96 96 <<<<<<< LAO
97 97 =======
98
98
99 99 -- The Way of Lao-Tzu, tr. Wing-tsit Chan
100 100
101 101 >>>>>>> TAO
@@ -144,7 +144,7 b' class TestMerge3(TestCase):'
144 144 self.assertEquals(list(m3.merge_groups()),
145 145 [('a', ['aaa', 'bbb']),
146 146 ('unchanged', ['zz'])])
147
147
148 148 def test_null_insert(self):
149 149 m3 = Merge3([],
150 150 ['aaa', 'bbb'],
@@ -235,7 +235,7 b' 333'
235 235 mid_marker='--',
236 236 end_marker='>>')
237 237 self.assertEquals(''.join(ml), 'aaa\n222\nbbb\n')
238
238
239 239
240 240 def test_insert_clash(self):
241 241 """Both try to insert lines in the same place."""
@@ -370,7 +370,7 b' bbb'
370 370 this_text = ("a\n"*10+"b\n" * 10).splitlines(True)
371 371 other_text = ("a\n"*10+"c\n"+"b\n" * 8 + "c\n").splitlines(True)
372 372 m3 = Merge3(base_text, other_text, this_text)
373 m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True,
373 m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True,
374 374 base_marker='|||||||')
375 375 self.assertRaises(CantReprocessAndShowBase, list, m_lines)
376 376
@@ -155,7 +155,7 b" print 'untrusted:'"
155 155 print u2.config('foobar', 'baz', untrusted=True)
156 156 print u2.config('paths', 'interpolated', untrusted=True)
157 157
158 print
158 print
159 159 print "# error handling"
160 160
161 161 def assertraises(f, exc=util.Abort):
General Comments 0
You need to be logged in to leave comments. Login now