Show More
@@ -161,7 +161,7 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||||
161 | dopatch = fp.tell() |
|
161 | dopatch = fp.tell() | |
162 | fp.seek(0) |
|
162 | fp.seek(0) | |
163 |
|
163 | |||
164 | [os.unlink(c) for c in newlyaddedandmodifiedfiles] |
|
164 | [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles] | |
165 | # 3a. apply filtered patch to clean repo (clean) |
|
165 | # 3a. apply filtered patch to clean repo (clean) | |
166 | if backups: |
|
166 | if backups: | |
167 | # Equivalent to hg.revert |
|
167 | # Equivalent to hg.revert |
@@ -1463,4 +1463,37 b' Editing patch of newly added file' | |||||
1463 | This is the first line |
|
1463 | This is the first line | |
1464 | This is the second line |
|
1464 | This is the second line | |
1465 | This is the third line |
|
1465 | This is the third line | |
|
1466 | ||||
|
1467 | Add new file from within a subdirectory | |||
|
1468 | $ hg update -C . | |||
|
1469 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1470 | $ mkdir folder | |||
|
1471 | $ cd folder | |||
|
1472 | $ echo "foo" > bar | |||
|
1473 | $ hg add bar | |||
|
1474 | $ hg commit -i -d '23 0' -mnewfilesubdir <<EOF | |||
|
1475 | > y | |||
|
1476 | > y | |||
|
1477 | > EOF | |||
|
1478 | diff --git a/folder/bar b/folder/bar | |||
|
1479 | new file mode 100644 | |||
|
1480 | examine changes to 'folder/bar'? [Ynesfdaq?] y | |||
|
1481 | ||||
|
1482 | @@ -0,0 +1,1 @@ | |||
|
1483 | +foo | |||
|
1484 | record this change to 'folder/bar'? [Ynesfdaq?] y | |||
|
1485 | ||||
|
1486 | $ hg tip -p | |||
|
1487 | changeset: 32:fb46c2a66466 | |||
|
1488 | tag: tip | |||
|
1489 | user: test | |||
|
1490 | date: Thu Jan 01 00:00:23 1970 +0000 | |||
|
1491 | summary: newfilesubdir | |||
|
1492 | ||||
|
1493 | diff -r 34c65441ddfb -r fb46c2a66466 folder/bar | |||
|
1494 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
1495 | +++ b/folder/bar Thu Jan 01 00:00:23 1970 +0000 | |||
|
1496 | @@ -0,0 +1,1 @@ | |||
|
1497 | +foo | |||
|
1498 | ||||
1466 | $ cd .. |
|
1499 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now