Commit Graph

198 Commits

Author SHA1 Message Date
Patrick Mezard
a46560a49e hg_delta_editor: fix symlink prefix confusion
- SubversionRepo.get_file() strips the symlink prefix
- Enforce that hg_delta_editor symlink data always contains the prefix. The
  alternative was seducing and more consistent with hg content but it makes the
  code more complicated since svn:special can be set before or after the content
  is set, and we need it in apply_textdelta()

This issue fixes jQuery repository conversion at r3674.
2008-11-20 22:41:15 -06:00
Patrick Mezard
551321fbc7 Add a test to check EOLs are correctly converted 2008-11-20 22:41:16 -06:00
Augie Fackler
e508c97000 utility_commands: fix outgoing against crew (required because of crew cset bb33a7b316be) 2008-11-19 10:23:48 -06:00
Augie Fackler
9b5a74a8e8 svncommand: Fix help to use ui.status() and be a bit smarter about displaying
help.
2008-11-19 10:16:50 -06:00
Augie Fackler
4d565525a9 svncommand: Check traceback length to stop masking real exceptions. 2008-11-19 10:16:24 -06:00
Augie Fackler
2df035818d svnwrap: Fix handling of auth providers so cached credentials can work.
Also fixed things so that svn 1.6 should enable platform-specific auth providers.
2008-11-19 09:41:09 -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
b32298ea04 fetch_command: create branch temporary directory when we need it 2008-11-14 16:18:24 -06:00
Patrick Mezard
b9a4fe09c2 SubversionRepo: remember svn.diff3() does not work
Calling it repeatedly is expensive, files and directories are created,
svn transport layer is reset.
2008-11-14 16:18:24 -06:00
Patrick Mezard
074290e2b2 fetch_command: handle nullid parent in stupid non-diffy mode 2008-11-14 16:18:24 -06:00
Patrick Mezard
e45c792412 fetch_command: in stupid non-diffy mode, take changed paths in account
Former code was checkouting all branch files for every converted
revision when diffs were not available in stupid mode. Now, only
changed items are requested.
2008-11-14 16:18:24 -06:00
Patrick Mezard
bb6cd594bf push_cmd: add option to push in stupid mode
This is mostly useful for test coverage, to roundtrip in stupid mode.
2008-11-14 16:18:24 -06:00
Patrick Mezard
f9ee55239f push_cmd: consider only dirs with added/removed files for addition or deletion 2008-11-14 16:18:24 -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
8a41385c59 SubversionRepo: close files before rmtree() in diff3
Open files cannot be removed if open (by default) under Windows.
2008-11-14 16:18:24 -06:00
Patrick Mezard
e8410f200d test_push_command: fix test_push_existing_file_newly_execute() under Windows 2008-11-14 16:18:24 -06:00
Patrick Mezard
cec1718fff fetch_command: handle failing svn.diff3() on Windows, fetch full revision 2008-11-09 18:08:35 -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
Patrick Mezard
e03678b306 fetch_command: bypass export3() and checkout manually
This method has several advantages:
- export3() does not work very well under Windows, while client.list() and
  ra.get_file() do
- File modes are retrieved from get_file() for free, instead of being read from
  the filesystem, which does not work under Windows, more generally the
  filesystem is bypassed completely.
- It can be made much smarter by checkouting changed files only, like convert
  extension does.
2008-11-09 18:08:35 -06:00
Patrick Mezard
5dee2cf35e SubversionRepo: make get_file() return the file mode
It is cheap to get it, and it will be useful to fetch revisions.
2008-11-09 18:08:35 -06:00
Patrick Mezard
aa3d5dad6a SubversionRepo: add optrev() to help generate client API revisions 2008-11-09 18:08:35 -06:00
Patrick Mezard
ae21ef395a SubversionRepo: do not use temporary file in get_file()
Existing code says swig bindings do not support StringIO objects as output for
svn.ra.get_file(). This issue was never reported in the convert extension.
2008-11-09 18:08:35 -06:00
Patrick Mezard
d6b5dd4cf7 fetch_command: support svn copy detection in stupid mode 2008-11-05 13:37:08 +01:00
Patrick Mezard
80e86e813f hg_delta_editor: make branches_in_paths() return the branch svn path too 2008-11-05 13:37:08 +01:00
Patrick Mezard
e3f0d6d95c test_fetch_renames: test directory copy with children files changed in-between 2008-11-05 13:37:08 +01:00
Patrick Mezard
8162f33ac0 push_cmd: handle copies at file level
Mercurial store knows only file-level copies, directory copies are handle with
heuristics. Implement the former one in svn backends.
2008-11-05 13:37:08 +01:00
Patrick Mezard
b2242b3313 hg_delta_editor: register copies only if files are unchanged between source and dest
Handle copies of items from revision X into revision Y where X is not the
parent of Y. This cannot happen in Mercurial because copies always happen
between parents and children. A file copy is recorded if:
1- Source and destination revs are in the same branch.
2- The file is unchanged (content, type, removal) through all revisions between
destination and source, not including source and destination.

