Commit Graph

47 Commits

Author SHA1 Message Date
Augie Fackler
c8e1c2c71d tags: fix handling for certain nonstandard tag layouts. 2009-05-30 20:18:14 -05:00
Augie Fackler
f7aa9c1fa8 test_tags: Add a test that verifies tags get deleted properly even in the presence of somewhat odd branching. 2009-05-30 19:46:03 -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
Patrick Mezard
e2670e5557 svnexternals: do not use peg revisions as --rev replacements
Peg revisions are now parsed separately. If a revision is supplied but not a
peg revision, we used the former as peg revision, as subversion seems to do.
2009-05-03 21:42:44 -05:00
Patrick Mezard
b4010e516b hg_delta_editor: detect new branches issued from non-branch directories
This fix solves the following case: let's /dumb/layout/project be an existing
project. To normalize the trunk/branches/tags layout, people may do:

$ mkdir /project
$ mv /dumb/layout/project /project/project
# Oups, should have been trunk!
$ mv /project/project /project/trunk

trunk creation was ignore because:
- update_branch_map() sees it come from a non-branch copy source and ignores it
  (case #3).
- since it is not in self.branches, add_directory() ignores the non-existing path.
Then trunk is left uninitialized.

To solve this, we allow update_branch_map() to detect branches copied from
non-canonical locations.
2009-05-03 21:42:42 -05:00
Augie Fackler
eb099e394a Added a test case for directory-add behavior when repo root is not project root. 2009-04-14 22:44:19 -05:00
Dirkjan Ochtman
34a1dfc322 Cope with date-less revisions. 2009-04-08 13:07:23 +02:00
Augie Fackler
9aa46bc305 Fix and test for directory deletes during branch creation. 2009-04-07 17:38:13 -05:00
Augie Fackler
6b854b9187 fetch: Fix a bogus case where no files in the root level of trunk caused breakage in the branch detection. 2009-03-09 12:01:40 -05:00
Augie Fackler
8a85f21bcb Add a genignore utility command that generates an hgignore file by scraping svn:ignore properties. 2009-02-24 14:30:21 -06:00
Patrick Mezard
91ce6eb557 Do not recurse for externals on copied directory in stupid mode
We inherit the source externals, changes to children will appear in the
changelog.
2009-01-14 23:17:13 -06:00
Patrick Mezard
f3f120cc99 test_externals: test branch copy, use absolute externals 2009-01-14 23:17:12 -06:00
Patrick Mezard
5629bbe05a Support svn:externals changes via .hgsvnexternals updates 2009-01-02 15:54:05 -06:00
Patrick Mezard
ae52abfad6 Convert svn:externals properties into a .hgsvnexternals file 2009-01-02 15:54:05 -06:00
Patrick Mezard
f64f7be3b4 fetch_command: cancel patching when encountering binary diffs
Mercurial patching code does not support hunks with embedded nul characters.
2008-12-30 20:33:56 -06:00
Augie Fackler
2377a3ba9f Improve branch closing in the case of a single-rev replacement of one branch
with another. Includes a test case.
2008-12-20 19:04:59 -06:00
Patrick Mezard
d7fb402a05 hg_delta_editor: reset properties of deleted entries
Otherwise, in case of entry replacement the properties are incorrectly
inherited.
2008-12-15 21:57:10 -06:00
Patrick Mezard
d194742e5b test_fetch_command: test file and directory deletions 2008-12-15 21:39:35 -06:00
Augie Fackler
5a6b6fb661 Fix an apparent regression where branch name didn't get properly stored for
commits forced on empty branches.
2008-12-11 17:34:33 -06:00
Augie Fackler
245956d4eb hg_delta_editor: fix bad parent revision calculation in the case of a branch
recycling a name.

Also implemented marking branches as closed in both replay and stupid paths.
2008-12-10 14:29:05 -06:00
Patrick Mezard
cca43db578 test_fetch_renames: test file and directory case changes 2008-12-10 11:03:23 -06:00
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
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
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
074290e2b2 fetch_command: handle nullid parent in stupid non-diffy mode 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
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
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
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
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
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
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