Commit Graph

60 Commits

Author SHA1 Message Date
Augie Fackler
ae5062ada9 Clean up TODOs that are no longer relevant. 2009-04-13 21:19:13 -05:00
Augie Fackler
04a99bbad0 Move wrappers for hg commands to their own module. 2009-04-10 22:38:29 -05:00
Daniel Tang
db371576c7 utils: standardizing imported name to hgutil, our_util to util 2009-04-10 13:43:44 -04: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
eeee067c89 Merge with crew. 2009-04-07 13:48:58 -05:00
Luke Opperman
2cd6817e45 Avoid problems in _localname for commits to tags by ignoring them 2009-03-31 15:23:38 -05:00
Augie Fackler
7b6569355c Fixing syntax highlighting in emacs. 2009-03-30 10:24:27 -05:00
Augie Fackler
648006ec19 branches: change handling again, but this time a little less magic.
This change means that files located in the actual branches directory will now be wholly
ignored. If we want to handle those correctly, it will take a reasonably large amount of work
and probably a configuration flag. Also, any non-related paths outside of branches/trunk will
be explicitly ignored, which is similar to the somewhat accidental pre-branch-refactor
behavior. Finally, any unrelated files located as children of branches will cause the directory
in branches to be used as the branch - not, as recently was the case, the directory immediately
containing that file.
2009-03-28 16:38:57 -05:00
Augie Fackler
786e73be71 hg_delta_editor: stop using foobaz as a bogus filename. 2009-03-28 14:27:27 -05:00
Dan Villiom Podlaski Christiansen
b3126abecf Use a reverse lookup in authormap to determine the author for 'hg svn info'. 2009-03-27 02:59:42 +01:00
Dan Villiom Podlaski Christiansen
d5600d0016 Get rid of .hg/svn/last_rev:
We now calculate the last known revision by iterating over all known
revisions and finding the highest number. Theoretically, we might be
able to simply read the latest entry, but in practice, that's a bug
waiting to happen. For instance, we might want to achieve
compatibility with '.hg/shamap' as generated by the
ConvertExtension, and it not only cannot offer a guarantee of
linearity, but it also allows more than one conversion to source exists.

I'd say we have other problems to care about until this turns up as a
hotspot in profiling. Such as why we leak circa 100MB of memory per
1000 revisions converted ;)
2009-03-27 01:09:36 +01:00
Dirkjan Ochtman
fb3ecc8ed3 Reuse ui from the repo if available. 2009-03-20 16:40:51 +01:00
Dan Villiom Podlaski Christiansen
f434f48525 Exception clean-ups; use symbolic names & avoid Python 2.6 deprecations. 2009-03-19 21:27:39 +01:00
Augie Fackler
55ed09f2fc fetch: Fix a bug that caused plaintexts to be interpreted as missing more often than they should be.
Also refactored a large part of hg_delta_editor to make it carry slightly less state around.
2009-03-16 23:19:00 -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
5771c60c73 Refactor branch handling to be much more dynamic (and hopefully robust).
This should allow fixing of several outstanding issues with branch handling. Note that this is a *massive* change to one of the oldest parts of hgsubversion, so it might introduce bugs not caught by the testsuite.
2009-03-02 23:58:38 -06:00
Dan Villiom Podlaski Christiansen
ef78fe32f8 Output consolidation; decrease the ‘Fetching...’ message to debug level. 2009-02-12 15:10:42 +01:00
Dan Villiom Podlaski Christiansen
88d2020164 Replace a few asserts with aborts. 2009-02-12 15:08:53 +01:00
Dan Villiom Podlaski Christiansen
9fa0ebe195 Create patch to make normal output much less verbose… 2009-01-17 15:30:38 -06:00
Benoit Boissinot
e9bbb4b6f5 remove decorators (compat with python2.3) 2009-01-13 13:59:50 +01:00
Graham Booker
8b8a5894cd Fetch: add a filemap argument for use in converting old repositories to
Mercurial.
2009-01-03 20:15:03 -06:00
Patrick Mezard
c17e74afd3 Really delete the .hgsvnexternals file when explicitely removed 2009-01-02 15:54:06 -06:00
Patrick Mezard
ae52abfad6 Convert svn:externals properties into a .hgsvnexternals file 2009-01-02 15:54:05 -06:00
Augie Fackler
42010019a9 authormap: Add tests, fix in stupid mode. 2008-12-30 20:14:03 -06:00
Graham Booker
b2a95bec11 fetch: Add support for an authormap which can rename authors, intended for
repository conversion.
2008-12-30 20:13:32 -06:00
Martin Geisler
836372d707 Remove unneeded call to list. 2008-12-30 19:24:16 -06:00
Augie Fackler
6aecfd2ab4 hg_delta_editor: Produce some output when creating a tag. 2008-12-24 10:52:31 -06:00
Augie Fackler
6f8b90fbad utility_commands: Implement rebuildmeta so that metadata can be rebuilt.
hg_delta_editor: Fixed some longstanding branch_info bugs detected while
rebuilding meta.
2008-12-23 22:19:26 -06:00
Augie Fackler
c6cb3f3922 fetch: Refactor extra creation to be shared by real and diff replay.
Add convert-compatible meta information to extra.
2008-12-23 11:10:32 -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
Augie Fackler
6d8dcda2b5 Add some more coverage directives. 2008-12-15 22:48:04 -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
Augie Fackler
217c63acb2 Fix missing newlines. 2008-12-12 09:47:54 -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
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
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
Augie Fackler
a071605551 Fix a bug in replay convert where replaced files that couldn't use replay
would sometimes end up having no content.
2008-12-03 22:51:03 -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
e7cc3df833 hg_delta_editor: merge _is_path_valid() and _path_and_branch_from_path() 2008-11-29 11:24:31 -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
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
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
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
Patrick Mezard
5ddd64603f hg_delta_editor: simplify exec/symlink flags generation 2008-11-03 08:43:07 -06:00