comparison hgext/extdiff.py @ 13970:d13913355390

move opener from util to scmutil
author Adrian Buehlmann <adrian@cadifra.com>
date Wed, 20 Apr 2011 19:54:57 +0200
parents a8d13ee0ce68
children 92b768e9f80c
comparison
equal deleted inserted replaced
13969:336bb8b53ad0 13970:d13913355390
59 pretty fast (at least faster than having to compare the entire tree). 59 pretty fast (at least faster than having to compare the entire tree).
60 ''' 60 '''
61 61
62 from mercurial.i18n import _ 62 from mercurial.i18n import _
63 from mercurial.node import short, nullid 63 from mercurial.node import short, nullid
64 from mercurial import cmdutil, util, commands, encoding 64 from mercurial import cmdutil, scmutil, util, commands, encoding
65 import os, shlex, shutil, tempfile, re 65 import os, shlex, shutil, tempfile, re
66 66
67 def snapshot(ui, repo, files, node, tmproot): 67 def snapshot(ui, repo, files, node, tmproot):
68 '''snapshot files as of some revision 68 '''snapshot files as of some revision
69 if not using snapshot, -I/-X does not work and recursive diff 69 if not using snapshot, -I/-X does not work and recursive diff
79 ui.note(_('making snapshot of %d files from rev %s\n') % 79 ui.note(_('making snapshot of %d files from rev %s\n') %
80 (len(files), short(node))) 80 (len(files), short(node)))
81 else: 81 else:
82 ui.note(_('making snapshot of %d files from working directory\n') % 82 ui.note(_('making snapshot of %d files from working directory\n') %
83 (len(files))) 83 (len(files)))
84 wopener = util.opener(base) 84 wopener = scmutil.opener(base)
85 fns_and_mtime = [] 85 fns_and_mtime = []
86 ctx = repo[node] 86 ctx = repo[node]
87 for fn in files: 87 for fn in files:
88 wfn = util.pconvert(fn) 88 wfn = util.pconvert(fn)
89 if not wfn in ctx: 89 if not wfn in ctx: