Mads Kiilerich
7fcc03caa5
test-import: test git patch import with strip
...
Tests revision 8f2a79985d13
2010-06-16 17:43:35 +02:00
Peter Arrenbrecht
7abe6f6609
patch: don't look for headers in diff lines
...
If you have a diff line that matches a header line, the patch splitter
currently breaks your patch at this line. For example a line like:
+key: value
This can lead to "malformed patch" exceptions. Now fixed.
2010-04-09 20:34:05 +02:00
Mads Kiilerich
6d35022505
Tests with spaces in paths
...
This allows most tests to succeed with
./run-tests.py --tmpdir='/tmp/hg test'
and introduces other tests for spaces and shell quoting
2010-03-24 01:43:24 +01:00
Benoit Boissinot
879a4a71db
patch: more precise NoHunk, raised for every file (issue2102)
2010-03-20 14:47:05 +01:00
Benoit Boissinot
f5bfcde5cb
patch: try harder to find the file to patch on file creation (issue2041)
...
accept the following patch header:
first line: foo/a.orig
second line: foo/a
2010-03-19 22:52:38 +01:00
Benoit Boissinot
0ad95ca3aa
patch: enhance diff detection regexp, allow '--- ' in patch message
2010-03-18 18:22:34 +01:00
Patrick Mezard
dede247fea
patch: fix patching with fuzz and eol normalization
2010-02-22 22:55:58 +01:00
Brendan Cully
de7c8ccdfb
import: if in doubt, consume stream until start of diff
...
This prevents a header-like line in the message body from causing a spurious split.
2010-02-18 10:46:01 -08:00
Brendan Cully
ce047e9ab3
import: import each patch in a file or stream as a separate change
...
Supports hg export <revrange>, mail messages, and mailboxes.
Does not support multiple patches in a single MIME attachment.
Closes issue167.
2010-02-07 18:06:52 +01:00
Matt Mackall
b6547e5312
Merge with stable
2009-10-11 13:54:19 -05:00
Patrick Mezard
a7d029beb4
patch: do not swallow header-like patch first line (issue1859)
...
Current solution is hackish but looks like a good trade-off short of rewriting
patch.extract() significantly.
2009-10-08 23:42:33 +02:00
Brendan Cully
dcdbd19aef
patch: create file even if source is not /dev/null
...
as long as the first hunk is -0,0 and the source and destination have the
same name. Matt found a patch like this, and /usr/bin/patch accepts it.
2009-08-07 19:27:54 -07:00
Martin Geisler
92a59fc839
tests: replace #...# syntax with {...}
2009-05-19 23:02:17 +02:00
Martin Geisler
65537ad291
tests: removed redundant "-d '0 0'" from test scripts
...
The tests are executed with a .hgrc file which adds "-d '0 0'" by
default.
2009-04-26 14:29:02 +02:00
Vsevolod Solovyov
201e56ffbb
Fix issue1495, corner case of adding empty files via patching
2009-03-24 23:28:55 +00:00
Brendan Cully
aad17924e9
import: add similarity option (issue295)
2008-11-22 00:21:57 -08:00
Patrick Mezard
ef4d9a9d32
patch: fix patched files records in externalpatcher()
2008-10-26 17:26:28 +01:00
Brendan Cully
2aef8dbc09
Check that git patches only touch files under root
2008-06-25 14:13:20 -07:00
Benoit Boissinot
e297c198c0
fix import with -p0
2008-04-12 22:41:07 -04:00
Patrick Mezard
d65e9c81dd
patch: fix corner case with update + copy patch handling (issue 937)
...
The self patching of files when diffed with a backup is a bit peculiar to me.
It makes sense in mpatch, that's less clear in mercurial patching code. Let's
document and preserve it for now.
2008-03-17 23:36:45 +01:00
Patrick Mezard
d5040b6003
patch: fix iterhunks() with trailing binary file removal
...
Like some renames or copy operations, binary file removal does not generate any
"file" or "hunk" action, but was not tagged as such and let iterhunk() assume
no hunk was applied for the deleted file.
2008-02-28 00:07:37 +01:00
Alexis S. L. Carvalho
961a45df72
merge with crew-stable
2008-02-03 21:47:07 -02:00
Alexis S. L. Carvalho
68bddaa728
hg import: write the dirstate after every commit
...
This allows the transaction system to backup the correct file, so
that a future rollback can do the right thing.
This should fix issue963.
2008-02-03 21:03:46 -02:00
Patrick Mezard
2d2126f043
patch: handle empty vs no file in git patches (issue906)
2008-01-12 19:35:11 +01:00
Jesse Glick
b6fdc96f71
Permitting the import command to accept a --user option.
...
The prose section of the help text for the command already said that -u and -m
are accepted, but -u was not listed in the table of options, and did not work.
Useful when accepting patches from other people made by hg diff rather than hg
export. For completeness, also accepting -d DATE.
[CHANGES: rebased against 2f0da487820f, --no-commit option.]
2008-01-25 19:49:15 -05:00
Thomas Arendsen Hein
4ae55d1279
Test case for hg import --no-commit
2008-01-25 16:18:49 +01:00
Patrick Mezard
d1c841154d
Merge with crew-stable
2008-01-12 20:49:07 +01:00
Patrick Mezard
eeff34ef5f
Merge with crew-stable
2007-11-25 12:42:06 +01:00
Patrick Mezard
f280a41d83
test-import: test fuzziness, ambiguous patch locations
2007-11-25 12:17:30 +01:00
Patrick Mezard
c182383712
test-import: read email payload in binary mode
2007-11-10 21:30:43 +01:00
Patrick Mezard
59a5193f63
patch: fix git sendmail handling without proper mail headers
2007-10-08 22:20:23 +02:00
Thomas Arendsen Hein
05a43d0fea
Added import test for [PATCH] subject and message body with subject
2007-07-02 22:45:58 +02:00
Alexis S. L. Carvalho
e488c0e84f
Fix handling of paths when run outside the repo.
...
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root". It now returns
an absolute path.
The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
Thomas Arendsen Hein
7701e96286
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
2006-12-26 14:17:48 +01:00
Danek Duvall
9c364cbd6e
Fix some tests for portability.
2006-08-09 12:05:40 -07:00
Mathieu Clabaut ext:(%22)
dced35893a
Import say a file is not tracked after patching : test case
2006-08-02 09:29:17 +02:00
Vadim Gelfer
958489deb9
import: added tests, fixed bugs found by tests and asak.
2006-06-27 09:30:50 -07:00