Mercurial > hg
comparison tests/test-graft.t @ 38154:decdb587ea12
graft: reuse --user and --date values in `hg graft --continue` (BC)
Reading the user and date information from graftstate during `hg graft
--continue` will help us in preserving the user and date arguments passed when
`hg graft` was called. This patch reads that information and reuses that while
running `hg graft --continue`. So after this patch, --user and --date values are
preserved even if conflicts occur and user don't need to pass them again.
The test changes demonstrate the fix.
This is a backward incompatible change but I think of this more as a bug fix.
Also thinking about removing the line from `hg help graft` which says --continue
does not reapply other flags but need to check what are the other flags which
needs to be preserved.
Differential Revision: https://phab.mercurial-scm.org/D3659
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 25 May 2018 17:21:01 +0530 |
parents | 108ebd8eff5c |
children | 5736570718fe |
comparison
equal
deleted
inserted
replaced
38153:108ebd8eff5c | 38154:decdb587ea12 |
---|---|
1466 | 1466 |
1467 $ hg graft --continue | 1467 $ hg graft --continue |
1468 grafting 1:80e6d2c47cfe "added b" | 1468 grafting 1:80e6d2c47cfe "added b" |
1469 grafting 2:8be98ac1a569 "added c" | 1469 grafting 2:8be98ac1a569 "added c" |
1470 | 1470 |
1471 XXX: the user of 6 and 7 should be batman | |
1472 $ hg log -Gr 3:: | 1471 $ hg log -Gr 3:: |
1473 @ changeset: 7:89f377552d81 | 1472 @ changeset: 7:11a36ffaacf2 |
1474 | tag: tip | 1473 | tag: tip |
1475 | user: test | 1474 | user: batman |
1476 | date: Thu Jan 01 00:00:00 1970 +0000 | 1475 | date: Thu Jan 01 00:00:00 1970 +0000 |
1477 | summary: added c | 1476 | summary: added c |
1478 | | 1477 | |
1479 o changeset: 6:393512ff89b9 | 1478 o changeset: 6:76803afc6511 |
1480 | parent: 3:9e887f7a939c | 1479 | parent: 3:9e887f7a939c |
1481 | user: test | 1480 | user: batman |
1482 | date: Thu Jan 01 00:00:00 1970 +0000 | 1481 | date: Thu Jan 01 00:00:00 1970 +0000 |
1483 | summary: added b | 1482 | summary: added b |
1484 | | 1483 | |
1485 | o changeset: 5:711e9fa999f1 | 1484 | o changeset: 5:711e9fa999f1 |
1486 | | user: test | 1485 | | user: test |
1516 continue: hg graft --continue | 1515 continue: hg graft --continue |
1517 $ hg graft --continue | 1516 $ hg graft --continue |
1518 grafting 1:80e6d2c47cfe "added b" | 1517 grafting 1:80e6d2c47cfe "added b" |
1519 grafting 2:8be98ac1a569 "added c" | 1518 grafting 2:8be98ac1a569 "added c" |
1520 | 1519 |
1521 XXX: 8 and 9 show have the date we passed | |
1522 $ hg log -Gr '.^^::.' | 1520 $ hg log -Gr '.^^::.' |
1523 @ changeset: 9:7ee8d3496b19 | 1521 @ changeset: 9:1896b76e007a |
1524 | tag: tip | 1522 | tag: tip |
1525 | user: test | 1523 | user: test |
1526 | date: Thu Jan 01 00:00:00 1970 +0000 | 1524 | date: Fri Feb 13 21:18:00 2009 -0002 |
1527 | summary: added c | 1525 | summary: added c |
1528 | | 1526 | |
1529 o changeset: 8:802f1eae3af3 | 1527 o changeset: 8:ce2b4f1632af |
1530 | parent: 3:9e887f7a939c | 1528 | parent: 3:9e887f7a939c |
1531 | user: test | 1529 | user: test |
1532 | date: Thu Jan 01 00:00:00 1970 +0000 | 1530 | date: Fri Feb 13 21:18:00 2009 -0002 |
1533 | summary: added b | 1531 | summary: added b |
1534 | | 1532 | |
1535 o changeset: 3:9e887f7a939c | 1533 o changeset: 3:9e887f7a939c |
1536 | parent: 0:f7ad41964313 | 1534 | parent: 0:f7ad41964313 |
1537 ~ user: test | 1535 ~ user: test |