Jump to content


Submitting files from change list with different descriptions

description submit change

  • Please log in to reply
1 reply to this topic

#1 Zvejniex

Zvejniex

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 16 February 2017 - 02:06 PM

Hi,

I have a perforce depot that I would like to sync with my local workspace frequently. I do all my actions with command line - open the files for edit and do a reconsile, I believe this creates a change list with all the modified/deleted/added files. After this is done, I submit the change list with a description "JIRA-XXXX".
This results in a same description for every affected file.

Is it possible to submit the files somehow with different descriptions? I would like "JIRA-XXXX Last changed by:Someone".

If it's possible to do that, some server scripting could be introduced.
The last changed information is stored in a JSON.

Thanks!

#2 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 64 posts

Posted 02 March 2017 - 10:07 PM

Try using a form-out trigger.  When you run "p4 reconcile", the changelist description will be changed.  Here's a sample script that changes the description:
#!/bin/bash
#Triggers:
#     changedesc form-out change "/home/rfong/perforce/changedesc.sh %formfile%"
FOUNDDEPOT=`cat $1 | grep "\/\/depot" | wc -l`
if [ $FOUNDDEPOT -gt 0 ]; then
    echo Found `cat $1 | grep "\/\/depot"`
    cat $1 | /bin/sed -e "s/Description:/Description:  This is a special depot./" > /tmp/hello.txt
else
    cat $1 | /bin/sed -e "s/Description:/Description:  This is a regular depot./" > /tmp/hello.txt
fi
cp /tmp/hello.txt $1 >> /tmp/hello.txt 2>&1
#rm /tmp/hello.txt




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users