Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/extdiff.py @ 5291:23651848d638
extdiff: avoid repr() doubling paths backslashes under Windows
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 10 Sep 2007 23:36:01 +0200 |
parents | eadfaa9ec487 |
children | 32ec518ee3cb |
comparison
equal
deleted
inserted
replaced
5289:ed6df6b1c29a | 5291:23651848d638 |
---|---|
172 diffopts = diffopts and [diffopts] or [] | 172 diffopts = diffopts and [diffopts] or [] |
173 def save(cmd, path, diffopts): | 173 def save(cmd, path, diffopts): |
174 '''use closure to save diff command to use''' | 174 '''use closure to save diff command to use''' |
175 def mydiff(ui, repo, *pats, **opts): | 175 def mydiff(ui, repo, *pats, **opts): |
176 return dodiff(ui, repo, path, diffopts, pats, opts) | 176 return dodiff(ui, repo, path, diffopts, pats, opts) |
177 mydiff.__doc__ = '''use %(path)r to diff repository (or selected files) | 177 mydiff.__doc__ = '''use %(path)s to diff repository (or selected files) |
178 | 178 |
179 Show differences between revisions for the specified | 179 Show differences between revisions for the specified |
180 files, using the %(path)r program. | 180 files, using the %(path)s program. |
181 | 181 |
182 When two revision arguments are given, then changes are | 182 When two revision arguments are given, then changes are |
183 shown between those revisions. If only one revision is | 183 shown between those revisions. If only one revision is |
184 specified then that revision is compared to the working | 184 specified then that revision is compared to the working |
185 directory, and, when no revisions are specified, the | 185 directory, and, when no revisions are specified, the |
186 working directory files are compared to its parent.''' % { | 186 working directory files are compared to its parent.''' % { |
187 'path': path, | 187 'path': util.uirepr(path), |
188 } | 188 } |
189 return mydiff | 189 return mydiff |
190 cmdtable[cmd] = (save(cmd, path, diffopts), | 190 cmdtable[cmd] = (save(cmd, path, diffopts), |
191 cmdtable['extdiff'][1][1:], | 191 cmdtable['extdiff'][1][1:], |
192 _('hg %s [OPTION]... [FILE]...') % cmd) | 192 _('hg %s [OPTION]... [FILE]...') % cmd) |