Commit Graph

126 Commits

Author SHA1 Message Date
Matt Mackall
a8dd64dcb0 misc: replace .parents()[0] with p1() 2011-04-04 16:21:59 -05:00
jfh
a63916e626 extdiff: use absolute paths for any temporary files
This allows the use of p4merge amongst possible other external tools.
2011-03-21 17:03:16 +01:00
David Wolever
7bd158b865 Updating hgext.extdiff to use revsets 2011-03-15 17:50:02 -04:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Martin Geisler
a6312d22f5 extdiff: fix reST syntax in module docstring 2010-05-17 23:11:27 +02:00
Steve Borho
c76d6b8145 extdiff: add labels, read diff arguments from [merge-tools]
hgtk has been using these same configs since Feb. Users only have to name the
tools they would like to use, ex:

[extdiff]
kdiff3 =
meld =
2010-01-07 22:19:05 -06:00
Benoit Boissinot
328394047f fix coding style (reported by pylint) 2010-02-08 15:36:34 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Sune Foldager
2368eabe27 extdiff: respect --option in command aliases (issue949) 2009-11-30 19:37:38 +01:00
Martin Geisler
5ad36f40d3 extdiff: prevent exception on double-translation
The docstring is translated twice: once when used as a format string,
and once on display. The second translation fails when the first
translation introduces non-ASCII characters in the string.

The problem is that the gettext module calls unicode(message) on the
string, i.e., it decodes it to a Unicode string using the ASCII
encoding (the default encoding). By translating it into a Unicode
string here, the unicode() call becomes a noop.
2009-11-26 20:06:45 +01:00
Matt Mackall
13b406f027 Merge with -stable 2009-10-03 14:39:57 -05:00
Sune Foldager
c7e7232f9e extdiff: add 3-way diff for merge changesets
This adds 3-way diff for merge changesets (using -c) and for diffing
the working directory context against two parents. To enable it, use
the new magic value '$parent2' in the argument line. In order to work,
your differ must support that the second parent argument is left out;
this will happen in 2-way mode. Default arguments are as before, without
enabling 3-way mode, ensuring backwards compatibility.

