##// END OF EJS Templates
Test qnew --git
Patrick Mezard -
r5026:48ebd6a8 default
parent child Browse files
Show More
@@ -338,6 +338,33 b' hg qrefresh --git'
338 cat .hg/patches/bar
338 cat .hg/patches/bar
339 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
339 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
340
340
341 echo % create a git patch
342 echo a > alexander
343 hg add alexander
344 hg qnew -f --git addalexander
345 cat .hg/patches/addalexander | grep diff
346
347 echo % create a git binary patch
348 cat > writebin.py <<EOF
349 import sys
350 path = sys.argv[1]
351 open(path, 'wb').write('BIN\x00ARY')
352 EOF
353 python writebin.py bucephalus
354
355 python "$TESTDIR/md5sum.py" bucephalus
356 hg add bucephalus
357 hg qnew -f --git addbucephalus
358 cat .hg/patches/addbucephalus | grep diff
359
360 echo % check binary patches can be popped and pushed
361 hg qpop
362 ! test -f bucephalus || echo % bucephalus should not be there
363 hg qpush
364 test -f bucephalus || echo % bucephalus should be there
365 python "$TESTDIR/md5sum.py" bucephalus
366
367
341 echo '% strip again'
368 echo '% strip again'
342 cd ..
369 cd ..
343 hg init strip
370 hg init strip
@@ -360,6 +360,16 b' new file mode 100644'
360 @@ -0,0 +1,1 @@
360 @@ -0,0 +1,1 @@
361 +bar
361 +bar
362 3 barney (foo)
362 3 barney (foo)
363 % create a git patch
364 diff --git a/alexander b/alexander
365 % create a git binary patch
366 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
367 diff --git a/bucephalus b/bucephalus
368 % check binary patches can be popped and pushed
369 Now at: addalexander
370 applying addbucephalus
371 Now at: addbucephalus
372 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
363 % strip again
373 % strip again
364 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
374 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
365 merging foo
375 merging foo
General Comments 0
You need to be logged in to leave comments. Login now