Skip to content

Commit

Permalink
test_vc: fix hg shortids, make CVS_checkout_options not clobber CVS
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Jan 22, 2010
1 parent 87b2237 commit 4503384
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions buildbot/test/test_vc.py
Expand Up @@ -1306,7 +1306,7 @@ class CVS_checkout_options(CVS):
CVSHelper_checkout_options
set checkout_options to verify that it works
"""
vc_name = "cvs"
vc_name = "cvs_co"

metadir = "CVS"
vctype = "source.CVS"
Expand Down Expand Up @@ -2530,8 +2530,7 @@ def capable(self):
return (True, None)

def extract_id(self, output):
m = re.search(r'^(\w+)', output)
return m.group(0)
return output.strip()

def createRepository(self):
self.createBasedir()
Expand All @@ -2557,7 +2556,7 @@ def createRepository(self):
w = self.dovc(tmp, ['push', self.rep_trunk])
# note that hg-push does not actually update the working directory
yield w; w.getResult()
w = self.dovc(tmp, "identify")
w = self.dovc(tmp, ["identify", "--id", "--debug"])
yield w; out = w.getResult()
self.addTrunkRev(self.extract_id(out))

Expand All @@ -2566,7 +2565,7 @@ def createRepository(self):
yield w; w.getResult()
w = self.dovc(tmp, ['push', self.rep_branch])
yield w; w.getResult()
w = self.dovc(tmp, "identify")
w = self.dovc(tmp, ["identify", "--id", "--debug"])
yield w; out = w.getResult()
self.addBranchRev(self.extract_id(out))
rmdirRecursive(tmp)
Expand All @@ -2589,7 +2588,7 @@ def vc_revise(self):
yield w; w.getResult()
w = self.dovc(tmp, ['push', self.rep_trunk])
yield w; w.getResult()
w = self.dovc(tmp, "identify")
w = self.dovc(tmp, ["identify", "--id", "--debug"])
yield w; out = w.getResult()
self.addTrunkRev(self.extract_id(out))
rmdirRecursive(tmp)
Expand Down Expand Up @@ -2784,7 +2783,7 @@ def createRepository(self):
w = self.dovc(tmp, ['push', self.repo])
# note that hg-push does not actually update the working directory
yield w; w.getResult()
w = self.dovc(tmp, "identify")
w = self.dovc(tmp, ["identify", "--id", "--debug"])
yield w; out = w.getResult()
self.addTrunkRev(self.extract_id(out))

Expand All @@ -2795,7 +2794,7 @@ def createRepository(self):
yield w; w.getResult()
w = self.dovc(tmp, ['push', '-f', self.repo])
yield w; w.getResult()
w = self.dovc(tmp, "identify")
w = self.dovc(tmp, ["identify", "--id", "--debug"])
yield w; out = w.getResult()
self.addBranchRev(self.extract_id(out))
rmdirRecursive(tmp)
Expand All @@ -2820,7 +2819,7 @@ def vc_revise(self):
yield w; w.getResult()
w = self.dovc(tmp, ['push', '--force', self.repo])
yield w; w.getResult()
w = self.dovc(tmp, "identify")
w = self.dovc(tmp, ["identify", "--id", "--debug"])
yield w; out = w.getResult()
self.addTrunkRev(self.extract_id(out))
rmdirRecursive(tmp)
Expand Down

1 comment on commit 4503384

@marcus-sonestedt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Note: Not using the \w regex might include the + at end of hash-id which indicated local changes. It might not apply to the tests here, but I've kept it at other places just in case....

Cheers,
/Marcus

Please sign in to comment.