Commit Graph

742 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
df6f43b4df convert_cvs: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
b7d48206ca convert_git: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
f951bc5803 mercurial_source: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
4bc9e33d0e convert: add a mode where mercurial_sink skips empty revisions.
The getchanges function of some converter_source classes can return
some false positives.  I.e. they sometimes claim that a file "foo"
was changed in some revision, even though its contents are still the
same.

convert_svn is particularly bad, but I think this can also happen with
convert_cvs and, at least in theory, with mercurial_source.

For regular conversions this is not really a problem - as long as
getfile returns the right contents, we'll get a converted revision
with the right contents.  But when we use --filemap, this could lead
to superfluous revisions being converted.

Instead of fixing every converter_source, I decided to change
mercurial_sink to work around this problem.

When --filemap is used, we're interested only in revisions that touch
some specific files.  If a revision doesn't change any of these files,
then we're not interested in it (at least for revisions with a single
parent; merges are special).

For mercurial_sink, we abuse this property and rollback a commit if
the manifest text hasn't changed.  This avoids duplicating the logic
from localrepo.filecommit to detect unchanged files.
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
8978438d64 convert: readd --filemap
To handle merges correctly, this revision adds a filemap_source class
that wraps a converter_source and does the work necessary to calculate
the subgraph we're interested in.

The wrapped converter_source must provide a new getchangedfiles method
that, given a revision rev, and an index N, returns the list of files
that are different in rev and its Nth parent.

The implementation depends on the ability to skip some revisions and to
change the parents field of the commit objects that we returned earlier.