This also fixes a problem when diffing a merge changeset with a single
file change. Extdiff would sometimes do the wrong thing in that situation.
2009-09-17 21:12:32 +02:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Peter Arrenbrecht
4e1708dc3a extdiff: fix defaulting to "diff" if no --program is given 2009-10-01 08:50:10 +02:00
Cédric Duval
21be180306 doc: fix quotes mismatches affecting rst 2009-07-31 01:40:45 +02:00
Martin Geisler
917d000717 extdiff: wrap docstrings at 70 characters 2009-07-26 01:45:36 +02:00
Martin Geisler
a3715f628a extdiff: use reST syntax for literal block 2009-07-23 00:22:50 +02:00
Martin Geisler
e48f6a2ae3 extdiff: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Martin Geisler
be9e1c997f extdiff: fix indentation and use gettext 2009-07-07 23:30:48 +02:00
Dirkjan Ochtman
0448417ea2 extensions: change descriptions for extensions providing a few commands 2009-06-24 13:42:02 +02:00
Dirkjan Ochtman
a774ff01bc help: add/fix docstrings for a bunch of extensions 2009-06-21 16:45:47 +02:00
Cédric Duval
0caffe860f help: remove per-extension paragraph on how to enable it
The central place to find this information is the "extensions" help topic.
2009-06-20 20:57:13 +02:00
Martin Geisler
c624e91552 fixed typos found in translatable strings
This is from a spell-check of hg.pot.
2009-05-31 14:55:51 +02:00
Matt Mackall
14089a2384 Merge with stable 2009-12-01 14:37:33 -06:00
Martin Geisler
3f706eb0e4 extdiff: wrap long lines in docstring and comments
Gettext wraps lines in the messages when it writes them to the hg.pot
file and that makes long lines look odd in the resulting .po file.
2009-11-26 23:10:59 +01:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Martin Geisler
52ce98c9a8 help texts: write command line switches as -a/--abc 2009-04-18 14:40:21 +02:00
Patrick Mezard
cd3505dbbc Merge with crew-stable 2009-04-13 21:57:17 +02:00
Patrick Mezard
0d13db37f7 extdiff: preserve execute-bit across copies (issue1562)
Bug report and test by Mads Kiilerich <mads@kiilerich.com>
2009-04-09 14:32:44 +02:00
Patrick Mezard
de41b9ace4 extdiff: merge node and working dir snapshot modes 2009-04-13 21:21:01 +02:00
Martin Geisler
ea1734b579 expand "dir" to "directory" in help texts 2009-04-07 22:47:56 +02:00
Martin Geisler
f59683c990 extdiff: word-wrap help texts at 70 characters 2009-04-04 23:17:12 +02:00
Martin Geisler
04b0d911a3 Change double spaces to single spaces in help texts. 2009-04-04 21:09:43 +02:00
Gilles Moris
60d2f6f240 extdiff: add --change option to display single changeset diff
This is the counterpart for extdiff of 44ccab2b73f0.
2009-02-07 19:41:05 +01:00
Martin Geisler
cbcd677f60 lowercase ui.debug and assert output
This does not effect the log or status commands and should be okay
according to the compatibility rules.
2009-01-03 17:15:21 +01:00
Martin Geisler
336bd98e22 use repo.wjoin(f) instead of os.path.join(repo.root, f) 2009-01-02 22:53:33 +01:00
Martin Geisler
181b5f16b4 i18n: mark strings for translation in extdiff extension 2008-08-31 16:12:02 +02:00
Matt Mackall
d4ab55a92b status: clean up all users for unknown files 2008-06-27 13:43:29 -05:00
Matt Mackall
fbb5127472 use repo[changeid] to get a changectx 2008-06-26 14:35:46 -05:00
Matt Mackall
fb88571d19 match: remove files arg from repo.status and friends 2008-05-12 11:37:08 -05:00
Matt Mackall
e02d6f5a75 walk: remove remaining users of cmdutils.matchpats 2008-05-12 11:37:07 -05:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Fabio Zadrozny
37a53cf616 Propagating changes back to working dirs when changing files in external 2007-08-26 21:31:18 -03:00
Patrick Mezard
7c1d0710ee Merge with crew-stable 2007-09-10 23:53:23 +02:00
Patrick Mezard
239ea63571 extdiff: avoid repr() doubling paths backslashes under Windows 2007-09-10 23:36:01 +02:00
Brendan Cully
6c3736cbca Improve extdiff configuration.
In addition to the old cmd.foo, opts.foo hgrc entries, allow a more simple
alias = command [opts]... form. For example:
[extdiff]
cdiff = colordiff -uprN
2007-08-25 12:25:53 -07:00
Benoit Boissinot
ce6a51c4eb refactor options from cmdtable
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Thomas Arendsen Hein
e34927453f Remove trailing spaces, fix indentation 2007-08-07 10:28:43 +02:00
Brad Schick
18eb282ff7 extdiff: do single file diffs from the wc with no copy
Extdiff was always making a temporary directory and copying files even when not required. This change makes extdiff avoid the copy when diffing a single file that lives in the wc. This lets external diff tools edit the working copy file directly. It also lets other extensions resuse the functions in extdiff and get in-place diffs.
2007-08-06 14:50:57 -07:00
Brad Schick
eec22b0f45 extdiff: made it less chatty in non-verbose mode
Made the status info only display in verbose mode since most hg commands aren't so chatty. This also makes it cleaner for other extensions to call extdiff.
2007-08-06 14:42:11 -07:00
Brad Schick
e42e7b9d8c extdiff: un-nested two functions
The functions in extdiff that create temporary repo copies for are useful in other extensions, so the change moves them at the module level.
2007-08-06 14:32:23 -07:00
Thomas Arendsen Hein
0b7147a667 Updated command tables in commands.py and hgext extensions.
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
2007-06-26 22:38:57 +02:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Alexis S. L. Carvalho
de6a03262c extdiff: open files in binary mode
Problem noticed by Darrell Gallion.
2007-02-15 08:14:03 -02:00
Andrei Vermel
6c380c2c30 Make extdiff work at root directory 2007-02-15 12:51:43 +03:00
Matt Mackall
8ed93098b6 replace filehandle version of wwrite with wwritedata 2006-12-29 20:04:31 -06:00
Benoit Boissinot
0c3a966f5f extdiff: use contexts 2006-12-26 03:25:44 +01:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Thomas Arendsen Hein
ea20cdf3f7 Removed unused ui parameter from revpair/revrange and fix its users. 2006-11-22 23:02:28 +01:00
Benoit Boissinot
cec92b2bd7 fix traceback of extdiff after a merge
- files that comes from a different branch are marked as modified
  but aren't present in the original manifest
