<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- author Antoine Levy-Lambert  -->
<!-- this file demonstrates that p4.change will be modified by p4submit -->
<!-- if the change number is modified by the Perforce daemon during the submission -->
<project name="build1" default="runtest">
  <target name="runtest">
    <p4change/>
    <property name="change1" value="${p4.change}" />
    <echo>
doing a first change ${change1}
</echo>
    <p4change/>
    <property name="change2" value="${p4.change}" />
    <echo>
doing a second change ${change2}
</echo>
    <p4edit view="//depot/foobar" change="${change1}" />
    <p4edit view="//depot/hello" change="${change2}" />
    <echo>
before submitting of hello change ${change2} p4.change is now ${p4.change}
</echo>
    <p4submit change="${change2}"/>
    <echo>
after submitting of hello p4.change is now ${p4.change}
</echo>
    <echo>
before submitting of foobar change ${change1}
</echo>
    <p4submit change="${change1}"/>
    <echo>
after submitting of foobar p4.change is now ${p4.change}
</echo>
  </target>
</project>