To make the conversion restartable, we assume the revisons in the
revmapfile are topologically sorted.
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
ab0d9013c0 convert: move filemapper class to a separate file 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
9ca59573cc convert: disable current --filemap support
The --filemap support in hg convert doesn't handle merges correctly.
(And after 98d1e8c16343 I managed to break it even for simple cases
where we don't want the first revision.)
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
10150a4dc3 convert: allow the converter_source to say "skip this revision"
If getchanges returns a string, it's assumed to be the id of an
already converted revision.  We map the current revision to the same
revision this converted revision was mapped to.

To allow skipping a root revision, getchanges can return the special
string 'hg-convert-skipped-revision' (a.k.a. common.SKIPREV), which
hopefully won't clash with any real id.

The converter_source is responsible for rewriting the parents of the
commit objects to make sure the revision graph makes sense.
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
af43e5bffa convert: pass the order of the revmapfile to the converter_source
The entries in this file are supposed to be topologically sorted and
this may be useful for a converter_source.
2007-10-04 23:21:37 -03:00
Bryan O'Sullivan
417886f00a Merge with crew 2007-10-02 21:01:00 -07:00
Bryan O'Sullivan
028f525b88 convert: fix a few residual bugs in darcs importer 2007-10-02 21:00:38 -07:00
Bryan O'Sullivan
5e33599d0f Merge with crew. 2007-10-02 13:49:36 -07:00
Bryan O'Sullivan
ecdd764817 convert: support darcs as a source repo 2007-10-02 13:49:11 -07:00
Bryan O'Sullivan
3ba6252dc7 convert: fail properly if we can't read a source hg repository 2007-10-02 13:48:52 -07:00
Bryan O'Sullivan
57e084bf32 convert: add before/after hooks for converter sources 2007-10-02 13:46:17 -07:00
Patrick Mezard
091596b961 Merge with crew-stable 2007-09-30 12:36:11 +02:00
Patrick Mezard
12ec5fa979 convert: fix missing import 2007-09-30 12:08:33 +02:00
Bryan O'Sullivan
cfd6f17898 Merge with crew-stable. 2007-09-29 21:10:54 -07:00
Bryan O'Sullivan
4f30385a85 convert: delete empty directories if deleting a file (bug 754) 2007-09-29 21:08:14 -07:00
Alexis S. L. Carvalho
ddf41e005d Merge with crew-stable 2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
6f75c91b5f convert_git: avoid returning two entries for the same file in getchanges
This could happen in merge changesets if the merged file was different
from both parents.
2007-09-24 19:00:11 -03:00
Alexis S. L. Carvalho
38a7ae7001 mq: fix qrefresh -e with no patches applied 2007-09-24 19:00:11 -03:00
Patrick Mezard
e735e01dae bisect: remove useless try/except 2007-09-22 19:05:36 +02:00
Benoit Boissinot
2c52922666 bisect: don't write data on failure 2007-09-22 18:35:53 +02:00
Benoit Boissinot
5d47e0ef5a bisect: do silent init if necessary 2007-09-22 18:23:56 +02:00
Patrick Mezard
d24e36a450 Merge with crew-stable 2007-09-14 23:10:41 +02:00
Patrick Mezard
8577cf36be convert: workaround for cvsps.cache under Windows
In non-cygwin environment, cvsps fails to create its cache directory and redirect its output to stderr. Just ignore the error and capture stderr as well.
2007-09-14 22:17:53 +02:00
Patrick Mezard
7d74b8608f convert: fix remote cvs file paths separator 2007-09-14 22:17:53 +02:00
Patrick Mezard
fc230fc7bd convert: avoid interpreting Windows path as CVS connection strings.
CVS connection strings regexp detect colons to separate protocols from path and login. Unfortunately, Windows paths contains colons and were interpreted as rsh connection strings.
2007-09-14 22:17:53 +02:00
Patrick Mezard
93f1b14c12 convert: call popen2 in binary mode, with a command string. 2007-09-14 22:17:53 +02:00
Brendan Cully
541b432293 Merge with crew 2007-09-10 15:00:19 -07:00
Brendan Cully
92a19d3a72 mq: fix regression in c5d80ff6828f
It caused qrefresh; qrefresh -X addedfile to leave the file as normal in dirstate.
It should be marked added on the second pass.
2007-09-10 15:00:05 -07:00
Patrick Mezard
7c1d0710ee Merge with crew-stable 2007-09-10 23:53:23 +02:00
Patrick Mezard
239ea63571 extdiff: avoid repr() doubling paths backslashes under Windows 2007-09-10 23:36:01 +02:00
Edward Lee
3227d5925c interhg: allow more flexible pattern specification (fixes 2/3 of issue699)
- something else than "pat" followed by a number can be used as key
- something else than "/" can be used as delimiter
- "ilmsux" flags (e.g. "i" for case insensitive) can be used
2007-09-07 16:35:43 +02:00
Thomas Arendsen Hein
0b6d82e138 Don't decode unicode strings.
This does not work with python2.3 and is probably not useful anyway with 2.4.
2007-09-07 16:14:51 +02:00
Bryan O'Sullivan
f3ff6b7741 record: change wording of initial per-file prompt 2007-09-06 10:52:54 -07:00
Alexis S. L. Carvalho
2442d0db1e convert: rename a class and a function 2007-09-01 02:49:18 -03:00
Alexis S. L. Carvalho
7dac6f1262 convert: mercurial_source: also search for copies in modified files
There are some corner cases where we may have a copy in a file that
isn't in the added list:

- the result of a hg copy --after --force

- after a merge across a (local) rename
2007-09-01 02:49:18 -03:00
Alexis S. L. Carvalho
6309fee56a convert: clear the dirstate before a conversion, invalidate it afterwards
Clearing it before the conversion protects us from whatever data were
there (file copies in particular).

Invalidating it after the conversion avoids writing a possibly
inconsistent dirstate to disk.
2007-09-01 02:49:18 -03:00
Alexis S. L. Carvalho
41b6be949d convert: avoid dirstate checks; add a test
During a conversion, the dirstate contents are not consistent - there
are files that may be missing from the dirstate and there may be files
that shouldn't be in the dirstate.

While this is not fixed, don't mark files as added - put them directly
in state 'n'ormal.
2007-09-01 02:49:18 -03:00
Thomas Arendsen Hein
a476e1623a convert/subversion: Use util.set() instead of set() for python2.3 compatibility 2007-08-31 13:14:03 +02:00
Brendan Cully
2ddab8e83a Merge with crew 2007-08-27 15:41:31 -07:00
Brendan Cully
4d5be2d7bc convert: new config variable hg.tagsbranch controls which branch tags are committed to 2007-08-27 15:39:07 -07:00
Bryan O'Sullivan
c1bc2ff489 convert: document filemap. 2007-08-27 13:38:16 -07:00
Brendan Cully
d9a2ba66f8 convert: svn: check for branch movement in any log entry, not just the first.
This fixes, for example,
r4151
   D /branches
   A /project/branches (from /branches:4150)
   A /project/tags (from /tags:4150)
   A /project/trunk (from /trunk:4150)
   D /tags
   D /trunk
2007-08-27 11:56:53 -07:00
Alexis S. L. Carvalho
714fa94597 Merge with crew-stable 2007-08-27 02:21:58 -03:00
Alexis S. L. Carvalho
420ceda070 avoid double slash problem mentioned in issue695 2007-08-27 01:44:35 -03:00
Patrick Mezard
c9e8914a18 Merge with crew-stable 2007-08-26 19:13:24 +02:00
Patrick Mezard
e0104ee85f convert: fix /dev/null redirections under Windows 2007-08-26 19:05:19 +02:00
Patrick Mezard
5d54b971c7 Merge with crew-stable 2007-08-26 16:49:26 +02:00
Patrick Mezard
6202bc3003 convert: fix issue702 about GIT_DIR= construct unsupported under Windows. 2007-08-26 14:51:27 +02:00
Brendan Cully
6c3736cbca Improve extdiff configuration.
In addition to the old cmd.foo, opts.foo hgrc entries, allow a more simple
alias = command [opts]... form. For example:
[extdiff]
cdiff = colordiff -uprN
2007-08-25 12:25:53 -07:00
Brendan Cully
737a6eca37 imerge: add automerge flag to attempt to batch merge all conflicts 2007-08-23 22:45:41 -07:00
Brendan Cully
671f6fd2a7 imerge: fix ancestor calculation
If wctx already has two parents, ancestor calculation is wrong.
Normally merge is called before wctx gets the second parent, so
we simulate this in imerge by temporarily popping the second parent
before calling filemerge. Highly dirty.

This patch also handles the ParseError move from cmdutil to dispatch.
2007-08-23 19:51:59 -07:00
Brendan Cully
461732b80c mq: some improvements to header rewriting (closes #690)
Tested with qrefresh -m against the mm series.
2007-08-23 13:59:52 -07:00
Alexis S. L. Carvalho
a345c2c9da merge: forcefully mark files that we get from the second parent as dirty
After a hg merge, we want to include in the commit all the files that we
got from the second parent, so that we have the correct file-level
history.  To make them visible to hg commit, we try to mark them as dirty.

Unfortunately, right now we can't really mark them as dirty[1] - the
best we can do is to mark them as needing a full comparison of their
contents, but they will still be considered clean if they happen to be
identical to the version in the first parent.

This changeset extends the dirstate format in a compatible way, so that
we can mark a file as dirty:

Right now we use a negative file size to indicate we don't have valid
stat data for this entry.  In practice, this size is always -1.

This patch uses -2 to indicate that the entry is dirty.  Older versions
of hg won't choke on this dirstate, but they may happily mark the file
as clean after a full comparison, destroying all of our hard work.

The patch adds a dirstate.normallookup method with the semantics of the
current normaldirty, and changes normaldirty to forcefully mark the
entry as dirty.

This should fix issue522.

[1] - well, we could put them in state 'm', but that state has a
different meaning.
2007-08-23 01:48:29 -03:00
Patrick Mezard
e2a0f6645e convert: load parent commits on-demand 2007-08-19 17:38:40 +02:00
Patrick Mezard
f5be1652a3 convert: wrap cached commits author remapping 2007-08-19 17:38:07 +02:00
Alexis S. L. Carvalho
d999b43c2b convert: fix mercurial_sink.putcommit
Changeset 31be2f4d36a5 added some code to putcommit to avoid creating a
revision that touches no files, but this can break regular conversions
from some repositories:

- conceptually, since we're converting a repo, we should try to make
  the new hg repo as similar as possible to the original repo - we
  should create a new changeset, even if the original revision didn't
  touch any files (maybe the commit message had some important bit);

- even if a "regular" revision that doesn't touch any file may seem
  weird (and maybe even broken), it's completely legitimate for a merge
  revision to not touch any file, and, if we just skip it, the
  converted repo will end up with wrong history and possibly an extra
  head.

  As an example, say the crew and main hg repos are sync'ed.  Somebody
  sends an important patch to the mailing list.  Matt quickly applies
  and pushes it.  But at the same time somebody also applies it to crew
  and pushes it.  Suppose the commit message ended up being a bit
  different (say, there was a typo and somebody didn't fix it) or that
  the date ended up being different (because of different patch-applying
  scripts): the changeset hashes will be different, but the manifests
  will be the same.

  Since both changesets were pushed to public repos, it's hard to recall
  them.  If both are merged, the manifest from the resulting merge
  revision will have the exact same contents as its parents - i.e. the
  merge revision really doesn't touch any file at all.

To keep the file filtering stuff "working", the generic code was changed
to skip empty revisions if we're filtering the repo, fixing a bug in the
process (we want parents[0] instead of tip).
2007-08-17 20:18:05 -03:00
Alexis S. L. Carvalho
e60e53981a Add parentrevspec extension 2007-08-17 17:33:27 -03:00
Matt Mackall
7065cf1716 Merge with crew 2007-08-17 00:35:16 -05:00
Brendan Cully
5547c2d64a Merge with crew-stable 2007-08-15 16:22:12 -07:00
Brendan Cully
ac725f5988 mq: truncate patch just before rewriting header 2007-08-15 16:20:10 -07:00
Matt Mackall
c08427e0e8 dispatch: move command dispatching into its own module
- move command dispatching functions from commands and cmdutil to dispatch
- change findcmd to take a table argument
- remove circular import of commands in cmdutil
- privatize helper functions in dispatch
2007-08-15 16:55:13 -05:00
Brendan Cully
54828484dd convert: raise Abort instead of NoRepo when CVS pserver auth fails.
At this point we know the source is CVS, so we should not go through
the rest of the converters.
2007-08-15 14:38:18 -07:00
Brendan Cully
0893e6763c convert: hg: optionally create branches as clones
If convert.hg.clonebranches is set, branches will be created as clones of
their parent revisions. All clones will be subdirectories of the
destination path.
2007-08-15 13:21:23 -07:00
Patrick Mezard
f54fb44413 Merge with crew-stable 2007-08-14 19:06:10 +02:00
Guillaume Chazarain
011bd031bd Return 0 as 'hg bisect reset' is successful 2007-08-14 14:29:36 +02:00
Brendan Cully
f3948130fd imerge: simplify c3b3184057da 2007-08-13 11:58:47 -07:00
Patrick Mezard
a7e536de52 imerge: fix status file lookups 2007-08-13 19:42:52 +02:00
Bryan O'Sullivan
3899e7b033 mq: teach qpop about symlinks 2007-08-09 20:16:00 -07:00
Bryan O'Sullivan
46880a1c4f record: improve docs, improve prompts 2007-08-09 17:29:16 -07:00
Benoit Boissinot
ce6a51c4eb refactor options from cmdtable
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Thomas Arendsen Hein
8a25464ce3 merge with crew-stable 2007-08-07 15:57:23 +02:00
Thomas Arendsen Hein
b9ea9bfdb1 CVS import: Support new-style .cvspass-file format.
Based on an email from Ralf.Leibold at nuance dot com
2007-08-07 15:56:26 +02:00
Thomas Arendsen Hein
05ef84ba57 raise util.Abort again if specified revision is not an integer.
This was changed to NoRepo in 821162e04f85, because specifying non-integer
revisions for e.g. the Mercurial backend caused Abort to be raised in the
subversion importer.

Now util.Abort is raised again, but the check is done after verifying if it
really is a subversion repository.
2007-08-07 12:24:25 +02:00
Thomas Arendsen Hein
b61f987eaf debugsvnlog call had too many quotes (found by Edouard Gomez) 2007-08-07 12:10:56 +02:00
Thomas Arendsen Hein
e34927453f Remove trailing spaces, fix indentation 2007-08-07 10:28:43 +02:00
Thomas Arendsen Hein
001b7980f8 Remove trailing spaces 2007-08-07 10:24:33 +02:00
Thomas Arendsen Hein
2bdeec2938 Removed debug print from convert/subversion.py 2007-08-07 10:01:20 +02:00
Thomas Arendsen Hein
25277ca50a Replace _ with inst for catching exceptions to not shadow gettext.
And removed one _(...) because mercurial.i18n is not yet imported
in convert/subversion.py.
2007-08-07 09:56:21 +02:00
Thomas Arendsen Hein
d392159c93 Move debugsvnlog to subversion module. 2007-08-07 09:49:07 +02:00
Thomas Arendsen Hein
a566c951ff convert: Use debugsvnlog instead of git-like debug-svn-log. 2007-08-07 09:42:32 +02:00
Brad Schick
18eb282ff7 extdiff: do single file diffs from the wc with no copy
Extdiff was always making a temporary directory and copying files even when not required. This change makes extdiff avoid the copy when diffing a single file that lives in the wc. This lets external diff tools edit the working copy file directly. It also lets other extensions resuse the functions in extdiff and get in-place diffs.
2007-08-06 14:50:57 -07:00
Brad Schick
eec22b0f45 extdiff: made it less chatty in non-verbose mode
Made the status info only display in verbose mode since most hg commands aren't so chatty. This also makes it cleaner for other extensions to call extdiff.
2007-08-06 14:42:11 -07:00
Brad Schick
e42e7b9d8c extdiff: un-nested two functions
The functions in extdiff that create temporary repo copies for are useful in other extensions, so the change moves them at the module level.
2007-08-06 14:32:23 -07:00
Bryan O'Sullivan
1732273217 convert: remove accidental debug print 2007-08-06 15:37:14 -07:00
Bryan O'Sullivan
b2dac5bc36 convert: use '.' as destination name if renaming subdir into root 2007-08-06 14:59:00 -07:00
Bryan O'Sullivan
70a2cd0076 Automated merge with http://hg.intevation.org/mercurial/crew 2007-08-06 14:17:05 -07:00
Bryan O'Sullivan
46d9ef5fcf convert: only get history for requested revs when converting hg repo 2007-08-06 14:16:50 -07:00
Bryan O'Sullivan
ce0d86f3c0 convert: raise correct type of exception if svn converter can't handle rev 2007-08-06 14:16:02 -07:00
Bryan O'Sullivan
4354d3e986 record: raise an exception correctly if we can't create a backup directory 2007-08-06 12:53:49 -07:00
Bryan O'Sullivan
4b5691e253 record: work properly if invoked in a subdirectory 2007-08-06 12:53:17 -07:00
Patrick Mezard
d576863603 convert: replace fork with subprocess call. 2007-08-06 21:49:26 +02:00
Brendan Cully
43a17f1dbd convert: svn: remove debugging message 2007-08-05 12:09:55 -07:00
Brendan Cully
e14b56ed31 convert: look up copies in getchanges instead of getcommit
svn: defer path expansion until getchanges to reduce latency, as well as memory
usage when converting incrementally.
2007-08-05 12:03:27 -07:00
Brendan Cully
79dfd4af0e convert: svn: pull up path to file expansion code into separate function.
This is part of the process for deferring path expansion until getchanges.
Copy detection also needs to be moved out of the commit object.
2007-08-05 11:30:52 -07:00
Brendan Cully
ae6d027bb1 convert: svn: hoist up branch creation check 2007-08-05 10:23:45 -07:00
Brendan Cully
746c44a9fc convert: svn: remove dead code 2007-08-05 10:04:28 -07:00
Brendan Cully
0febaca10c convert: svn: add helper function for optrevs 2007-08-05 10:04:00 -07:00
Brendan Cully
bc5b76fe7b Merge with crew 2007-08-04 18:04:35 -07:00
Brendan Cully
c7dc3bf62b convert: svn: ensure leading / is removed from paths in _find_children (broken in e1a302eaf619) 2007-08-04 18:02:37 -07:00
Bryan O'Sullivan
b7ce9fcfbd convert: drop duplicated assignments. 2007-08-04 12:38:30 -07:00
Brendan Cully
8b26a09d27 imerge: gussy up dispatcher to support subcommand opts.
Add -n, --resolved, --unresolved to status.
2007-08-04 12:26:48 -07:00
Brendan Cully
6f2a9d642d Merge with crew 2007-08-04 09:33:10 -07:00
Brendan Cully
9fa1148786 imerge: handle renames 2007-08-03 18:05:20 -07:00
Patrick Mezard
17bfcef457 convert: support windows SVN simple auth provider 2007-08-02 23:38:32 +02:00
Thomas Arendsen Hein
0dfe60884f imerge: sorted() is only available in python2.4 and above 2007-08-02 14:04:51 +02:00
Benoit Boissinot
3588fd3abd imerge: tarfile.extractall is only available in python2.5 2007-08-02 14:04:00 +02:00
Brendan Cully
a23047ab44 Update imerge for new filemerge interface 2007-08-01 23:59:19 -07:00
Alexis S. L. Carvalho
5af674774c del transaction before lock before wlock
This way rollbacks happen while the repo is still locked.

Deleting lock before wlock is not strictly necessary, but is
more consistent with the locking order.
2007-08-02 01:56:08 -03:00
Alexis S. L. Carvalho
181f0a3596 convert: fix locking order 2007-08-02 01:56:08 -03:00
Brendan Cully
70d50ced47 convert: (svn) simplify _find_children 2007-08-01 15:16:42 -07:00
Brendan Cully
dbb657852c imerge extension and test 2007-08-01 11:37:11 -07:00
Thomas Arendsen Hein
c6fa90f553 Update style of record's cmdtable to match mercurial/commands.py 2007-08-01 10:42:42 +02:00
Bryan O'Sullivan
bfb3dfc715 convert: add config option to turn off use of branch names 2007-07-31 17:18:59 -07:00
Bryan O'Sullivan
a79766b2cd Add record extension, giving darcs-like interactive hunk picking 2007-07-31 16:28:05 -07:00
Patrick Mezard
70ab7b4b41 mq: add qnew --git option 2007-07-28 20:15:54 +02:00
Bryan O'Sullivan
e5831bba91 convert: empty log messages are OK as of d10c8cd5d283 2007-07-27 14:30:20 -07:00
Brendan Cully
0c1f3fe27b Merge with bos 2007-07-26 14:04:48 -07:00
Brendan Cully
987acabeef convert svn: canonicalize path before calling url_from_path.
Otherwise libsvn has a tendency to abort().
2007-07-26 14:02:49 -07:00
Bryan O'Sullivan
930e85e029 convert: get rid of ugly use of hasattr 2007-07-26 13:36:53 -07:00
Bryan O'Sullivan
4b8b41843e convert: get rid of "hg." prefix where not needed 2007-07-26 13:34:36 -07:00
Bryan O'Sullivan
30c0638736 convert: add filename filtering and renaming support 2007-07-26 13:34:36 -07:00
Bryan O'Sullivan
2eb79e019f convert: acquire/release locks periodically 2007-07-26 13:34:36 -07:00
Bryan O'Sullivan
73b8ede983 convert: Support Mercurial as a source, as well as a sink 2007-07-26 13:34:36 -07:00
Bryan O'Sullivan
787a42c2b2 convert: make commit constructor clearer and less magical 2007-07-26 13:34:36 -07:00
Bryan O'Sullivan
fe20ca5067 convert: rename mapfile to revmapfile, so we can map more than just revs 2007-07-26 13:34:36 -07:00
Brendan Cully
bd0ce0a313 convert svn: try to extract URL from source if it is a working directory 2007-07-26 10:57:26 -07:00
Brendan Cully
eb0a3e666b convert: urlify svn repos if necessary.
We should also try to extract the URL from an svn working directory.
2007-07-26 10:42:44 -07:00
Matt Mackall
3dfe783ec5 transactions: avoid late tear-down (issue641)
We use weak references (ugh) to avoid having to manually delete
transaction references out of each call frame when an exception occurs.
2007-07-22 14:53:57 -05:00
Matt Mackall
cd72dc7f1b Merge with crew 2007-07-21 16:44:38 -05:00
Matt Mackall
3a3bd8ec5b Make repo locks recursive, eliminate all passing of lock/wlock 2007-07-21 16:02:10 -05:00
Matt Mackall
3e13c68628 Use try/finally pattern to cleanup locks and transactions 2007-07-21 16:02:10 -05:00
Matt Mackall
c2967290a5 dirstate: add __contains__ and make __getitem__ more useful
dirstate.state(f) == '?' -> f not in dirstate
dirstate.state(f) -> dirstate[f]
2007-07-21 16:02:09 -05:00
Matt Mackall
bab511ec55 dirstate: make wjoin function private 2007-07-21 16:02:09 -05:00
Matt Mackall
cf691df912 dirstate: break update into separate functions 2007-07-21 16:02:09 -05:00
Thomas Arendsen Hein
c8973835b3 test-alias: Removed fallback to parentui, no longer needed since 681da44cf9e4 2007-07-21 17:56:30 +02:00
Thomas Arendsen Hein
95c8d3f7f8 Remove unused pprint import and the commented line which used it before. 2007-07-21 10:43:29 +02:00
Thomas Arendsen Hein
4c6cff621b Backout 5d79f5ed74d4 and replace ''' with """ to make some highlighting happy.
I have tried Debian's default emacs and the current CVS version. Default emacs
doesn't have highlighting enabled (and being emacs-illiterate I don't know how
to enable it) and the CVS emacs' Python highlighting has no problems with '
characters here.
2007-07-21 10:36:51 +02:00
Thomas Arendsen Hein
d9d3256252 removed trailing whitespace 2007-07-21 10:30:51 +02:00
Bryan O'Sullivan
17119bef10 convert/subversion: rehandle the no-tags case 2007-07-19 15:33:21 -07:00
Bryan O'Sullivan
c303898fbc convert/subversion: work around memory leak in svn's python bindings
The svn.ra.get_log wrapper attaches the hash of changed paths for every
log entry to a global memory pool, so memory consumption increases
rapidly, with no way to free it.

Our workaround is to call this function in a child process, and feed
its results back over a pipe.  The memory consumption of the child still
grows huge (hundreds of megabytes), but at least it goes away once the
reading-the-log phase is done.
2007-07-19 12:41:07 -07:00
Bryan O'Sullivan
e824d5ba5d convert/subversion: Simplify callback. 2007-07-18 22:44:25 -07:00
Bryan O'Sullivan
12b2410da4 convert/subversion: reduce memory usage by filtering early
This makes up to a 50% difference in memory consumption.
2007-07-18 19:56:36 -07:00
Bryan O'Sullivan
dd356c432e Automated merge with http://hg.intevation.org/mercurial/crew 2007-07-18 19:47:22 -07:00
Bryan O'Sullivan
b5c4639e41 convert/subversion: get converter working against plain HTTP. 2007-07-18 17:44:52 -07:00
Bryan O'Sullivan
118f017025 convert/subversion.py: str.rsplit is not available in Python 2.3 2007-07-17 15:47:32 -07:00
Bryan O'Sullivan
4946c0febe convert/subversion.py: fix bad assumptions about SVN path naming
The SVN converter assumed that the trunk and branches paths were fixed,
and immediately under the base of the SVN URL.  Fix the second assumption,
and allow the trunk and branches paths to be reconfigured.
2007-07-17 15:24:59 -07:00