##// END OF EJS Templates
transaction: issue "new obsmarkers" message at the end of the transaction...
transaction: issue "new obsmarkers" message at the end of the transaction Instead of making bundle2 code responsible for this, it seems better to have it handled and the transaction level. First, it means the message will be more consistently printed. Second it means we won't spam the message over and over if the data arrive in multiple piece. Third, we are planning to move other similar message at the same level (for the same reason) so having them all at the same location will help us to control the order they are displayed.

File last commit:

r41885:c70bdd22 default
r43164:38392d5b default
Show More
test-mq-missingfiles.t
201 lines | 3.6 KiB | text/troff | Tads3Lexer
/ tests / test-mq-missingfiles.t
Adrian Buehlmann
tests: unify some of test-mq*
r12324
Martin Geisler
tests: added a short description to issue numbers...
r12399 Issue835: qpush fails immediately when patching a missing file, but
remaining added files are still created empty which will trick a
future qrefresh.
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ cat > writelines.py <<EOF
> import sys
Gregory Szorc
tests: handle string escaping/encoding on Python 3...
r41359 > if sys.version_info[0] >= 3:
> encode = lambda x: x.encode('utf-8').decode('unicode_escape').encode('utf-8')
> else:
> encode = lambda x: x.decode('string_escape')
Adrian Buehlmann
tests: unify some of test-mq*
r12324 > path = sys.argv[1]
> args = sys.argv[2:]
> assert (len(args) % 2) == 0
>
Pulkit Goyal
py3: replace file() with open() in test-mq-missingfiles.t...
r36039 > f = open(path, 'wb')
Pulkit Goyal
py3: use '//' for integer divisions...
r36408 > for i in range(len(args) // 2):
FUJIWARA Katsunori
tests: bulk changes to avoid whitespace errors of check-code.py...
r41885 > count, s = args[2 * i:2 * i + 2]
Adrian Buehlmann
tests: unify some of test-mq*
r12324 > count = int(count)
Gregory Szorc
tests: handle string escaping/encoding on Python 3...
r41359 > s = encode(s)
FUJIWARA Katsunori
tests: bulk changes to avoid whitespace errors of check-code.py...
r41885 > f.write(s * count)
Adrian Buehlmann
tests: unify some of test-mq*
r12324 > f.close()
> EOF
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
$ hg init normal
$ cd normal
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" ../writelines.py b 10 'a\n'
Adrian Buehlmann
tests: unify some of test-mq*
r12324 $ hg ci -Am addb
adding b
$ echo a > a
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" ../writelines.py b 2 'b\n' 10 'a\n' 2 'c\n'
Adrian Buehlmann
tests: unify some of test-mq*
r12324 $ echo c > c
$ hg add a c
$ hg qnew -f changeb
$ hg qpop
popping changeb
patch queue now empty
$ hg rm b
$ hg ci -Am rmb
Push patch with missing target:
$ hg qpush
applying changeb
unable to find 'b' for patching
liscju
import: report directory-relative paths in error messages (issue5224)...
r29900 (use '--prefix' to apply patch relative to the current directory)
Adrian Buehlmann
tests: unify some of test-mq*
r12324 2 out of 2 hunks FAILED -- saving rejects to file b.rej
patch failed, unable to continue (try -v)
Yuya Nishihara
commands: say "working directory" in full spelling
r24365 patch failed, rejects left in working directory
timeless@mozdev.org
mq: consistently use qrefresh
r26780 errors during apply, please fix and qrefresh changeb
Adrian Buehlmann
tests: unify some of test-mq*
r12324 [2]
Display added files:
$ cat a
a
$ cat c
c
Display rejections:
$ cat b.rej
--- b
+++ b
@@ -1,3 +1,5 @@
+b
+b
a
a
a
@@ -8,3 +10,5 @@
a
a
a
+c
+c
Patrick Mezard
patch: keep patching after missing copy source (issue3480)...
r16813 Test missing renamed file
$ hg qpop
popping changeb
patch queue now empty
$ hg up -qC 0
$ echo a > a
$ hg mv b bb
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" ../writelines.py bb 2 'b\n' 10 'a\n' 2 'c\n'
Patrick Mezard
patch: keep patching after missing copy source (issue3480)...
r16813 $ echo c > c
$ hg add a c
$ hg qnew changebb
$ hg qpop
popping changebb
patch queue now empty
$ hg up -qC 1
$ hg qpush
applying changebb
patching file bb
Hunk #1 FAILED at 0
Hunk #2 FAILED at 7
2 out of 2 hunks FAILED -- saving rejects to file bb.rej
b not tracked!
patch failed, unable to continue (try -v)
Yuya Nishihara
commands: say "working directory" in full spelling
r24365 patch failed, rejects left in working directory
timeless@mozdev.org
mq: consistently use qrefresh
r26780 errors during apply, please fix and qrefresh changebb
Patrick Mezard
patch: keep patching after missing copy source (issue3480)...
r16813 [2]
$ cat a
a
$ cat c
c
$ cat bb.rej
--- bb
+++ bb
@@ -1,3 +1,5 @@
+b
+b
a
a
a
@@ -8,3 +10,5 @@
a
a
a
+c
+c
Adrian Buehlmann
tests: unify some of test-mq*
r12324 $ cd ..
$ echo "[diff]" >> $HGRCPATH
$ echo "git=1" >> $HGRCPATH
$ hg init git
$ cd git
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" ../writelines.py b 1 '\x00'
Adrian Buehlmann
tests: unify some of test-mq*
r12324 $ hg ci -Am addb
adding b
$ echo a > a
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" ../writelines.py b 1 '\x01' 1 '\x00'
Adrian Buehlmann
tests: unify some of test-mq*
r12324 $ echo c > c
$ hg add a c
$ hg qnew -f changeb
$ hg qpop
popping changeb
patch queue now empty
$ hg rm b
$ hg ci -Am rmb
Push git patch with missing target:
$ hg qpush
applying changeb
unable to find 'b' for patching
liscju
import: report directory-relative paths in error messages (issue5224)...
r29900 (use '--prefix' to apply patch relative to the current directory)
Adrian Buehlmann
tests: unify some of test-mq*
r12324 1 out of 1 hunks FAILED -- saving rejects to file b.rej
patch failed, unable to continue (try -v)
Yuya Nishihara
commands: say "working directory" in full spelling
r24365 patch failed, rejects left in working directory
timeless@mozdev.org
mq: consistently use qrefresh
r26780 errors during apply, please fix and qrefresh changeb
Adrian Buehlmann
tests: unify some of test-mq*
r12324 [2]
$ hg st
? b.rej
Display added files:
$ cat a
a
$ cat c
c
Display rejections:
$ cat b.rej
--- b
+++ b
GIT binary patch
literal 2
Jc${No0000400IC2
$ cd ..
Test push creating directory during git copy or rename:
$ hg init missingdir
$ cd missingdir
$ echo a > a
$ hg ci -Am adda
adding a
$ mkdir d
$ hg copy a d/a2
$ hg mv a d/a
$ hg qnew -g -f patch
$ hg qpop
popping patch
patch queue now empty
$ hg qpush
applying patch
now at: patch
$ cd ..