Show More
@@ -53,8 +53,8 from mercurial.node import * | |||
|
53 | 53 | from mercurial import cmdutil, util |
|
54 | 54 | import os, shutil, tempfile |
|
55 | 55 | |
|
56 | def dodiff(ui, repo, diffcmd, diffopts, pats, opts): | |
|
57 |
|
|
|
56 | ||
|
57 | def snapshot_node(ui, repo, files, node, tmproot): | |
|
58 | 58 |
|
|
59 | 59 |
|
|
60 | 60 |
|
@@ -80,7 +80,8 def dodiff(ui, repo, diffcmd, diffopts, | |||
|
80 | 80 |
|
|
81 | 81 |
|
|
82 | 82 | |
|
83 | def snapshot_wdir(files): | |
|
83 | ||
|
84 | def snapshot_wdir(ui, repo, files, tmproot): | |
|
84 | 85 |
|
|
85 | 86 |
|
|
86 | 87 |
|
@@ -104,6 +105,8 def dodiff(ui, repo, diffcmd, diffopts, | |||
|
104 | 105 |
|
|
105 | 106 |
|
|
106 | 107 | |
|
108 | ||
|
109 | def dodiff(ui, repo, diffcmd, diffopts, pats, opts): | |
|
107 | 110 | node1, node2 = cmdutil.revpair(repo, opts['rev']) |
|
108 | 111 | files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) |
|
109 | 112 | modified, added, removed, deleted, unknown = repo.status( |
@@ -113,11 +116,11 def dodiff(ui, repo, diffcmd, diffopts, | |||
|
113 | 116 | |
|
114 | 117 | tmproot = tempfile.mkdtemp(prefix='extdiff.') |
|
115 | 118 | try: |
|
116 | dir1 = snapshot_node(modified + removed, node1) | |
|
119 | dir1 = snapshot_node(ui, repo, modified + removed, node1, tmproot) | |
|
117 | 120 | if node2: |
|
118 | dir2 = snapshot_node(modified + added, node2) | |
|
121 | dir2 = snapshot_node(ui, repo, modified + added, node2, tmproot) | |
|
119 | 122 | else: |
|
120 | dir2 = snapshot_wdir(modified + added) | |
|
123 | dir2 = snapshot_wdir(ui, repo, modified + added, tmproot) | |
|
121 | 124 | cmdline = ('%s %s %s %s' % |
|
122 | 125 | (util.shellquote(diffcmd), ' '.join(diffopts), |
|
123 | 126 | util.shellquote(dir1), util.shellquote(dir2))) |
General Comments 0
You need to be logged in to leave comments.
Login now