- add a testcase for extdiff and for regular diff
2006-10-11 16:35:09 +02:00
TK Soh
a1ddb8da93 extdiff: use the default option only if the default program is used 2006-09-18 12:01:32 +02:00
Mathieu Clabaut
3107fb4b9f Update [extdiff] configuration sample for vimdiff,
taking acount cmd.xxx and opts.xxx configurations item.
2006-09-15 22:55:17 +02:00
Brendan Cully
24756bd157 Move revision parsing into cmdutil. 2006-09-14 11:19:35 -07:00
TK Soh
0658d7ce38 extdiff: do not shell-quote options to new commands
revert a change introduced by c64ec6e8ffa2
2006-08-28 16:30:48 -05:00
TK Soh
3f6491c428 extdiff: make new diff commands pick up their options correctly 2006-08-17 15:30:45 -05:00
Giorgos Keramidas
b558cdc911 Tune a bit the extdiff toplevel comments/samples.
* Capitalize the first letter of all sentences

* Add an example for GNU diff(1) 'context diff' mode.

* Explain the requirement for separate cmd.xxx and opts.xxx
  options in .hgrc, which hopefully will guard against users
  trying to add:

      [extdiff]
      # Add a new Mercurial command called `cdiff', which calls
      # GNU diff(1) in 'context diff' mode.
      cmd.cdiff = diff -Nprc5

  which fails for recent crew builds with:

      $ hg cdiff .
      making snapshot of 1 files from rev 07dc4a569f4e
      making snapshot of 1 files from working dir
      diff -Nprc5: not found

  The correct way to do this is by separating the cmd.cdiff and
  opts.cdiff parts like this:

      [extdiff]
      # Add a new Mercurial command called `cdiff', which calls
      # GNU diff(1) in 'context diff' mode.
      cmd.cdiff = diff
      opts.cdiff = -Nprc5

  so add it as a new example and explicitly describe it in the
  extdiff comments.
2006-08-15 18:14:58 +03:00
Vadim Gelfer
ad47ec66c1 extdiff: fix bugs. add test. 2006-08-14 15:51:35 -07:00
Brendan Cully
a8ca75d10f Properly shell-quote arguments in extdiff 2006-08-14 11:10:21 -07:00
Brendan Cully
82df5e8de9 Update extdiff for recent refactoring 2006-08-14 11:07:15 -07:00
Vadim Gelfer
80d6f2f7c7 remove localrepository.changes.
use localrepository.status instead.
2006-08-12 16:40:12 -07:00
Mathieu Clabaut ext:(%22)
5754e8f808 extdiff : add comment on how to use vim for doing directoy diff 2006-07-25 23:10:11 +02:00
Daniel Santa Cruz ext:(%22)
3232a6998e Minor typo change to reflect actual values used. 2006-05-22 12:17:44 -04:00
Vadim Gelfer
38e7119eca new extension: extdiff. allows to use external diff program. 2006-05-21 23:39:07 -07:00