Daniel Shahaf wrote on 2018-04-14:
> > It's because it uses "svnmucc -r <REV> put <...>" but STATUS has already been modified between r<REV> and HEAD.
>
> Agreed. It's perfectly possible for the branch to have changed between the
> magic revision and HEAD. When editing STATUS, the base revision (argument to
> the -r option) should be HEAD resolved to a number.
>
> Something like this, perhaps?
I agree the semantics you propose is/are correct. The patch looks right, inspecting the diff; I haven't tested it.
- Julian
> [[[
> release.py create-tag: Fix an out-of-date error when the branch has changed
> after the magic revision.
>
> * tools/dist/release.py
> (create_tag): Use HEAD rather than the magic revision as the base revision
> for the "Post-release housekeeping" commit.
> ]]]
>
> [[[
> Index: tools/dist/release.py
> ===================================================================
> --- tools/dist/release.py (revision 1828071)
> +++ tools/dist/release.py (working copy)
> @@ -828,11 +828,14 @@ def create_tag(args):
> (args.version.major, args.version.minor,
> args.version.patch + 1))
>
> + HEAD = subprocess.check_output(['svn', 'info', '--show-item=revision',
> + '--', url]).strip()
> + HEAD = int(HEAD)
> def file_object_for(relpath):
> fd = tempfile.NamedTemporaryFile()
> url = branch + '/' + relpath
> fd.url = url
> - subprocess.check_call(['svn', 'cat', '%s@%d' % (url, args.revnum)],
> + subprocess.check_call(['svn', 'cat', '%s@%d' % (url, HEAD)],
> stdout=fd)
> return fd
>
> @@ -846,7 +849,7 @@ def create_tag(args):
>
> svn_version_h.seek(0, os.SEEK_SET)
> STATUS.seek(0, os.SEEK_SET)
> - subprocess.check_call(['svnmucc', '-r', str(args.revnum),
> + subprocess.check_call(['svnmucc', '-r', str(HEAD),
> '-m', 'Post-release housekeeping: '
> 'bump the %s branch to %s.'
> % (branch.split('/')[-1], str(new_version)),
> ]]]
Received on 2018-04-14 19:21:22 CEST