function updatePlots() {
// this way, the global plant function is not overwritten
// @see JavaScript variable scope
var plant;
// You might want to 'var' your other local (?) variables, too
// var fullplots, i, status, growth;
fullplots = [];
for (i = 0; i < plots.length; i++) { //get fullplots
if (plots[i].length) {
fullplots.push(i);
}
}
for (i = 0; i < fullplots.length; i++) {
// at this line of code you overwrite the global plant, which is not a function anymore then
plant = plots[fullplots[i]][0];
status = plots[fullplots[i]][1];
growth = plots[fullplots[i]][2];
if (growth < 100) { //increment
plots[fullplots[i]][2]++;
}
}
if (document.getElementById('plots').style.display == 'block') {
getPlots();
}
}
Да, используйте синхронизацию-k.
Добавьте путь, который Вы хотите удалить своему клиенту, например.
//depot/oops/... //your-client/oops/...
Затем синхронизируйте то местоположение с помощью-k опции:
p4 sync -k oops/...
Это скажет По необходимости, что у Вашего клиента есть файлы, на самом деле не передавая их. Затем можно сделать:
p4 delete oops/...
p4 submit oops/...
и т.д.
Используйте delete -v:
p4 delete -v oops/...
Это удалит файлы без синхронизации с рабочей областью. Это быстрее, чем sync -k, а затем удалить.