Ticket #430 (closed enhancement: worksforme)
CVS - both branch and revision
| Reported by: | clown | Owned by: | unpaidbill |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.+ |
| Version: | 0.7.8 | Keywords: | cvs |
| Cc: |
Description
This
cvs up -dP -r [branch] -D [timestamp] [simple_dir]
doesn't work for me absolutely. In CVS FAQ i saw some (undocumented?) trick for such a task:
cvs up -dP -r [branch]:[timestamp] [simple_dir]
commented by audience as "dreaming" because it doesn't work either.
The 'alwaysUseLatest = True' does a little help since it affects only when there is no autodetected source revision:
# if revision is None, use the latest sources (-rHEAD)
revision = s.revision
if not revision and not self.alwaysUseLatest:
revision = self.computeSourceRevision(s.changes)
But I can hardly imagine such circumstances.
I made a quick workaround for this CVS bug but cannot be sure is this a best way.
--- /usr/share/pyshared/buildbot/slave/commands.py~ 2008-07-25 03:36:25.000000000 +0400
+++ /usr/share/pyshared/buildbot/slave/commands.py 2009-02-19 17:51:06.000000000 +0300
@@ -1472,7 +1472,7 @@
command = [self.vcexe, '-z3'] + self.global_options + ['update', '-dP']
if self.branch:
command += ['-r', self.branch]
- if self.revision:
+ elif self.revision:
command += ['-D', self.revision]
c = ShellCommand(self.builder, command, d,
sendRC=False, timeout=self.timeout)
@@ -1490,7 +1490,7 @@
[verb, '-d', self.srcdir])
if self.branch:
command += ['-r', self.branch]
- if self.revision:
+ elif self.revision:
command += ['-D', self.revision]
command += [self.cvsmodule]
c = ShellCommand(self.builder, command, d,
Change History
comment:1 in reply to: ↑ description Changed 4 years ago by clown
comment:2 follow-up: ↓ 3 Changed 4 years ago by dustin
- Milestone changed from undecided to 0.7.11
So the issue is that CVS can't do both a revision and branch at the same time? If this is the case, we shouldn't silently drop one or the other (as both patches do), but fail in this circumstance.
comment:3 in reply to: ↑ 2 Changed 4 years ago by clown
Replying to dustin:
So the issue is that CVS can't do both a revision and branch at the same time? If this is the case, we shouldn't silently drop one or the other (as both patches do), but fail in this circumstance.
This cannot be adequate if somebody uses a standard commit-AnyBranchScheduler?-builder chain: any CVS commit to a non-default branch would lead to a failed CVS step in build.
comment:4 Changed 4 years ago by dustin
So maybe the CVS Step needs to be constructed with an argument that says to pay attention to the branch *or* the revision.
The alternative -- always checking out the latest code (by ignoring the revision) might be OK, I suppose, as long as it's documented. I would want to poll the mailing list on that one first.
comment:5 Changed 4 years ago by dustin
- Milestone changed from 0.7.11 to 0.7.12
clown - please do ask on the mailing list to see how this should be solved.
comment:6 Changed 3 years ago by dustin
- Milestone changed from 0.7.12 to 0.8.+
moving out to the next release
comment:8 Changed 3 years ago by dustin
- Keywords revision alwaysUseLatest removed
- Milestone changed from 0.8.+ to 0.8.1
Let's see if we can tackle this in 0.8.1
comment:9 Changed 3 years ago by unpaidbill
- Owner set to unpaidbill
- Status changed from new to accepted
comment:12 Changed 2 years ago by dustin
- Status changed from assigned to closed
- Resolution set to worksforme
- Milestone changed from 0.8.3 to 0.8.+
I haven't seen any action here, and no complaints from CVS users. Is this still a problem? Reopen if so.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Replying to clown:
I made quick workaround in master.cfg: