Commit Graph

81 Commits

Author SHA1 Message Date
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
Valentino Volonghi aka dialtone
f7b64a3627 fix svn push when there's just a file removal 2008-10-29 14:11:04 -07:00
Augie Fackler
7334dc703f This appears to fix pushing over both the http and svn protocols. 2008-10-29 11:48:58 -05:00
Augie Fackler
65f3d0b450 Change the implementation of the ra_session stuff. Thanks to Ben Collins-Sussman for pointing out the problem with the other method I was using.
Note: this may appear to break commits over certain ra layers. Those layers were probably not working properly anyway.
2008-10-28 22:52:58 -05:00
Augie Fackler
063f1b9861 Fix an encoding bug that would occur if the local encoding was not utf-8. 2008-10-28 11:39:36 -05:00
Augie Fackler
6a7dd545c7 Fix a bug with added files from outside branches/trunk/tags. 2008-10-27 12:33:52 -05:00
Augie Fackler
ec2bf04a72 Only print this message if we actually care. 2008-10-26 22:43:01 -05:00
Augie Fackler
327815dcb1 Improved handling of copies from outside of trunk. 2008-10-26 22:39:17 -05:00
Augie Fackler
a4c75a84ab Add a test that proves files in the branches directory don't cause breakage. 2008-10-26 22:12:46 -05:00
Augie Fackler
5911c3a32d Some more fixes of cases discovered in the melange repo. If anyone knows how I can reproduce a "replaced" state in Subversion, I'd love to be able to make a real test case for this code. 2008-10-26 22:06:13 -05:00
Augie Fackler
552056f242 Fixes so that I can clone the melange repository successfully. Fixes a bug that
caused running out of file handles if there were a lot of ra calls.
2008-10-26 13:55:57 -05:00
Augie Fackler
8a126c7b18 Add a test that proves renaming a branch to make a tag works properly. 2008-10-20 16:39:53 -05:00
Augie Fackler
5c080c5f14 Fix tests against the improved SWIG bindings in Subversion 1.6. 2008-10-18 18:56:09 -05:00
Augie Fackler
48ec6a7c66 I meant ambiguous. 2008-10-17 22:48:40 -05:00
Augie Fackler
1243e68e75 Some refactors of the previous change, including transparent upgrade of old-style pickled dictionaries. 2008-10-17 11:03:52 -05:00
Andreas Hartmetz
4430556e43 Faster append-only revmap implementation. 2008-10-15 21:47:48 -04:00
Augie Fackler
b168704b66 Fix non-atomic write of the last_revision_handled_file which was causing
problems if the write got interrupted in the wrong spot.
2008-10-15 13:29:20 -05:00
Augie Fackler
4aea27c0de Fix up the rebase docstring to be less vague. 2008-10-15 13:21:59 -05:00