Directory copies are registered only if the previous rules apply on all copied
items.

[1] is there because file copies across branches are meaningless in Mercurial
world. We could have tried to remap the source rev to a similar one in the
correct branch, but anyway the intent is wrong.

[2] is more questionable but I think it's better this way for we live in a
non-perfect svn world. In theory, 99% of copies out there should come from the
direct parent. But the direct parent is a fuzzy notion when you can have a
working directory composed of different directory at different revisions. So we
assume that stuff copied from past revisions exactly matching the content of
the direct parent revision is really copied from the parent revision. The
alternative would be to discard the copy, which would always happen unless
people kept updating the working directory after every commit (see
tests).
2008-11-05 13:37:08 +01:00
Patrick Mezard
b5c8422c16 test_fetch_renames: test copy of deleted stuff from the past 2008-11-05 13:37:08 +01:00
Patrick Mezard
b4460d5cb9 hg_delta_editor: register svn file copies 2008-11-05 13:37:07 +01:00
Augie Fackler
6eab79fb0f svnwrap: Fix leakage of temp dirs by using try/finally blocks. 2008-11-09 17:08:09 -06:00
Augie Fackler
5cb73e2d8d push: Fix missing directory creation for the case of a new dir inside a new dir. 2008-11-09 17:02:07 -06:00
Augie Fackler
235f4f8613 Add an hg svn info subsubcommand that prints out what you would expect from svn info. 2008-11-07 15:02:00 -06:00
Augie Fackler
90bc5e409c Added some coverage pragmas to stop it from trying to cover things we can't test. 2008-11-06 09:47:42 -06:00
Augie Fackler
dee222b7e9 push_cmd: Further simplified some logic thanks to an improved test. 2008-11-06 09:24:33 -06:00
Augie Fackler
0597ea8f1b Ignore coverage information. 2008-11-06 09:23:49 -06:00
Augie Fackler
2aaa8bc830 Fixed a problem where if you edited an existing symlink by replacing with another symlink, things would get corrupt. 2008-11-06 09:07:13 -06:00
Augie Fackler
8c7063dc0f Performance fix for branches-from-tags in real replay, which is tied up with
changes that fix problems when trunk is not the oldest branch. Also includes
fixes for copying from a tag that we chose not to create (eg tagging a vendor
branch) and includes tests for all of those things.
2008-11-04 16:38:16 -06:00
Augie Fackler
189fd9396a Fix a bug in real replay where dirs copied from outside the directory tree
weren't removing the prefix within the repo.
2008-11-04 09:40:58 -06:00
Augie Fackler
ec1400920b Don't try and add a directory more than once. 2008-11-03 14:24:18 -06:00
Patrick Mezard
f9ed91e8ea push_cmd: remove redundant variable in commit_from_rev() 2008-11-03 08:44:31 -06:00
Patrick Mezard
5ddd64603f hg_delta_editor: simplify exec/symlink flags generation 2008-11-03 08:43:07 -06:00
Patrick Mezard
7a3fc738d2 .hgignore: ignore emacs temporary files 2008-11-03 08:42:53 -06:00
Augie Fackler
a9d1d60482 crew-stable does not have what I need after all. Oops. 2008-11-01 13:50:46 -05:00
Augie Fackler
df564c1eff svnclone now updates to the tip revision if it is the initial clone. 2008-11-01 13:40:19 -05:00
Shun-ichi GOTO
62f4f3ec23 Catch other varieties of the server not having replay. 2008-11-01 13:05:56 -05:00
Augie Fackler
80516ef041 Drop any pretense of supporting svn 1.4.x.
The quality of the SWIG bindings is just too low for this to work reasonably. In theory, 1.4.x will be supported at a future date by ctypes.
2008-11-01 12:23:07 -05:00
Augie Fackler
062345fdbd Add tests for a bunch more cases in pushing to svn. 2008-10-29 22:58:52 -05:00
Augie Fackler
e42248f1e1 Add a test that verifies push works to svn:// servers.
This test will fail if you are running an svnserve on localhost, but it checks and will not touch your data in that case.
Also fixed the push tests, which had been largely broken.
2008-10-29 21:15:36 -05:00