Changeset - d8b6c876c609
[Not reviewed]
default
0 2 0
domruf - 10 years ago 2016-02-24 22:34:33
dominikruf@gmail.com
vcs: use date format that is supported by Mercurial on non-english machines
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/inmemory.py
Show inline comments
 
@@ -80,13 +80,13 @@ class MercurialInMemoryChangeset(BaseInM
 
        parents = [None, None]
 
        for i, parent in enumerate(self.parents):
 
            if parent is not None:
 
                parents[i] = parent._ctx.node()
 

	
 
        if date and isinstance(date, datetime.datetime):
 
            date = date.ctime()
 
            date = date.strftime('%a, %d %b %Y %H:%M:%S')
 

	
 
        commit_ctx = memctx(repo=self.repository._repo,
 
            parents=parents,
 
            text='',
 
            files=self.get_paths(),
 
            filectxfn=filectxfn,
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -169,13 +169,13 @@ class MercurialRepository(BaseRepository
 

	
 
        if message is None:
 
            message = "Added tag %s for changeset %s" % (name,
 
                changeset.short_id)
 

	
 
        if date is None:
 
            date = datetime.datetime.now().ctime()
 
            date = datetime.datetime.now().strftime('%a, %d %b %Y %H:%M:%S')
 

	
 
        try:
 
            self._repo.tag(name, changeset._ctx.node(), message, local, user,
 
                date)
 
        except Abort as e:
 
            raise RepositoryError(e.message)
 
@@ -199,13 +199,13 @@ class MercurialRepository(BaseRepository
 
        """
 
        if name not in self.tags:
 
            raise TagDoesNotExistError("Tag %s does not exist" % name)
 
        if message is None:
 
            message = "Removed tag %s" % name
 
        if date is None:
 
            date = datetime.datetime.now().ctime()
 
            date = datetime.datetime.now().strftime('%a, %d %b %Y %H:%M:%S')
 
        local = False
 

	
 
        try:
 
            self._repo.tag(name, nullid, message, local, user, date)
 
            self.tags = self._get_tags()
 
        except Abort as e:
0 comments (0 inline, 0 general)