Skip to content

Commit 86f27ff

Browse files
committed
add startPurgeAllDeletions to branch
1 parent f0f9d43 commit 86f27ff

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

js/gitana/repository/Branch.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,35 @@
15021502
return this.chainPostEmpty(null, uriFunction);
15031503
},
15041504

1505+
/**
1506+
* Starts a job to purge all deletions
1507+
*
1508+
* @param callback
1509+
*/
1510+
startPurgeAllDeletions: function(callback)
1511+
{
1512+
var self = this;
1513+
1514+
if (typeof(options) === "function") {
1515+
callback = options;
1516+
options = null;
1517+
}
1518+
1519+
var params = {};
1520+
1521+
var uriFunction = function()
1522+
{
1523+
return self.getUri() + "/deletions/purgeall/start";
1524+
};
1525+
1526+
return this.chainPostResponse(this, uriFunction, params).then(function(response) {
1527+
1528+
var jobId = response._doc;
1529+
1530+
callback(jobId);
1531+
});
1532+
},
1533+
15051534
/**
15061535
* Archives the branch.
15071536
*

0 commit comments

Comments
 (0)