git://git.onelab.eu
/
build.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d9ed65
)
revert (reset) before changing branch in git repos
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Tue, 27 Jul 2010 12:54:15 +0000
(14:54 +0200)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Tue, 27 Jul 2010 12:54:15 +0000
(14:54 +0200)
module-tools.py
patch
|
blob
|
history
diff --git
a/module-tools.py
b/module-tools.py
index
4a4a879
..
ea90f56
100755
(executable)
--- a/
module-tools.py
+++ b/
module-tools.py
@@
-308,6
+308,7
@@
class GitRepository:
self.__run_command_in_repo("git merge --ff origin/%s" % branch)
def to_branch(self, branch, remote=True):
+ self.revert()
if remote:
command = "git branch --track %s origin/%s" % (branch, branch)
c = Command(command, self.options)
@@
-315,6
+316,7
@@
class GitRepository:
return self.__run_command_in_repo("git checkout %s" % branch)
def to_tag(self, tag):
+ self.revert()
return self.__run_command_in_repo("git checkout %s" % tag)
def tag(self, tagname, logfile):