aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/darcs.py
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2010-06-22 15:57:58 -0400
committerChris Ball <cjb@laptop.org>2010-06-22 15:57:58 -0400
commit9763adba687a0e8921187702dd55e9a7083c9db4 (patch)
tree5f2bc55869722d7518b0e61e39b6deebe9dec0f4 /libbe/storage/vcs/darcs.py
parent6edc7b6e25b4b59b45e157d9d55816fa9dcfe494 (diff)
parent7755c210fd7003479f60d5699e6f638bcd370fe6 (diff)
downloadbugseverywhere-9763adba687a0e8921187702dd55e9a7083c9db4.tar.gz
Merge from Trevor.
Diffstat (limited to 'libbe/storage/vcs/darcs.py')
-rw-r--r--libbe/storage/vcs/darcs.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/libbe/storage/vcs/darcs.py b/libbe/storage/vcs/darcs.py
index 0f23278..b0e5705 100644
--- a/libbe/storage/vcs/darcs.py
+++ b/libbe/storage/vcs/darcs.py
@@ -112,13 +112,15 @@ class Darcs(base.VCS):
def _vcs_get_user_id(self):
# following http://darcs.net/manual/node4.html#SECTION00410030000000000000
- # as of June 29th, 2009
+ # as of June 22th, 2010
if self.repo == None:
return None
- darcs_dir = os.path.join(self.repo, '_darcs')
- if darcs_dir != None:
- for pref_file in ['author', 'email']:
- pref_path = os.path.join(darcs_dir, 'prefs', pref_file)
+ for pref_file in ['author', 'email']:
+ for prefs_dir in [os.path.join(self.repo, '_darcs', 'prefs'),
+ os.path.expanduser(os.path.join('~', '.darcs'))]:
+ if prefs_dir == None:
+ continue
+ pref_path = os.path.join(prefs_dir, pref_file)
if os.path.exists(pref_path):
return self._vcs_get_file_contents(pref_path).strip()
for env_variable in ['DARCS_EMAIL', 'EMAIL']:
@@ -153,7 +155,10 @@ class Darcs(base.VCS):
def _vcs_add(self, path):
if os.path.isdir(path):
return
- self._u_invoke_client('add', path)
+ if self.version_cmp(0, 9, 10) == 1:
+ self._u_invoke_client('add', '--boring', path)
+ else: # really old versions <= 0.9.10 lack --boring
+ self._u_invoke_client('add', path)
def _vcs_remove(self, path):
if not os.path.isdir(self._u_abspath(path)):