Mercurial > public > mercurial-scm > hg
diff tests/test-mq-subrepo.t @ 24845:8133494accf1 stable
record: edit patch of newly added files (issue4304)
I tried to fix this issue in the past and had to revert the fix. This is a
second attempt without the regression we found with the first one.
record defines special headers (of file) as headers whose hunk are not shown
to the user for editing, they are used to represent deleted, moved and new
files. Since we want to authorize editing the patch of newly added file we
make the newly added file with some content not special anymore. This entails
that we have to save their content before applying the backup to be able to
revert it if the patch does not apply properly.
We reintroduce the test showing that newly added files can be edited and that
their content is shown to the user.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Thu, 23 Apr 2015 14:27:26 -0700 |
parents | edf907bd8144 |
children | c0995cd8ff6f |
line wrap: on
line diff
--- a/tests/test-mq-subrepo.t Thu Apr 23 16:59:11 2015 -0700 +++ b/tests/test-mq-subrepo.t Thu Apr 23 14:27:26 2015 -0700 @@ -295,6 +295,11 @@ new file mode 100644 examine changes to '.hgsub'? [Ynesfdaq?] y + @@ -0,0 +1,1 @@ + +sub = sub + record this change to '.hgsub'? [Ynesfdaq?] y + + warning: subrepo spec file '.hgsub' not found abort: uncommitted changes in subrepository 'sub' [255] % update substate when adding .hgsub w/clean updated subrepo @@ -304,6 +309,11 @@ new file mode 100644 examine changes to '.hgsub'? [Ynesfdaq?] y + @@ -0,0 +1,1 @@ + +sub = sub + record this change to '.hgsub'? [Ynesfdaq?] y + + warning: subrepo spec file '.hgsub' not found path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31