Commit Graph

15 Commits

Author SHA1 Message Date
Gregory Szorc
551a30c1a7 tests: use context manager form of assertRaises
Support for using unittest.TestCase.assertRaises as a context
manager was added in Python 2.7. This form is more readable,
especially for complex tests.

While I was here, I also restored the use of assertRaisesRegexp,
which was removed in 6620b26511eb for Python 2.6 compatibility.
2017-05-13 11:52:44 -07:00
Pulkit Goyal
7e32ca8304 tests: make test-simplemerge use absolute_import 2016-04-16 02:59:36 +05:30
timeless
f77cdcd3b1 pycompat: switch to util.stringio for py3 compat 2016-04-10 20:55:37 +00:00
Pierre-Yves David
30913031d4 error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.

For great justice.
2015-10-08 12:55:45 -07:00
Pierre-Yves David
2017698ec4 simplemerge: burn "minimal" feature to the ground
Matt Mackall said:

  The goal of simplemerge should have always been to be a drop-in
  replacement for RCS merge. Please nuke this minimization thing entirely.

This whole things is now dead.
2014-08-05 14:56:25 -07:00
timeless@mozdev.org
e6fb50bfb5 spelling: sentinel 2012-08-17 13:58:19 -07:00
Martin Geisler
d8334151e6 Remove FSF mailing address from GPL headers
The GPLv3 FAQ suggests to upgrade by

  [...] replace all your existing v2 license notices (usually at the
  top of each file) with the new recommended text available on the GNU
  licenses howto. It's more future-proof because it no longer includes
  the FSF's postal mailing address.

This removes the postal address, but leaves the version number at 2+.
2012-01-06 16:27:13 +01:00
Matt Mackall
a2acbc421b fix up a bunch of check-code warnings 2010-02-09 14:12:22 -06:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01: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
483231d996 Cleanup of whitespace, indentation and line continuation. 2007-06-19 08:06:37 +02:00
Thomas Arendsen Hein
49220695bc Removed trailing whitespace and tabs from python files 2007-06-06 20:22:52 +02: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