##// END OF EJS Templates
Remove trailing spaces, fix indentation
Thomas Arendsen Hein -
r5143:d4fa6baf default
parent child Browse files
Show More
@@ -32,7 +32,7 b' proc ::tk::MouseWheel {wFired X Y D {shi'
32 32 # if we are outside the app, try and scroll the focus widget
33 33 if {![winfo exists $w]} { catch {set w [focus]} }
34 34 if {[winfo exists $w]} {
35
35
36 36 if {[bind $w $evt] ne ""} {
37 37 # Awkward ... this widget has a MouseWheel binding, but to
38 38 # trigger successfully in it, we must give it focus.
@@ -70,7 +70,7 b' proc ::tk::MouseWheel {wFired X Y D {shi'
70 70 bind all <MouseWheel> [list ::tk::MouseWheel %W %X %Y %D 0]
71 71
72 72 # end of win32 section
73 }
73 }
74 74
75 75
76 76 proc gitdir {} {
@@ -326,7 +326,7 b' class filemapper(object):'
326 326 except KeyError, err:
327 327 pass
328 328 return '', name, ''
329
329
330 330 def __call__(self, name):
331 331 if self.include:
332 332 inc = self.lookup(name, self.include)[0]
@@ -7,7 +7,7 b' def encodeargs(args):'
7 7 lines = base64.encodestring(s)
8 8 lines = [l.splitlines()[0] for l in lines]
9 9 return ''.join(lines)
10
10
11 11 s = pickle.dumps(args)
12 12 return encodearg(s)
13 13
@@ -165,7 +165,7 b' class mercurial_source(converter_source)'
165 165 except TypeError:
166 166 pass
167 167 return copies
168
168
169 169 def getcommit(self, rev):
170 170 ctx = self.changectx(rev)
171 171 parents = [hex(p.node()) for p in ctx.parents() if p.node() != nullid]
@@ -67,8 +67,8 b' def get_log_child(fp, url, paths, start,'
67 67 for k, v in orig_paths.iteritems():
68 68 orig_paths[k] = changedpath(v)
69 69 pickle.dump((orig_paths, revnum, author, date, message),
70 fp, protocol)
71
70 fp, protocol)
71
72 72 try:
73 73 # Use an ra of our own so that our parent can consume
74 74 # our results without confusing the server.
@@ -240,14 +240,14 b' class convert_svn(converter_source):'
240 240 break
241 241 raise SubversionException("child raised exception", entry)
242 242 yield entry
243
243
244 244 args = [self.url, paths, start, end, limit, discover_changed_paths,
245 245 strict_node_history]
246 246 arg = encodeargs(args)
247 247 hgexe = util.hgexecutable()
248 248 cmd = '"%s "debugsvnlog""' % util.shellquote(hgexe)
249 249 stdin, stdout = os.popen2(cmd, 'b')
250
250
251 251 stdin.write(arg)
252 252 stdin.close()
253 253
@@ -540,7 +540,7 b' class convert_svn(converter_source):'
540 540 parents = []
541 541 orig_paths = orig_paths.items()
542 542 orig_paths.sort()
543
543
544 544 # check whether this revision is the start of a branch
545 545 path, ent = orig_paths and orig_paths[0] or (None, None)
546 546 if ent and path == self.module:
@@ -64,7 +64,7 b' def snapshot_node(ui, repo, files, node,'
64 64 base = os.path.join(tmproot, dirname)
65 65 os.mkdir(base)
66 66 ui.note(_('making snapshot of %d files from rev %s\n') %
67 (len(files), short(node)))
67 (len(files), short(node)))
68 68 for fn in files:
69 69 if not fn in mf:
70 70 # skipping new file after a merge ?
@@ -90,7 +90,7 b' def snapshot_wdir(ui, repo, files, tmpro'
90 90 base = os.path.join(tmproot, dirname)
91 91 os.mkdir(base)
92 92 ui.note(_('making snapshot of %d files from working dir\n') %
93 (len(files)))
93 (len(files)))
94 94 for fn in files:
95 95 wfn = util.pconvert(fn)
96 96 ui.note(' %s\n' % wfn)
@@ -102,7 +102,7 b' def snapshot_wdir(ui, repo, files, tmpro'
102 102 for chunk in util.filechunkiter(repo.wopener(wfn)):
103 103 fp.write(chunk)
104 104 return dirname
105
105
106 106
107 107 def dodiff(ui, repo, diffcmd, diffopts, pats, opts):
108 108 node1, node2 = cmdutil.revpair(repo, opts['rev'])
@@ -133,14 +133,14 b' def dodiff(ui, repo, diffcmd, diffopts, '
133 133 if changes == 1 :
134 134 if len(modified):
135 135 dir1 = os.path.join(dir1, util.localpath(modified[0]))
136 dir2 = os.path.join(dir2root, dir2, util.localpath(modified[0]))
136 dir2 = os.path.join(dir2root, dir2, util.localpath(modified[0]))
137 137 elif len(removed) :
138 138 dir1 = os.path.join(dir1, util.localpath(removed[0]))
139 139 dir2 = os.devnull
140 140 else:
141 141 dir1 = os.devnull
142 dir2 = os.path.join(dir2root, dir2, util.localpath(added[0]))
143
142 dir2 = os.path.join(dir2root, dir2, util.localpath(added[0]))
143
144 144 cmdline = ('%s %s %s %s' %
145 145 (util.shellquote(diffcmd), ' '.join(diffopts),
146 146 util.shellquote(dir1), util.shellquote(dir2)))
@@ -340,7 +340,7 b' def imerge(ui, repo, *args, **opts):'
340 340 rev = opts.get('rev')
341 341 if rev and args:
342 342 raise util.Abort('please specify just one revision')
343
343
344 344 if len(args) == 2 and args[0] == 'load':
345 345 pass
346 346 else:
@@ -71,7 +71,7 b' class header(object):'
71 71 for h in self.header:
72 72 if h.startswith('index '):
73 73 return True
74
74
75 75 def pretty(self, fp):
76 76 for h in self.header:
77 77 if h.startswith('index '):
@@ -213,7 +213,7 b' def parsepatch(fp):'
213 213 'range': {'context': addcontext,
214 214 'hunk': addhunk},
215 215 }
216
216
217 217 p = parser()
218 218
219 219 state = 'context'
@@ -311,7 +311,7 b' def record(ui, repo, *pats, **opts):'
311 311 for h in chunks:
312 312 try: contenders.update(dict.fromkeys(h.files()))
313 313 except AttributeError: pass
314
314
315 315 newfiles = [f for f in files if f in contenders]
316 316
317 317 if not newfiles:
@@ -321,7 +321,7 b' class patchfile:'
321 321 os.mkdir(d)
322 322 self.lines = []
323 323 self.exists = False
324
324
325 325 self.hash = {}
326 326 self.dirty = 0
327 327 self.offset = 0
@@ -350,7 +350,7 b' class patchfile:'
350 350 vala = abs(a - linenum)
351 351 valb = abs(b - linenum)
352 352 return cmp(vala, valb)
353
353
354 354 try:
355 355 cand = self.hash[l]
356 356 except:
@@ -706,7 +706,7 b' class hunk:'
706 706
707 707 def old(self, fuzz=0, toponly=False):
708 708 return self.fuzzit(self.a, fuzz, toponly)
709
709
710 710 def newctrl(self):
711 711 res = []
712 712 for x in self.hunk:
@@ -842,7 +842,7 b' def applydiff(ui, fp, changed, strip=1, '
842 842 """reads a patch from fp and tries to apply it. The dict 'changed' is
843 843 filled in with all of the filenames changed by the patch. Returns 0
844 844 for a clean patch, -1 if any rejects were found and 1 if there was
845 any fuzz."""
845 any fuzz."""
846 846
847 847 def scangitpatch(fp, firstline, cwd=None):
848 848 '''git patches can modify a file, then copy that file to
@@ -24,7 +24,7 b" hg ci -d '0 0' -mtest1"
24 24 echo b >> a
25 25 hg ci -d '1 0' -mtest2
26 26
27 # should diff cloned files directly
27 # should diff cloned files directly
28 28 hg falabala -r 0:1
29 29
30 30 # test diff during merge
@@ -34,7 +34,7 b' hg add c'
34 34 hg ci -m "new branch" -d '1 0'
35 35 hg update -C 1
36 36 hg merge tip
37 # should diff cloned file against wc file
37 # should diff cloned file against wc file
38 38 hg falabala > out || echo "diff-like tools yield a non-zero exit code"
39 39 # cleanup the output since the wc is a tmp directory
40 40 sed 's:\(.* \).*\(\/test-extdiff\):\1[tmp]\2:' out
General Comments 0
You need to be logged in to leave comments. Login now