--- a/hgext/extdiff.py Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/extdiff.py Sat Feb 13 23:50:38 2010 -0600
@@ -126,7 +126,7 @@
modadd = mod_a | add_a | mod_b | add_b
common = modadd | rem_a | rem_b
if not common:
- return 0
+ return 0
tmproot = tempfile.mkdtemp(prefix='extdiff.')
try:
@@ -146,10 +146,10 @@
if node2:
dir2 = snapshot(ui, repo, modadd, node2, tmproot)[0]
elif len(common) > 1:
- #we only actually need to get the files to copy back to the working
- #dir in this case (because the other cases are: diffing 2 revisions
- #or single file -- in which case the file is already directly passed
- #to the diff tool).
+ #we only actually need to get the files to copy back to
+ #the working dir in this case (because the other cases
+ #are: diffing 2 revisions or single file -- in which case
+ #the file is already directly passed to the diff tool).
dir2, fns_and_mtime = snapshot(ui, repo, modadd, None, tmproot)
else:
# This lets the diff tool open the changed file directly
@@ -169,8 +169,9 @@
dir1b = os.devnull
dir2 = os.path.join(dir2root, dir2, common_file)
- # Function to quote file/dir names in the argument string
- # When not operating in 3-way mode, an empty string is returned for parent2
+ # Function to quote file/dir names in the argument string.
+ # When not operating in 3-way mode, an empty string is
+ # returned for parent2
replace = dict(parent=dir1a, parent1=dir1a, parent2=dir1b, child=dir2)
def quote(match):
key = match.group()[1:]
@@ -238,7 +239,8 @@
for cmd, path in ui.configitems('extdiff'):
if cmd.startswith('cmd.'):
cmd = cmd[4:]
- if not path: path = cmd
+ if not path:
+ path = cmd
diffopts = ui.config('extdiff', 'opts.' + cmd, '')
diffopts = diffopts and [diffopts] or []
elif cmd.startswith('opts.'):
@@ -258,13 +260,14 @@
doc = _('''\
use %(path)s to diff repository (or selected files)
- Show differences between revisions for the specified files, using the
- %(path)s program.
+ Show differences between revisions for the specified files, using
+ the %(path)s program.
- When two revision arguments are given, then changes are shown between
- those revisions. If only one revision is specified then that revision is
- compared to the working directory, and, when no revisions are specified,
- the working directory files are compared to its parent.\
+ When two revision arguments are given, then changes are shown
+ between those revisions. If only one revision is specified then
+ that revision is compared to the working directory, and, when no
+ revisions are specified, the working directory files are compared
+ to its parent.\
''') % dict(path=util.uirepr(path))
# We must translate the docstring right away since it is