.p4aliases #7

  • //
  • guest/
  • matt_attaway/
  • scripts/
  • .p4aliases
  • View
  • Commits
  • Open Download .zip Download (2 KB)
# short commands
co=edit
ci=submit
st=status

# new commands
shelved=changes -s shelved -u $(P4USER) -c $(P4CLIENT)
pending=changes -s pending -u $(P4USER) -c $(P4CLIENT)
desc=describe -s
purge=clean -I
blame=annotate -u
lc=-F "%change%" -ztag changes -m1 -s submitted ... > $(chg)&& describe -s $(chg)
copyup= -F "%baseParent%" -ztag stream -o > $(parent) &&
        -F "%Name%" -ztag stream -o > $(current) &&
        switch $(parent) &&
        merge --from $(current) &&
        resolve -as &&
        submit -d "Pulling crud to main" &&
        switch $(current)


nuke-shelf $(change)=shelve -dc $(change) && revert -c $(change) //... && change -d $(change)
nc $(desc) = --field Description$(EQ)$(desc) change -o > $(form) && change -i < $(form)
newChange $(desc) = change -o > $(chg) &&
                       p4subst "$(LT)enter.*$(GT)" $(desc) < $(chg) > $(chg2) &&
                       change -i < $(chg2)

# one shot move!
mv $(from) $(to) = edit $(from) && move $(from) $(to)

# one shot reconcile and submit a la git commit -am
su $(description)=rec && submit -d $(description)

# cp takes a snapshot of WIP and puts it into the active shelf
auto_shelved = -ztag -F %change% changes -s shelved -u $(P4USER) -c $(P4CLIENT) ...
cp = auto_shelved > $(chg) && rec -c $(chg) && shelve -c $(chg) -r

# what shelves are on my shared server? Single arg and no arg versions.
remote-shelves $(remote) = -F %Address% -ztag remote -o $(remote) > $(port) && 
             -p $(port) -u $(P4USER) changes -s shelved -u $(P4USER)

remote-shelves = remote-shelves origin

nuke-it-from-orbit = -F %clientRoot% -ztag info > $(root) && revert //... && clean $(root)/... && sync

refresh-aliases = -u guest -p workshop.perforce.com:1666 print -o /Users/matt/.p4aliases -q //guest/matt_attaway/scripts/.p4aliases

full-changes $(rev) = -ztag -F %change% changes $(rev) > $(changes) && -x - describe -s < $(changes)
# Change User Description Committed
#7 18678 Matt Attaway Add an alias to get the full descriptions of a set of changelists given a path and rev specifer
#6 16533 Matt Attaway Add my handy refresh alias to refresh my aliases
#5 16487 Matt Attaway Add command to reset my workspace
#4 16483 Matt Attaway Bring all my aliases together again.
#3 16482 Matt Attaway Add cp command to take a "checkpoint" of work in progress

Running 'p4 cp' will find the active shelf for the working dir, run
reconcile and put all the files in the change that goes with that shelf,
and then update the contents of the shelf. Handy for times when you want
to back stuff up to the shared server as you go.
#2 16411 Matt Attaway add a couple more aliases
#1 16032 Matt Attaway Checkin my aliases file so I can share it more easily