Commit Graph

33 Commits

Author SHA1 Message Date
Augie Fackler
9c16ad01df test_util: make it easier to test odd push cases 2009-05-27 15:51:04 -05:00
Augie Fackler
80b48d0eec test_util: Add another missing project root. 2009-05-22 23:37:33 -05:00
Dan Villiom Podlaski Christiansen
4464869581 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead. 2009-05-22 15:12:31 +02:00
Dan Villiom Podlaski Christiansen
bb2a7bf94d Use fallbacks in the wrappers for Subversion support, instead of prefixes.
The change only applies to the ambiguous URL schemes: file, http and
https. The others - svn+ssh and svn - behave the same as previously.

For http and https, the wrapping is implemented in 'svnrepo.py': Only
when the attempt to create a httprepo instance fails, will the URL
be considered for Subversion URL.

For file, the ambiguity is treated much like the Mercurial core
distinguishes bundle and directories. In this case, a directory that
looks like a Subversion repository will *not* be considered for a
Mercurial clone.

Tthe command lines are more similar to before this refactor. The only
option added to push & pull is --stupid; others are only added to
clone. Any of these options specified to clone will be added to the
generated '.hgrc'.

Also, the -r/--rev option now works for clone & push.
2009-05-20 18:38:01 +02:00
Augie Fackler
94a7ecbe68 Reorganize to have a more conventional module structure.
This means that hgsubversion now uses absolute imports instead of
relative ones, which makes the tests more reliable.
2009-05-13 21:39:39 -05:00
Dan Villiom Podlaski Christiansen
5c913fbb95 test_util: Make the patching of ui.ui.write_err() slightly more reusable. 2009-05-12 20:14:15 +02:00
Dan Villiom Podlaski Christiansen
a7e213adcc test_util: normalize path in svnls() 2009-05-12 20:12:32 +02:00
Dan Villiom Podlaski Christiansen
25a2353e91 Switch to using url scheme wrappers instead of duplicating each command we wrap.
The 'hg svn url' command has been killed; the replacement is
'.hg/hgrc'. More stuff related to its disappearance has been stripped,
including two tests.

HgChangeReceiver now takes a UUID argument, which it uses to ensure
that remote repositories remain unchanged. This is a temporary
solution, and I'm not entirely satisfied with how it's done either.

Access to the UUID file has been isolated in a HgChangeReceiver
property.

Some more tests have been updated to use ui.pushbuffer()/popbuffer(),
and to pass through the Mercurial API.

Moved the arguments to wrappers.pull() to the UI configuration.

Also, remove HgChangeReceiver.opts in favour of a 'usebranchnames'
instance & configuration variable. The name is taken from the
ConvertExtension.
2009-05-15 19:18:43 +02:00
Dan Villiom Podlaski Christiansen
8646f77975 alternate approach for supporting svn schemes for repository paths
We now intercept the operations in the local repo class, and handle
the relevant operation ourselves. This frees us from wrapping all
relevant commands and replicating their functionality.

The implementation is incomplete; only one test has been modified to
use the standard Mercurial API with the changed URLs. Once changed,
those tests will likely reveal bugs or missing features in the new
wrappers. Also, new wrappers will be needed for handling conversion
flags such as -A/--authormap.
2009-05-07 20:50:53 +02:00
Martijn Pieters
cdd05a883d Implement the copy method on the mock ui to maintain it across tests.
See mercurial revision 2ffb2edf2c54.
2009-04-27 22:39:48 +02:00
Martijn Pieters
e0df29b04e Rename parentui to src (after mercurial rev 9ec519785301)
Just pass in src to real_ui as a positional argument to avoid the problem in
the future.
2009-04-27 09:39:39 -05:00
Martijn Pieters
9967e4b505 clone: prefer tip of default to overall tip when updating 2009-04-24 20:36:38 -05:00
Augie Fackler
0ca6ba9b90 push: Add a test that demonstrates base-text detection works 2009-04-24 20:31:17 -05:00
Augie Fackler
a39083f959 Fix rebuildmeta tests for empty_dir_in_trunk_not_repo_root 2009-04-21 15:25:08 -05:00
Augie Fackler
04a99bbad0 Move wrappers for hg commands to their own module. 2009-04-10 22:38:29 -05:00
Dirkjan Ochtman
2ca3d49704 Move push into svncommands. 2009-04-08 17:53:48 +02:00
Dirkjan Ochtman
f46fc326fe Move fetch_command.fetch_revisions() to svncommands.pull(). 2009-04-08 17:49:30 +02:00
Augie Fackler
1ac76b58cf tests: Start providing our own custom hgrc for testing purposes. 2009-03-31 10:50:21 -05:00
Augie Fackler
4626e889e8 Add some comprehensive tests that can be run with nose in order to make it easier to verify stupid and real replay do the same thing. 2009-01-21 20:27:51 -06:00
Patrick Mezard
980ed94914 test_util: check all committed revisions are pushed 2008-12-30 20:33:57 -06:00
Augie Fackler
8ec19e30a3 tests: Add an environment variable (HGSUBVERSION_TEST_TEMP) which allows
specification of where temporary repositories (both hg and svn) should be
created. Set it to a RAM disk to make the tests run faster.
2008-12-20 19:13:46 -06:00
Augie Fackler
dd6ddc6cc1 utility_commands: Add tests for url and info. Fix a bad mock in the process. 2008-12-11 20:24:48 -06:00
Augie Fackler
5c3930383a diff_cmd: more robust, add tests. 2008-12-11 19:49:36 -06:00
Augie Fackler
4ec9620b80 Fix a regression in converting repositories with files copied in from outside
branches/tags/trunk where repo root != project root.
2008-11-25 16:21:57 -06:00
Patrick Mezard
551321fbc7 Add a test to check EOLs are correctly converted 2008-11-20 22:41:16 -06:00
Augie Fackler
effb740fae tests: Mock the mercurial.ui.ui class like we really should to capture output.
Has the nice side effect that we can use nose 0.11's multiprocess plugin.
2008-11-14 16:52:30 -06:00
Patrick Mezard
baa9d16b5c test_util: add commitchanges() to TestBase 2008-11-14 16:18:24 -06:00
Patrick Mezard
f1278f2869 push_cmd: delete empty svn directories, refactor directory creation 2008-11-14 16:18:24 -06:00
Patrick Mezard
87d62ad5a3 Extract PushTest common code into test_util.TestBase 2008-11-14 16:18:24 -06:00
Patrick Mezard
56c1f22424 Fix basic issues with tests on Windows
- shutil.rmtree() fails if there are any read-only files (svn store)
- Fix files:// URLs
- os.spawnvp()/Popen4() do not exist under Windows, use subprocess
2008-11-09 18:08:35 -06:00
Augie Fackler
b7e24a980b Add tests for tags and fix a bug in the tag-finding code that was found by the tests. 2008-10-08 20:37:01 -05:00
Augie Fackler
3524910c61 Refactor tests so I can reuse code more. 2008-10-08 20:09:28 -05:00
Augie Fackler
7a17d8e401 Add a basic system for running the hgsubversion tests (although not the svnwrap ones) without requiring Nose. Nose is still the recommended way to run the tests.
Also added some tests for pushing.
2008-10-07 22:13:14 -05:00