# Perforce Sync on on list of Changelist numbers

**URL:** https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746
**Category:** Feature Requests
**Created:** [October 26, 2006, 7:17am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746 "2006-10-26T07:17:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jpeterson](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jpeterson](https://www.finalbuilder.com/forums/u/jpeterson)
#### Post date: [October 26, 2006, 7:17am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/1 "2006-10-26T07:17:07Z")

</div>

Currently the way I see the Perforce Sync action working when specifying a changlist number is, that it will sync all the files UP TO that changelist number, not just on that ONE changelist. I.E- Use Finalbuilder’s P4 Sync command using the ChangeList option on the Revision tab and specify changelist “4”. When it actually syncs to the depot, not only do you get changelist “4”, but also changelists 1,2,&3 (assuming you haven’t synced on those previously).I would like Finalbuilder to allow me to specify a list of P4 changelists (like 10, 23, 101) and then only sync on those specified changelists like this:p4 sync @10,@10p4 sync @23,@23p4 sync @101,@101That way, I only get the files associated with 10, 23 & 101 and not everything in-between. We have accomplished this by creating and then running a batch script which contains the above p4 command lines within FinalBuilder, however it would be nice feature to just have a P4 Sync Action that does this for you instead of just having one that will sync all the way up to the specified changelist. Can you look into this??

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [October 27, 2006, 6:36am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/2 "2006-10-27T06:36:54Z")

</div>

Hi Jerrad,  
  
I’m pretty sure you could enter more than one change number in the change number field in the sync action, but don’t put the first @ symbol as that will be automatically added by FB, eg. if you put “1,@2” then it will call p4 with @1,@2  
  
let me know if this works or not.  
  
.t8

---

<div class="post-metadata">

### Author: ![jpeterson](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jpeterson](https://www.finalbuilder.com/forums/u/jpeterson)
#### Post date: [October 27, 2006, 5:46am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/3 "2006-10-27T05:46:03Z")

</div>

You are right, that does work for one chagelist number, but not for a list of several that are not sequential.

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [October 28, 2006, 12:14pm UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/4 "2006-10-28T12:14:39Z")

</div>

so, what’s the exact command line for p4 that you would use for non-sequential change numbers?

---

<div class="post-metadata">

### Author: ![jpeterson](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jpeterson](https://www.finalbuilder.com/forums/u/jpeterson)
#### Post date: [October 30, 2006, 5:37am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/5 "2006-10-30T05:37:40Z")

</div>

you have to use multiple p4 sync commands executed one after the other such as:  
p4 sync @10,@10  
P4 sync @23,@23  
p4 sync @101,@101

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [October 30, 2006, 11:43am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/6 "2006-10-30T11:43:56Z")

</div>

Hi Jerrad,  
  
Ah, ic!   
  
Well, in that case you’ll have to use multiple Perforce Sync actions as the action is not designed to be able to call p4 more than once per execution.

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [October 30, 2006, 11:44am UTC](https://www.finalbuilder.com/forums/t/perforce-sync-on-on-list-of-changelist-numbers/3746/7 "2006-10-30T11:44:55Z")

</div>

Hi Jerrad,  
  
Another option, if you have a very long list of changelist numbers, may be to use a List Iterator. Put the list of Changelist sets into the list text, ie:  
  
10  
23  
101,@103  
  
Then set a variable from the List Iterator and use it for the changelist number in the P4 Sync action, ie %ChangeList%  
  
Hth.  
  
Regards,  
  
Angus
