Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
bfb5e2fb
D
Dak
项目概览
喜羊羊3508
/
Dak
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dak
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bfb5e2fb
编写于
11月 13, 2009
作者:
M
Mike O'Connor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dodadoda
Signed-off-by:
N
Mike O'Connor
<
stew@ries.debian.org
>
上级
1f586de5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
42 addition
and
32 deletion
+42
-32
dak/process_new.py
dak/process_new.py
+11
-10
daklib/changes.py
daklib/changes.py
+31
-22
未找到文件。
dak/process_new.py
浏览文件 @
bfb5e2fb
...
...
@@ -816,28 +816,29 @@ def lock_package(package):
finally
:
os
.
unlink
(
path
)
def
changes_to_
unchecked
(
upload
,
session
):
"""move a changes file to
unchecked
"""
unchecked
=
get_policy_queue
(
'unchecked
'
,
session
);
def
changes_to_
newstage
(
upload
,
session
):
"""move a changes file to
newstage
"""
newstage
=
get_policy_queue
(
'newstage
'
,
session
);
# changes.in_queue = unchecked
# changes.in_queue = newstage
chg
=
session
.
query
(
DBChange
).
filter_by
(
changesname
=
os
.
path
.
basename
(
upload
.
pkg
.
changes_file
)).
one
()
chg
.
approved_for
=
unchecked
.
policy_queue_id
chg
.
approved_for
=
newstage
.
policy_queue_id
for
f
in
upload
.
pk
g
.
files
:
for
f
in
ch
g
.
files
:
# update the changes_pending_files row
f
.
queue
=
unchecked
f
.
queue
=
newstage
# actually move files
upload
.
move_to_queue
(
unchecked
)
upload
.
move_to_queue
(
newstage
)
def
_accept
(
upload
,
session
):
if
Options
[
"No-Action"
]:
return
(
summary
,
short_summary
)
=
upload
.
build_summaries
()
# upload.accept(summary, short_summary, targetqueue)
changes_to_unchecked
(
upload
,
session
)
# upload.accept(summary, short_summary, targetqueue)
changes_to_newstage
(
upload
,
session
)
def
do_accept
(
upload
,
session
):
print
"ACCEPT"
...
...
daklib/changes.py
浏览文件 @
bfb5e2fb
...
...
@@ -204,30 +204,39 @@ class Changes(object):
else
:
multivalues
[
key
]
=
self
.
changes
[
key
]
# TODO: Use ORM
session
.
execute
(
"""INSERT INTO changes
(changesname, in_queue, seen, source, binaries, architecture, version,
distribution, urgency, maintainer, fingerprint, changedby, date)
VALUES (:changesfile,:in_queue,:filetime,:source,:binary, :architecture,
:version,:distribution,:urgency,:maintainer,:fingerprint,:changedby,:date)"""
,
{
'changesfile'
:
self
.
changes_file
,
'filetime'
:
filetime
,
'in_queue'
:
in_queue
,
'source'
:
self
.
changes
[
"source"
],
'binary'
:
multivalues
[
"binary"
],
'architecture'
:
multivalues
[
"architecture"
],
'version'
:
self
.
changes
[
"version"
],
'distribution'
:
multivalues
[
"distribution"
],
'urgency'
:
self
.
changes
[
"urgency"
],
'maintainer'
:
self
.
changes
[
"maintainer"
],
'fingerprint'
:
self
.
changes
[
"fingerprint"
],
'changedby'
:
self
.
changes
[
"changed-by"
],
'date'
:
self
.
changes
[
"date"
]}
)
chg
=
DBChange
()
chg
.
chagnesfile
=
self
.
change_file
chg
.
seen
=
filetime
chg
.
in_queue_id
=
in_queue
chg
.
source
=
self
.
chagnes
[
"source"
]
chg
.
binaries
=
multivalues
[
"binary"
]
chg
.
architecture
=
multivalues
[
"architecture"
]
chg
.
version
=
self
.
changes
[
"version"
]
chg
.
distribution
=
multivalues
[
"distribution"
]
chg
.
urgency
=
self
.
changes
[
"urgency"
]
chg
.
maintainer
=
self
.
changes
[
"maintainer"
]
chg
.
fingerprint
=
self
.
changes
[
"fingerprint"
]
chg
.
changedby
=
self
.
changes
[
"changed-by"
]
chg
.
date
=
self
.
changes
[
"date"
]
session
.
add
(
chg
)
chg_files
=
[]
for
chg_fn
in
self
.
files
.
keys
():
cpf
=
ChangePendingFile
()
cpf
.
filename
=
chg_fn
cpf
.
size
=
self
.
files
[
chg_fn
][
'size'
]
cpf
.
md5sum
=
self
.
files
[
chg_fn
][
'md5sum'
]
session
.
add
(
cpf
)
chg_files
.
append
(
cpf
)
chg
.
files
=
chg_files
session
.
commit
()
return
session
.
query
(
DBChange
).
filter_by
(
changesname
=
self
.
changes_file
).
one
()
chg
=
session
.
query
(
DBChange
).
filter_by
(
changesname
=
self
.
changes_file
).
one
();
return
chg
def
unknown_files_fields
(
self
,
name
):
return
sorted
(
list
(
set
(
self
.
files
[
name
].
keys
())
-
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录