Commit Graph

610 Commits

Author SHA1 Message Date
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