fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dodanie opisu zmian do interfejsu zarzÄ…dzania pull requestami.
[redakcja.git]
/
lib
/
wlrepo
/
mercurial_backend
/
library.py
diff --git
a/lib/wlrepo/mercurial_backend/library.py
b/lib/wlrepo/mercurial_backend/library.py
old mode 100644
(file)
new mode 100755
(executable)
index
84e7654
..
5535a88
--- a/
lib/wlrepo/mercurial_backend/library.py
+++ b/
lib/wlrepo/mercurial_backend/library.py
@@
-13,7
+13,7
@@
from mercurial import ui as hgui
from mercurial import error
import wlrepo
from mercurial import error
import wlrepo
-from wlrepo.mercurial_backend import MercurialRevision
+from wlrepo.mercurial_backend
.revision
import MercurialRevision
from wlrepo.mercurial_backend.document import MercurialDocument
class MergeStatus(object):
from wlrepo.mercurial_backend.document import MercurialDocument
class MergeStatus(object):
@@
-80,7
+80,7
@@
class MercurialLibrary(wlrepo.Library):
def ospath(self):
return self._ospath.decode('utf-8')
def ospath(self):
return self._ospath.decode('utf-8')
- def document_for_rev(self, revision):
+ def document_for_rev
ision
(self, revision):
if revision is None:
raise ValueError("Revision can't be None.")
if revision is None:
raise ValueError("Revision can't be None.")
@@
-99,14
+99,14
@@
class MercurialLibrary(wlrepo.Library):
rev = self._sanitize_string(rev)
if rev != u'latest':
rev = self._sanitize_string(rev)
if rev != u'latest':
- doc = self.document_for_rev(rev)
+ doc = self.document_for_rev
ision
(rev)
if doc.id != docid or (doc.owner != user):
raise wlrepo.RevisionMismatch(self.fulldocid(docid, user)+u'@'+unicode(rev))
return doc
else:
if doc.id != docid or (doc.owner != user):
raise wlrepo.RevisionMismatch(self.fulldocid(docid, user)+u'@'+unicode(rev))
return doc
else:
- return self.document_for_rev(self.fulldocid(docid, user))
+ return self.document_for_rev
ision
(self.fulldocid(docid, user))
def get_revision(self, revid):
revid = self._sanitize_string(revid)
def get_revision(self, revid):
revid = self._sanitize_string(revid)
@@
-121,9
+121,12
@@
class MercurialLibrary(wlrepo.Library):
if ctx is None:
raise wlrepo.RevisionNotFound(revid)
if ctx is None:
raise wlrepo.RevisionNotFound(revid)
+ return self._revision(ctx)
+
+ def _revision(self, ctx):
if self._revcache.has_key(ctx):
return self._revcache[ctx]
if self._revcache.has_key(ctx):
return self._revcache[ctx]
-
+
return MercurialRevision(self, ctx)
def fulldocid(self, docid, user=None):
return MercurialRevision(self, ctx)
def fulldocid(self, docid, user=None):
@@
-140,8
+143,7
@@
class MercurialLibrary(wlrepo.Library):
except mercurial.error.RepoError:
return False
except mercurial.error.RepoError:
return False
- def document_create(self, docid):
-
+ def document_create(self, docid):
# check if it already exists
fullid = self.fulldocid(docid)
# check if it already exists
fullid = self.fulldocid(docid)
@@
-151,7
+153,7
@@
class MercurialLibrary(wlrepo.Library):
# doesn't exist
self._create_branch(self._sanitize_string(fullid))
# doesn't exist
self._create_branch(self._sanitize_string(fullid))
- return self.document_for_rev(fullid)
+ return self.document_for_rev
ision
(fullid)
#
# Private methods
#
# Private methods