Commit Graph

203 Commits

Author SHA1 Message Date
Patrick Mezard
4962def957 hg_delta_editor: fix parent revision detection on branch copy
Project items copyfrom revisions are irrelevant to parent revision detection,
only the project one or those of its ancestors matter. Items copyfrom is
useful when retrieving items content.

Former code resulted in incorrect converted graph for pyglet repository,
especially on the following revision:

------------------------------------------------------------------------
r274 | r1chardj0n3s | 2006-12-21 02:02:14 +0100 (Jeu, 21 Dec 2006) | 2 lines
Changed paths:
   A /branches/richard-glx-version (from /trunk:269)
   M /branches/richard-glx-version/pyglet/window/xlib/__init__.py
   R /branches/richard-glx-version/tests/test.py (from /trunk/tests/test.py:270)
   R /branches/richard-glx-version/tools/info.py (from /trunk/tools/info.py:272)
   R /branches/richard-glx-version/website/get_involved.php (from /trunk/website/get_involved.php:273)

Branching to horribly mangle GLX
2008-12-10 11:03:22 -06:00
Patrick Mezard
ab83ba2548 test_fetch_rename: test content of files coming from the past 2008-12-10 11:03:22 -06:00
Patrick Mezard
a9f4c82415 run.py: register and develop test_fetch_symlinks 2008-12-10 11:03:19 -06:00
Patrick Mezard
cc0dbae2c2 Move and complete execute bit conversion tests into test_fetch_exec.py 2008-12-10 11:03:18 -06:00
Luke Opperman
beecf48b3b tag_repo: remove gentags command, extend repo.tags(), HgChangeEditor now takes either repo or repo_path 2008-12-04 13:10:40 -06:00
Patrick Mezard
f378fe3193 hg_delta_editor: do not assume branches are copied from trunk by default
Here is what happen in jquery repository:
- kelvin-dev branch is created in r1617 with an empty directory for the
  datePicker plugin
- commits are done
- datePicker plugin is merged in trunk

Before the fix, the converter assumed the initial empty commit had for parent
some other commit of trunk, therefore adding all its files, which was wrong.
And we ended with 'alignDemo.html' in converted trunk@5946 while it was not in
the source revision.
2008-11-29 11:25:01 -06:00
Patrick Mezard
a8d51edac3 hg_delta_editor: fix update of stray files in branches/
Ensure that self.current_file is a non-empty path in a branch.
2008-11-29 11:25:01 -06:00
Patrick Mezard
ede6bdfce9 fetch_command: ignore stray files in branches/ in non-diff mode 2008-11-29 11:25:01 -06:00
Patrick Mezard
05423736da Add a disabled test for unrelated branches
The fix is not obvious but preserving the test helps fixing other stuff.
2008-11-29 11:25:01 -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
Augie Fackler
0b3d81a7d5 fetch_command: Fix mis-converted executable when svn:executable was set to the
empty string.
2008-11-25 09:45:38 -06:00
Augie Fackler
e9d74f009c Cleanups based on pyflakes output. 2008-11-21 16:21:19 -06:00
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
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
074290e2b2 fetch_command: handle nullid parent in stupid non-diffy 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
e8410f200d test_push_command: fix test_push_existing_file_newly_execute() under Windows 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
Patrick Mezard
d6b5dd4cf7 fetch_command: support svn copy detection in stupid mode 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
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
dee222b7e9 push_cmd: Further simplified some logic thanks to an improved test. 2008-11-06 09:24:33 -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
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
Augie Fackler
6a7dd545c7 Fix a bug with added files from outside branches/trunk/tags. 2008-10-27 12:33:52 -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
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
f4f2e529d5 Change the format of generated tags so they are tag/$tag instead of tag:$tag so that you can use them as revision args in diff. 2008-10-10 14:19:06 -05:00
Augie Fackler
b7a86180cd Fix this so the tests can still be run without nose. 2008-10-10 14:18:24 -05:00
Augie Fackler
0463db2112 svn 1.4 and 1.5 have different ideas of diff output for prop changes. 2008-10-09 23:37:22 -05:00
Augie Fackler
f80cc03103 Pushing fails in 1.4's SWIG bindings, so double check for that in the test. 2008-10-09 23:36:20 -05: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
e463836499 Add a small stack of tests that exercise some of the interesting special cases. 2008-10-08 18:17:29 -05:00
Augie Fackler
379921079b Add a quick test for diff-based pull. 2008-10-08 08:14:31 -05:00
Augie Fackler
b4aa725c13 Fix a stupid mistake. A reminder of why Nose is handy. 2008-10-07 22:19:18 -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
Augie Fackler
5bcc1b653d Add some basic tests of branching. 2008-10-07 20:43:44 -05:00
Augie Fackler
e199e56609 Started a meaningful test suite. 2008-10-07 18:42:43 -05:00
Augie Fackler
df5906b82e Rename this file so I can have a file that tests the other bits of fetch. 2008-10-07 17:46:43 -05:00
Augie Fackler
6f047e7f60 Reorganized the testing infrastructure a bit so that svnwrap is really separate from the rest of the project. Also made it easier to add more tests in the future without making the directory full of annoying files. 2008-10-03 09:41:25 -05:00