diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-19 15:26:48 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-19 15:26:48 -0400 |
commit | 2f2841356a80294b601f67e6676266d88b3ab971 (patch) | |
tree | 573942a8c251eb52565e7567f295a97d0d472e15 /libbe/hg.py | |
parent | 9c956487a7d10f4b52ba4aeaceff35e90d027130 (diff) | |
parent | a6d5f2891dc353ebe5d9d8598790a6674c174eec (diff) | |
download | bugseverywhere-2f2841356a80294b601f67e6676266d88b3ab971.tar.gz |
Merged "be commit --allow-empty from be.wtk-rr"
Diffstat (limited to 'libbe/hg.py')
-rw-r--r-- | libbe/hg.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbe/hg.py b/libbe/hg.py index c301948..a20eeb5 100644 --- a/libbe/hg.py +++ b/libbe/hg.py @@ -58,7 +58,7 @@ class Hg(RCS): def _rcs_add(self, path): self._u_invoke_client("add", path) def _rcs_remove(self, path): - self._u_invoke_client("rm", path) + self._u_invoke_client("rm", "--force", path) def _rcs_update(self, path): pass def _rcs_get_file_contents(self, path, revision=None, binary=False): @@ -73,8 +73,13 @@ class Hg(RCS): return RCS._rcs_duplicate_repo(self, directory, revision) else: self._u_invoke_client("archive", "--rev", revision, directory) - def _rcs_commit(self, commitfile): - self._u_invoke_client('commit', '--logfile', commitfile) + def _rcs_commit(self, commitfile, allow_empty=False): + args = ['commit', '--logfile', commitfile] + status,output,error = self._u_invoke_client(*args) + if allow_empty == False: + strings = ["nothing changed"] + if self._u_any_in_string(strings, output) == True: + raise rcs.EmptyCommit() status,output,error = self._u_invoke_client('identify') revision = None revline = re.compile("(.*) tip") |