Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: chrome/common/extensions/docs/server2/gitiles_file_system.py

Issue 491653002: Docserver: Use GitilesFileSystem instead of SubversionFileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/gitiles_file_system.py
diff --git a/chrome/common/extensions/docs/server2/gitiles_file_system.py b/chrome/common/extensions/docs/server2/gitiles_file_system.py
index df907e6b08ab83d9783629f476654cda8230aa7e..e47c1b94a3a94372dd4284288f0cda403b8df008 100644
--- a/chrome/common/extensions/docs/server2/gitiles_file_system.py
+++ b/chrome/common/extensions/docs/server2/gitiles_file_system.py
@@ -175,6 +175,11 @@ class GitilesFileSystem(FileSystem):
'''
return self._GetCommitInfo('commit')
+ def GetPreviousCommitID(self):
+ '''Returns a future that resolves to the previous commit ID for this branch.
+ '''
+ return self._GetCommitInfo('parents').Then(lambda parents: parents[0])
+
def StatAsync(self, path):
dir_, filename = posixpath.split(path)
def stat(content):

Powered by Google App Engine
This is Rietveld 408576698