Commit Graph

9 Commits

Author SHA1 Message Date
Adrian Buehlmann
0e6715fa28 rename util.set_binary to setbinary 2011-05-06 15:25:35 +02:00
Steve Borho
83629eeaea simplemerge: use ui.warn() for warnings 2009-04-30 23:57:36 -05:00
Patrick Mezard
0d0f719f13 tests: Windows compatibility fixes
- printenv.py, md5sum.py, simplemerge, test-archive, test-merge1,
  test-merge-symlinks: set standard streams to binary mode
- test-encode: replace "gunzip" by "gzip -d"
- test-hup: requires fifo
2008-10-12 19:11:59 +02:00
Matt Mackall
346758f77c merge: move the bulk of simplemerge into core
- keep existing simplemerge command in contrib
- clean up test interface
2008-02-03 19:29:05 -06:00
Thomas Arendsen Hein
001b7980f8 Remove trailing spaces 2007-08-07 10:24:33 +02:00
Patrick Mezard
2b6cc17dd7 simplemerge: flush stdout before writing to stderr.
Besides, stderr is not always unbuffered under win32 (when redirections occur for instance), and it should be flushed too.
2007-05-06 16:40:53 +02:00
Alexis S. L. Carvalho
2fe1ec9254 polish the simplemerge command; add a test 2007-04-16 20:17:39 -03:00
Alexis S. L. Carvalho
f65315991b actually port simplemerge to hg
- use bdiff instead of patiencediff;  this is a larger change, since
  bdiff works on 2 multi-line strings, while patiencediff works on 2
  lists;

- rename the main class from Merge3 to Merge3Text and add a Merge3
  class that derives from Merge3Text.  This new Merge3 class has
  the same interface from the original class, so that the tests
  still work;

  - Merge3 uses util.binary to detect binary data and raises
    util.Abort instead of a specific exception;

- don't use the @decorator syntax, to keep python2.3 compatibility;

- the test uses unittest, which likes to print how long it took to
  run.  This obviously doesn't play too well with hg's test suite,
  so we override time.time to fool unittest;

- one test has a different (but still valid) output because of the
  different diff algorithm used;

- the TestCase class used by bzr has some extras to help debugging.
  test-merge3.py used 2 of them:

  - log method to log some data

  - assertEqualDiff method to ease viewing diffs of diffs

  We add a dummy log method and use regular assertEquals instead of
  assertEqualDiff.

- make simplemerge executable and add "#!/usr/bin/env python" header
2007-04-16 20:17:39 -03:00
Alexis S. L. Carvalho
50315bfe3b Import 3-way merge code from bzr
merge3.py is imported as contrib/simplemerge
test_merge3.py is imported as tests/test-simplemerge.py
2007-04-16 20:17:39 -03:00